Revision: 627
Author:
craig....@unc.edu
Date: Fri May 11 16:22:44 2012
Log: Updated hive-core.jar
http://code.google.com/p/hive-mrc/source/detail?r=627
Added:
/trunk/hive-rs/.classpath
/trunk/hive-rs/.project
/trunk/hive-rs/.settings
/trunk/hive-rs/.settings/.jsdtscope
/trunk/hive-rs/.settings/org.eclipse.jdt.core.prefs
/trunk/hive-rs/.settings/org.eclipse.wst.common.component
/trunk/hive-rs/.settings/org.eclipse.wst.common.project.facet.core.xml
/trunk/hive-rs/.settings/org.eclipse.wst.jsdt.ui.superType.container
/trunk/hive-rs/.settings/
org.eclipse.wst.jsdt.ui.superType.name
/trunk/hive-rs/WebRoot/WEB-INF/lib/hive-core.jar
Modified:
/trunk/hive-rs/src/org/unc/hive/services/rs/ConceptsResource.java
/trunk/hive-rs/src/org/unc/hive/services/rs/ConfigurationListener.java
/trunk/hive-rs/src/org/unc/hive/services/rs/SchemesResource.java
=======================================
--- /dev/null
+++ /trunk/hive-rs/.classpath Fri May 11 16:22:44 2012
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
+ <attributes>
+ <attribute name="owner.project.facets" value="java"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con"
path="org.eclipse.jst.j2ee.internal.web.container"/>
+ <classpathentry kind="con"
path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="var" path="TOMCAT/servlet-api.jar"/>
+ <classpathentry kind="output" path="build/classes"/>
+</classpath>
=======================================
--- /dev/null
+++ /trunk/hive-rs/.project Fri May 11 16:22:44 2012
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>hive-rs</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
+ </natures>
+</projectDescription>
=======================================
--- /dev/null
+++ /trunk/hive-rs/.settings/.jsdtscope Fri May 11 16:22:44 2012
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="WebRoot"/>
+ <classpathentry kind="con"
path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con"
path="org.eclipse.wst.jsdt.launching.WebProject">
+ <attributes>
+ <attribute name="hide" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con"
path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+ <classpathentry kind="output" path=""/>
+</classpath>
=======================================
--- /dev/null
+++ /trunk/hive-rs/.settings/org.eclipse.jdt.core.prefs Fri May 11 16:22:44
2012
@@ -0,0 +1,8 @@
+#Fri May 11 15:51:42 EDT 2012
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
=======================================
--- /dev/null
+++ /trunk/hive-rs/.settings/org.eclipse.wst.common.component Fri May 11
16:22:44 2012
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="hive-rs">
+ <wb-resource deploy-path="/" source-path="/WebRoot"/>
+ <wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
+ <property name="context-root" value="hive-rs"/>
+ <property name="java-output-path" value="/hive-rs/build/classes"/>
+ </wb-module>
+</project-modules>
=======================================
--- /dev/null
+++ /trunk/hive-rs/.settings/org.eclipse.wst.common.project.facet.core.xml
Fri May 11 16:22:44 2012
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <fixed facet="java"/>
+ <fixed facet="jst.web"/>
+ <fixed facet="wst.jsdt.web"/>
+ <installed facet="java" version="1.6"/>
+ <installed facet="jst.web" version="3.0"/>
+ <installed facet="wst.jsdt.web" version="1.0"/>
+</faceted-project>
=======================================
--- /dev/null
+++ /trunk/hive-rs/.settings/org.eclipse.wst.jsdt.ui.superType.container
Fri May 11 16:22:44 2012
@@ -0,0 +1,1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
=======================================
--- /dev/null
+++ /trunk/hive-rs/.settings/
org.eclipse.wst.jsdt.ui.superType.name Fri May
11 16:22:44 2012
@@ -0,0 +1,1 @@
+Window
=======================================
--- /dev/null
+++ /trunk/hive-rs/WebRoot/WEB-INF/lib/hive-core.jar Fri May 11 16:22:44
2012
Binary file, no diff available.
=======================================
--- /trunk/hive-rs/src/org/unc/hive/services/rs/ConceptsResource.java Thu
Apr 14 19:30:19 2011
+++ /trunk/hive-rs/src/org/unc/hive/services/rs/ConceptsResource.java Fri
May 11 16:22:44 2012
@@ -18,6 +18,7 @@
import java.io.File;
import java.util.ArrayList;
import java.util.List;
+import java.util.Map;
import java.util.TreeMap;
import javax.ws.rs.GET;
@@ -388,7 +389,7 @@
if (s.equalsIgnoreCase(schemeName)) {
SKOSScheme skosScheme = skosSchemes.get(s);
if (skosScheme != null) {
- TreeMap<String, QName> alphaIndex = skosScheme.getAlphaIndex();
+ Map<String, QName> alphaIndex = skosScheme.getAlphaIndex();
if (alphaIndex != null) {
for (String prefLabel : alphaIndex.keySet()) {
prefLabelsBuffer.append(prefLabel + "\n");
@@ -647,10 +648,12 @@
*/
@PUT
@Path("tags/SKOSFormat")
- public String tagDocument(@PathParam("schemeName") String schemeName,
- File file) {
+ public String tagDocument(
+ @PathParam("schemeName") String schemeName,
+ @QueryParam("algorithm") String algorithm,
+ File file)
+ {
String xmlString = "";
-
if (file != null) {
String inputFilePath = file.getAbsolutePath();
logger.debug("inputFilePath: " + inputFilePath);
@@ -659,7 +662,7 @@
vocabularyList.add(schemeName);
SKOSSearcher skosSearcher = ConfigurationListener.getSKOSSearcher();
- SKOSTagger skosTagger = ConfigurationListener.getSKOSTagger();
+ SKOSTagger skosTagger =
ConfigurationListener.getSKOSTagger(algorithm);
if (skosSearcher != null && skosTagger != null) {
skosConcepts =
=======================================
--- /trunk/hive-rs/src/org/unc/hive/services/rs/ConfigurationListener.java
Thu Apr 14 19:30:19 2011
+++ /trunk/hive-rs/src/org/unc/hive/services/rs/ConfigurationListener.java
Fri May 11 16:22:44 2012
@@ -48,7 +48,9 @@
private static SKOSSearcher skosSearcher = null;
private static SKOSServer skosServer = null;
- private static SKOSTagger skosTagger = null;
+ private static SKOSTagger mauiTagger = null;
+ private static SKOSTagger keaTagger = null;
+ private static SKOSTagger dummyTagger = null;
/*
@@ -82,8 +84,14 @@
* Getter for the skosTagger class field.
* @return the skosTagger class field
*/
- public static SKOSTagger getSKOSTagger() {
- return skosTagger;
+ public static SKOSTagger getSKOSTagger(String algorithm) {
+ if (algorithm.equals("maui")) {
+ return mauiTagger;
+ } else if (algorithm.equals("kea")) {
+ return keaTagger;
+ } else {
+ return dummyTagger;
+ }
}
@@ -132,7 +140,9 @@
if (skosServer != null) {
skosSearcher = skosServer.getSKOSSearcher();
logger.info("skosSearcher initialized");
- skosTagger = skosServer.getSKOSTagger();
+ keaTagger = skosServer.getSKOSTagger("kea");
+ mauiTagger = skosServer.getSKOSTagger("maui");
+ dummyTagger = skosServer.getSKOSTagger("dummy");
logger.info("skosTagger initialized");
}
}
=======================================
--- /trunk/hive-rs/src/org/unc/hive/services/rs/SchemesResource.java Thu
Apr 14 19:30:19 2011
+++ /trunk/hive-rs/src/org/unc/hive/services/rs/SchemesResource.java Fri
May 11 16:22:44 2012
@@ -170,7 +170,7 @@
@GET
@Path("{schemeName}/numberOfConcepts")
public String getNumberOfConcepts(@PathParam("schemeName") String
schemeName) {
- Integer numberOfConcepts = -1;
+ Long numberOfConcepts = -1L;
SKOSServer skosServer = ConfigurationListener.getSKOSServer();
if (schemeName != null) {
@@ -199,7 +199,7 @@
@GET
@Path("{schemeName}/numberOfRelations")
public String getNumberOfRelations(@PathParam("schemeName") String
schemeName) {
- Integer numberOfRelations = -1;
+ Long numberOfRelations = -1L;
SKOSServer skosServer = ConfigurationListener.getSKOSServer();
if (schemeName != null) {
@@ -269,8 +269,7 @@
if (s.equalsIgnoreCase(schemeName)) {
SKOSScheme skosScheme = skosSchemes.get(s);
if (skosScheme != null) {
- TreeMap<String, QName> alphaIndex =
- skosScheme.getAlphaIndex();
+ TreeMap<String, QName> alphaIndex = (TreeMap<String, QName>)
skosScheme.getAlphaIndex();
if (alphaIndex != null) {
xmlString =
ConceptsResource.conceptTreeMapToXML(alphaIndex);
@@ -344,7 +343,7 @@
SKOSScheme skosScheme = skosSchemes.get(s);
if (skosScheme != null) {
TreeMap<String, QName> topConceptIndex =
- skosScheme.getTopConceptIndex();
+ (TreeMap<String, QName>) skosScheme.getTopConceptIndex();
if (topConceptIndex != null) {
xmlString =
ConceptsResource.conceptTreeMapToXML(topConceptIndex);
@@ -383,7 +382,7 @@
SKOSScheme skosScheme = skosSchemes.get(s);
if (skosScheme != null) {
TreeMap<String, QName> topConceptIndex =
- skosScheme.getSubTopConceptIndex(startLetters);
+ (TreeMap<String, QName>)
skosScheme.getSubTopConceptIndex(startLetters);
if (topConceptIndex != null) {
xmlString =
ConceptsResource.conceptTreeMapToXML(topConceptIndex);