Revert "integrating related term info in skos utils"

This reverts commit 8f66b10323.
This commit is contained in:
Huda J. Khan 2018-02-07 18:39:58 -05:00
parent a978fa27e9
commit b8fd17ba1e
2 changed files with 56 additions and 129 deletions

View file

@ -1,4 +1,4 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */ /* $This file is distributed under the terms of the license in LICENSE$ */
/* We are no longer using the SKOS API since Vitro has moved to V 4.0 of OWL API which does not appear to be compatible. /* We are no longer using the SKOS API since Vitro has moved to V 4.0 of OWL API which does not appear to be compatible.
This file will contain methods used for reading SKOS as XML and parsing it for the properties This file will contain methods used for reading SKOS as XML and parsing it for the properties
@ -160,19 +160,13 @@ public class SKOSUtils {
// conceptURI); // conceptURI);
concept.setCloseMatchURIList(closeMatchURIList); concept.setCloseMatchURIList(closeMatchURIList);
// Notes may exist, in which case they should be employed // Notes may exist, in which case they should be employed
if (addNotes) { if (addNotes) {
List<String> notes = getNotesFromModel(conceptURI, model, langTagValue); List<String> notes = getNotesFromModel(conceptURI, model,
langTagValue);
if (notes.size() > 0) { if (notes.size() > 0) {
concept.setDefinition(notes.get(0)); concept.setDefinition(notes.get(0));
} }
} else { // get definitions from skos:definition
List<String> definitions = getDefinitionFromModel(conceptURI, model, langTagValue);
if (definitions.size() > 0) {
concept.setDefinition(definitions.get(0));
}
} }
} catch (Exception e) { } catch (Exception e) {
@ -225,17 +219,12 @@ public class SKOSUtils {
String propertyURI = "http://www.w3.org/2004/02/skos/core#note"; String propertyURI = "http://www.w3.org/2004/02/skos/core#note";
return getLabelsFromModel(conceptURI, propertyURI, model, langTagValue); return getLabelsFromModel(conceptURI, propertyURI, model, langTagValue);
} }
private static List<String> getDefinitionFromModel(String conceptURI,
Model model, String langTagValue) {
String propertyURI = "http://www.w3.org/2004/02/skos/core#definition";
return getLabelsFromModel(conceptURI, propertyURI, model, langTagValue);
}
private static List<String> getCloseMatchURIsFromModel(String conceptURI, private static List<String> getCloseMatchURIsFromModel(String conceptURI,
Model model) { Model model) {
String propertyURI = "http://www.w3.org/2004/02/skos/core#closeMatch"; String propertyURI = "http://www.w3.org/2004/02/skos/core#closeMatch";
return getRelatedURIsFromModel(conceptURI, propertyURI, model); return getRelatedURIsFromModel(conceptURI, propertyURI, model);
} }
private static List<String> getExactMatchURIsFromModel(String conceptURI, private static List<String> getExactMatchURIsFromModel(String conceptURI,

164
dependencies/pom.xml vendored
View file

@ -7,37 +7,37 @@
<groupId>org.vivoweb</groupId> <groupId>org.vivoweb</groupId>
<artifactId>vitro-dependencies</artifactId> <artifactId>vitro-dependencies</artifactId>
<version>1.10.0-beta2</version> <version>2.0.0-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<parent> <parent>
<groupId>org.vivoweb</groupId> <groupId>org.vivoweb</groupId>
<artifactId>vitro-project</artifactId> <artifactId>vitro-project</artifactId>
<version>1.10.0-beta2</version> <version>2.0.0-SNAPSHOT</version>
<relativePath>..</relativePath> <relativePath>..</relativePath>
</parent> </parent>
<name>Vitro Dependencies</name> <name>Vitro Dependencies</name>
<dependencies> <dependencies>
<dependency> <!-- Added for runtime, or just EasyMock -->
<!-- Added for runtime --> <!-- dependency>
<groupId>asm</groupId> <groupId>asm</groupId>
<artifactId>asm</artifactId> <artifactId>asm</artifactId>
<version>3.1</version> <version>3.1</version>
</dependency> </dependency -->
<dependency> <!-- Added for runtime, was 1.6 - was used by Pellet, still needed? -->
<!-- Added for runtime, was 1.6 --> <!-- dependency>
<groupId>com.github.ansell.aterms</groupId> <groupId>com.github.ansell.aterms</groupId>
<artifactId>aterm-java</artifactId> <artifactId>aterm-java</artifactId>
<version>1.8.2</version> <version>1.8.2</version>
</dependency> </dependency -->
<dependency> <!-- Added for runtime, used by Jackson databind, was used by EasyMock -->
<!-- Added for runtime --> <!-- dependency>
<groupId>cglib</groupId> <groupId>cglib</groupId>
<artifactId>cglib</artifactId> <artifactId>cglib</artifactId>
<version>2.2</version> <version>2.2</version>
</dependency> </dependency -->
<!-- Added for runtime --> <!-- Added for runtime -->
<!-- dependency> <!-- dependency>
<groupId>com.servlets</groupId> <groupId>com.servlets</groupId>
@ -68,37 +68,32 @@
<dependency> <dependency>
<groupId>com.ibm.icu</groupId> <groupId>com.ibm.icu</groupId>
<artifactId>icu4j</artifactId> <artifactId>icu4j</artifactId>
<version>3.4.4</version> <version>59.1</version>
</dependency>
<dependency>
<groupId>com.mchange</groupId>
<artifactId>c3p0</artifactId>
<version>0.9.5.2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.twelvemonkeys.imageio</groupId> <groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio-jpeg</artifactId> <artifactId>imageio-jpeg</artifactId>
<version>3.3.1</version> <version>3.3.2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.twelvemonkeys.imageio</groupId> <groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio-tiff</artifactId> <artifactId>imageio-tiff</artifactId>
<version>3.3.1</version> <version>3.3.2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.twelvemonkeys.servlet</groupId> <groupId>com.twelvemonkeys.servlet</groupId>
<artifactId>servlet</artifactId> <artifactId>servlet</artifactId>
<version>3.3.1</version> <version>3.3.2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>commons-dbcp</groupId> <groupId>org.apache.commons</groupId>
<artifactId>commons-dbcp</artifactId> <artifactId>commons-dbcp2</artifactId>
<version>1.4</version> <version>2.1.1</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>commons-fileupload</groupId> <groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId> <artifactId>commons-fileupload</artifactId>
<version>1.3.2</version> <version>1.3.3</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>commons-io</groupId> <groupId>commons-io</groupId>
@ -111,30 +106,15 @@
<artifactId>commons-lang3</artifactId> <artifactId>commons-lang3</artifactId>
<version>3.4</version> <version>3.4</version>
</dependency> </dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.2</version>
</dependency>
<dependency> <dependency>
<groupId>org.apache.commons</groupId> <groupId>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId> <artifactId>commons-collections4</artifactId>
<version>1.4</version> <version>4.1</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>1.4</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>mysql</groupId> <groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId> <artifactId>mysql-connector-java</artifactId>
<version>5.1.42</version> <version>6.0.6</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.sf.jga</groupId> <groupId>net.sf.jga</groupId>
@ -150,7 +130,7 @@
<dependency> <dependency>
<groupId>net.sf.saxon</groupId> <groupId>net.sf.saxon</groupId>
<artifactId>Saxon-HE</artifactId> <artifactId>Saxon-HE</artifactId>
<version>9.6.0-7</version> <version>9.8.0-4</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.sourceforge.owlapi</groupId> <groupId>net.sourceforge.owlapi</groupId>
@ -164,16 +144,17 @@
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<!-- OWLAPI should match the version used by JFact -->
<!-- Include all OWALPI JARs that are in the OSGi bundle --> <!-- Include all OWALPI JARs that are in the OSGi bundle -->
<dependency> <dependency>
<groupId>net.sourceforge.owlapi</groupId> <groupId>net.sourceforge.owlapi</groupId>
<artifactId>owlapi-api</artifactId> <artifactId>owlapi-api</artifactId>
<version>5.0.4</version> <version>5.1.1</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.sourceforge.owlapi</groupId> <groupId>net.sourceforge.owlapi</groupId>
<artifactId>owlapi-apibinding</artifactId> <artifactId>owlapi-apibinding</artifactId>
<version>5.0.4</version> <version>5.1.1</version>
<!-- Exclude rio binding as we don't use Sesame --> <!-- Exclude rio binding as we don't use Sesame -->
<exclusions> <exclusions>
<exclusion> <exclusion>
@ -182,67 +163,51 @@
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<dependency>
<groupId>org.semarglproject</groupId>
<artifactId>semargl-core</artifactId>
<version>0.6.1</version>
</dependency>
<dependency>
<groupId>org.semarglproject</groupId>
<artifactId>semargl-rdfa</artifactId>
<version>0.6.1</version>
</dependency>
<dependency>
<groupId>com.github.jsonld-java</groupId>
<artifactId>jsonld-java</artifactId>
<version>0.8.3</version>
</dependency>
<!-- Force updated Jackson core used by dependencies, otherwise we get an incompatible version -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.7.4</version>
</dependency>
<!-- Needed for ORCID? -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>fluent-hc</artifactId>
<version>4.5.2</version>
</dependency>
<dependency> <dependency>
<groupId>org.apache.httpcomponents</groupId> <groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId> <artifactId>httpclient</artifactId>
<version>4.5.2</version> <version>4.5.3</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.httpcomponents</groupId> <groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId> <artifactId>httpmime</artifactId>
<version>4.5.2</version> <version>4.5.3</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.jena</groupId> <groupId>org.apache.jena</groupId>
<artifactId>jena-arq</artifactId> <artifactId>jena-arq</artifactId>
<version>3.3.0</version> <version>3.4.0</version>
<exclusions>
<!-- Exclude OSGi bundles from jsonld-java -->
<exclusion>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient-osgi</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore-osgi</artifactId>
</exclusion>
</exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.jena</groupId> <groupId>org.apache.jena</groupId>
<artifactId>jena-core</artifactId> <artifactId>jena-core</artifactId>
<version>3.3.0</version> <version>3.4.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.jena</groupId> <groupId>org.apache.jena</groupId>
<artifactId>jena-sdb</artifactId> <artifactId>jena-sdb</artifactId>
<version>3.3.0</version> <version>3.4.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.jena</groupId> <groupId>org.apache.jena</groupId>
<artifactId>jena-tdb</artifactId> <artifactId>jena-tdb</artifactId>
<version>3.3.0</version> <version>3.4.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.solr</groupId> <groupId>org.apache.solr</groupId>
<artifactId>solr-solrj</artifactId> <artifactId>solr-solrj</artifactId>
<version>4.7.2</version> <version>4.10.4</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.directwebremoting</groupId> <groupId>org.directwebremoting</groupId>
@ -254,30 +219,15 @@
<artifactId>freemarker</artifactId> <artifactId>freemarker</artifactId>
<version>2.3.23</version> <version>2.3.23</version>
</dependency> </dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.json</artifactId>
<version>1.0.4</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>jtidy</artifactId>
<version>r8-20060801</version>
</dependency>
<dependency> <dependency>
<groupId>org.jsoup</groupId> <groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId> <artifactId>jsoup</artifactId>
<version>1.10.1</version> <version>1.10.3</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.owasp.antisamy</groupId> <groupId>org.owasp.antisamy</groupId>
<artifactId>antisamy</artifactId> <artifactId>antisamy</artifactId>
<version>1.5.3</version> <version>1.5.6</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.5</version>
</dependency> </dependency>
<!-- Used for JSP runtime --> <!-- Used for JSP runtime -->
@ -289,30 +239,18 @@
<dependency> <dependency>
<groupId>org.apache.taglibs</groupId> <groupId>org.apache.taglibs</groupId>
<artifactId>taglibs-standard-spec</artifactId> <artifactId>taglibs-standard-spec</artifactId>
<version>1.2.1</version> <version>1.2.5</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.taglibs</groupId> <groupId>org.apache.taglibs</groupId>
<artifactId>taglibs-standard-impl</artifactId> <artifactId>taglibs-standard-impl</artifactId>
<version>1.2.1</version> <version>1.2.5</version>
</dependency> </dependency>
<!-- dependency>
<groupId>javax.json</groupId>
<artifactId>javax.json-api</artifactId>
<version>1.0</version>
</dependency -->
<dependency> <dependency>
<groupId>javax.mail</groupId> <groupId>com.sun.mail</groupId>
<artifactId>mail</artifactId> <artifactId>javax.mail</artifactId>
<version>1.4</version> <version>1.6.0</version>
</dependency>
<!-- Data Distribution API -->
<dependency>
<groupId>edu.cornell.library.scholars</groupId>
<artifactId>DataDistributionAPI_VIVO_1.10.0</artifactId>
<version>1.0</version>
<type>jar</type>
</dependency> </dependency>
</dependencies> </dependencies>
</project> </project>