Merge branch 'develop' into feature/theming

This commit is contained in:
Graham Triggs 2017-02-15 19:27:47 +00:00
commit 1774a07ffa
226 changed files with 20153 additions and 24054 deletions

5
.gitignore vendored
View file

@ -17,3 +17,8 @@ utilities/rdbmigration/.work
**/target **/target
**/overlays **/overlays
# Eclipse artifacts
**/.settings
**/.classpath
**/.project

View file

@ -1,13 +1,20 @@
language: java language: java
dist: trusty
sudo: false sudo: false
jdk: jdk:
- openjdk8
- oraclejdk8 - oraclejdk8
env: env:
# Give Maven 1GB of memory to work with # Give Maven 1GB of memory to work with
- MAVEN_OPTS=-Xmx1024M - MAVEN_OPTS=-Xmx1024M
cache:
directories:
- .autoconf
- $HOME/.m2
install: install:
- git clone https://github.com/vivo-project/Vitro.git ../Vitro - git clone https://github.com/vivo-project/Vitro.git ../Vitro

View file

@ -7,13 +7,13 @@
<groupId>org.vivoweb</groupId> <groupId>org.vivoweb</groupId>
<artifactId>vivo-api</artifactId> <artifactId>vivo-api</artifactId>
<version>1.9.0-SNAPSHOT</version> <version>1.10.0-SNAPSHOT</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<parent> <parent>
<groupId>org.vivoweb</groupId> <groupId>org.vivoweb</groupId>
<artifactId>vivo-project</artifactId> <artifactId>vivo-project</artifactId>
<version>1.9.0-SNAPSHOT</version> <version>1.10.0-SNAPSHOT</version>
<relativePath>..</relativePath> <relativePath>..</relativePath>
</parent> </parent>
@ -30,16 +30,6 @@
<type>pom</type> <type>pom</type>
</dependency> </dependency>
<dependency>
<groupId>axis</groupId>
<artifactId>axis</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>1.4</version>
</dependency>
<dependency> <dependency>
<groupId>com.itextpdf</groupId> <groupId>com.itextpdf</groupId>
<artifactId>itextpdf</artifactId> <artifactId>itextpdf</artifactId>
@ -56,11 +46,6 @@
<version>2.5.6</version> <version>2.5.6</version>
</dependency> </dependency>
<dependency>
<groupId>org.vivoweb.dependencies</groupId>
<artifactId>agrovocws</artifactId>
<version>3.0</version>
</dependency>
<dependency> <dependency>
<groupId>org.vivoweb.dependencies</groupId> <groupId>org.vivoweb.dependencies</groupId>
<artifactId>oim.vivo.scimapcore</artifactId> <artifactId>oim.vivo.scimapcore</artifactId>
@ -84,6 +69,11 @@
<version>2.0</version> <version>2.0</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency>
<groupId>javax.xml</groupId>
<artifactId>jaxrpc</artifactId>
<version>1.1</version>
</dependency>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>

View file

@ -1,25 +0,0 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
package edu.cornell.mannlib.semservices.bo;
public class BaseObject {
/**
* Simple JavaBean domain object with an id property.
* Used as a base class for objects needing this property.
*/
private Integer id;
public void setId(Integer id) {
this.id = id;
}
public Integer getId() {
return id;
}
public boolean isNew() {
return (this.id == null);
}
}

View file

@ -1,163 +0,0 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
package edu.cornell.mannlib.semservices.bo;
import java.util.ArrayList;
import java.util.List;
public class Concept {
private String definedBy;
private String conceptId;
private String bestMatch;
private String label;
private String type;
private String definition;
private String uri;
private String schemeURI;
private List<String> broaderURIList;
private List<String> narrowerURIList;
private List<String> exactMatchURIList;
private List<String> closeMatchURIList;
private List<String> altLabelList;
/**
* default constructor
*/
public Concept() {
this.broaderURIList = new ArrayList<String>();
this.narrowerURIList = new ArrayList<String>();
this.exactMatchURIList = new ArrayList<String>();
this.closeMatchURIList = new ArrayList<String>();
}
/**
* @return the conceptId
*/
public String getConceptId() {
return conceptId;
}
/**
* @param conceptId the conceptId to set
*/
public void setConceptId(String conceptId) {
this.conceptId = conceptId;
}
/**
* @return the label
*/
public String getLabel() {
return label;
}
/**
* @param label the label to set
*/
public void setLabel(String label) {
this.label = label;
}
/**
* @return the type
*/
public String getType() {
return type;
}
/**
* @param type the type to set
*/
public void setType(String type) {
this.type = type;
}
/**
* @return the definition
*/
public String getDefinition() {
return definition;
}
/**
* @param definition the definition to set
*/
public void setDefinition(String definition) {
this.definition = definition;
}
/**
* @return the uri
*/
public String getUri() {
return uri;
}
/**
* @param uri the uri to set
*/
public void setUri(String uri) {
this.uri = uri;
}
/**
* @return the definedBy
*/
public String getDefinedBy() {
return definedBy;
}
/**
* @param definedBy the definedBy to set
*/
public void setDefinedBy(String definedBy) {
this.definedBy = definedBy;
}
/**
* @return the schemeURI
*/
public String getSchemeURI() {
return schemeURI;
}
/**
* @param schemeURI the schemeURI to set
*/
public void setSchemeURI(String schemeURI) {
this.schemeURI = schemeURI;
}
/**
* @return the bestMatch
*/
public String getBestMatch() {
return bestMatch;
}
/**
* @param bestMatch the bestMatch to set
*/
public void setBestMatch(String bestMatch) {
this.bestMatch = bestMatch;
}
public List<String> getBroaderURIList() {
return broaderURIList;
}
public void setBroaderURIList(List<String> broaderURIList) {
this.broaderURIList = broaderURIList;
}
public List<String> getNarrowerURIList() {
return narrowerURIList;
}
public void setNarrowerURIList(List<String> narrowerURIList) {
this.narrowerURIList = narrowerURIList;
}
public List<String> getExactMatchURIList() {
return exactMatchURIList;
}
public void setExactMatchURIList(List<String> exactMatchURIList) {
this.exactMatchURIList = exactMatchURIList;
}
public List<String> getCloseMatchURIList() {
return closeMatchURIList;
}
public void setCloseMatchURIList(List<String> closeMatchURIList) {
this.closeMatchURIList = closeMatchURIList;
}
public List<String> getAltLabelList() {
return altLabelList;
}
public void setAltLabelList(List<String> altLabelList) {
this.altLabelList = altLabelList;
}
}

View file

@ -1,32 +0,0 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
package edu.cornell.mannlib.semservices.bo;
import java.util.List;
public class ConceptInfo extends SemanticServicesInfoBase {
private List<?> conceptList;
/**
*
*/
public ConceptInfo() {
super();
}
/**
* @return the conceptList
*/
public List<?> getConceptList() {
return conceptList;
}
/**
* @param conceptList the conceptList to set
*/
public void setConceptList(List<?> conceptList) {
this.conceptList = conceptList;
}
}

View file

@ -1,75 +0,0 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
package edu.cornell.mannlib.semservices.bo;
public class SemanticServicesError {
private String message;
private String exception;
private String severity;
/**
*
*/
public SemanticServicesError() {
super();
}
/**
* @param exception Exception description
* @param message Error message
* @param severity Severity
*/
public SemanticServicesError(String exception, String message, String severity) {
super();
this.exception = exception;
this.message = message;
this.severity = severity;
}
/**
* @return the message
*/
public String getMessage() {
return message;
}
/**
* @param message the message to set
*/
public void setMessage(String message) {
this.message = message;
}
/**
* @return the exception
*/
public String getException() {
return exception;
}
/**
* @param exception the exception to set
*/
public void setException(String exception) {
this.exception = exception;
}
/**
* @return the severity
*/
public String getSeverity() {
return severity;
}
/**
* @param severity the severity to set
*/
public void setSeverity(String severity) {
this.severity = severity;
}
}

View file

@ -1,29 +0,0 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
package edu.cornell.mannlib.semservices.bo;
public class SemanticServicesInfoBase {
private SemanticServicesError semanticServicesError;
/**
*
*/
public SemanticServicesInfoBase() {
super();
// TODO Auto-generated constructor stub
}
/**
* @return the semanticServicesError
*/
public SemanticServicesError getSemanticServicesError() {
return semanticServicesError;
}
/**
* @param semanticServicesError the semanticServicesError to set
*/
public void setSemanticServicesError(SemanticServicesError semanticServicesError) {
this.semanticServicesError = semanticServicesError;
}
}

View file

@ -1,15 +0,0 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
package edu.cornell.mannlib.semservices.exceptions;
public class ConceptsNotFoundException extends Exception {
/**
* An exception that indicates a service could not find a Concept
*/
private static final long serialVersionUID = -4729465393290022840L;
public ConceptsNotFoundException() { }
public ConceptsNotFoundException(String message) { super(message); }
public ConceptsNotFoundException(Throwable cause) { super(cause); }
public ConceptsNotFoundException(String message, Throwable cause) { super(message, cause); }
}

View file

@ -1,27 +0,0 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
package edu.cornell.mannlib.semservices.service;
import java.util.List;
import edu.cornell.mannlib.semservices.bo.Concept;
public interface ExternalConceptService {
/**
* @param term Term
*/
List<Concept> processResults(String term) throws Exception;
/**
* @param term Term
* @throws Exception
*/
List<Concept> getConcepts(String term) throws Exception;
/**
* @param uri URI
*/
List<Concept> getConceptsByURIWithSparql(String uri) throws Exception;
}

View file

@ -17,6 +17,7 @@ import java.util.HashSet;
import java.util.Iterator; import java.util.Iterator;
import java.util.LinkedHashSet; import java.util.LinkedHashSet;
import java.util.List; import java.util.List;
import java.util.concurrent.TimeUnit;
import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.ParserConfigurationException;
import javax.xml.rpc.ServiceException; import javax.xml.rpc.ServiceException;
@ -25,11 +26,9 @@ import net.sf.json.JSONArray;
import net.sf.json.JSONObject; import net.sf.json.JSONObject;
import net.sf.json.JSONSerializer; import net.sf.json.JSONSerializer;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.fao.www.webservices.AgrovocWS.ACSWWebService;
import org.fao.www.webservices.AgrovocWS.ACSWWebServiceServiceLocator;
import org.w3c.dom.Attr; import org.w3c.dom.Attr;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap; import org.w3c.dom.NamedNodeMap;
@ -56,7 +55,6 @@ import edu.cornell.mannlib.vitro.webapp.web.URLEncoder;
public class AgrovocService implements ExternalConceptService { public class AgrovocService implements ExternalConceptService {
protected final Log logger = LogFactory.getLog(getClass()); protected final Log logger = LogFactory.getLog(getClass());
private java.lang.String AgrovocWS_address = "http://agrovoc.fao.org/axis/services/SKOSWS";
private final String schemeUri = "http://aims.fao.org/aos/agrovoc/agrovocScheme"; private final String schemeUri = "http://aims.fao.org/aos/agrovoc/agrovocScheme";
private final String ontologyName = "agrovoc"; private final String ontologyName = "agrovoc";
private final String format = "SKOS"; private final String format = "SKOS";
@ -136,9 +134,8 @@ public class AgrovocService implements ExternalConceptService {
if (closeMatch.startsWith("http://dbpedia.org")) { if (closeMatch.startsWith("http://dbpedia.org")) {
try { try {
String description = getDbpediaDescription(closeMatch); String description = getDbpediaDescription(closeMatch);
// System.out.println("description: "+ description); c.setDefinition(description);
c.setDefinition(description);
} catch (Exception ex) { } catch (Exception ex) {
logger.error("An error occurred in the process of retrieving dbpedia description", ex); logger.error("An error occurred in the process of retrieving dbpedia description", ex);
} }
@ -190,153 +187,6 @@ public class AgrovocService implements ExternalConceptService {
return concept; return concept;
} }
@Deprecated
protected String getTermcodeByTerm(String term) throws Exception {
String result = new String();
ACSWWebServiceServiceLocator locator = new ACSWWebServiceServiceLocator();
try {
URL url = new URL(AgrovocWS_address);
ACSWWebService agrovoc_service = locator.getACSWWebService(url);
result = agrovoc_service.getTermcodeByTerm(term);
} catch (ServiceException e) {
logger.error("service exception", e);
throw e;
} catch (RemoteException e) {
logger.error("remote exception", e);
throw e;
} catch (MalformedURLException e) {
logger.error("malformed URL exception", e);
throw e;
}
return result;
}
protected String getTermCodeByTermAndLangXML(String ontologyName,
String searchString, String lang, String codeName, String format) {
String result = new String();
ACSWWebServiceServiceLocator locator = new ACSWWebServiceServiceLocator();
try {
URL url = new URL(AgrovocWS_address);
ACSWWebService agrovoc_service = locator.getACSWWebService(url);
result = agrovoc_service.getTermCodeByTermAndLangXML(ontologyName,
searchString, lang, codeName, format);
} catch (ServiceException e) {
logger.error("service exception", e);
e.printStackTrace();
} catch (RemoteException e) {
e.printStackTrace();
} catch (MalformedURLException e) {
e.printStackTrace();
}
return result;
}
protected String getURIByTermAndLangXML(String ontologyName, String term,
String searchMode, String format, String lang) {
String result = new String();
ACSWWebServiceServiceLocator locator = new ACSWWebServiceServiceLocator();
try {
URL url = new URL(AgrovocWS_address);
ACSWWebService agrovoc_service = locator.getACSWWebService(url);
result = agrovoc_service.getURIByTermAndLangXML(ontologyName, term,
searchMode, format, lang);
} catch (ServiceException e) {
e.printStackTrace();
} catch (RemoteException e) {
e.printStackTrace();
} catch (MalformedURLException e) {
e.printStackTrace();
}
return result;
}
// Creating method for term expansion
protected String getTermExpansion(String ontologyName, String term,
String searchMode, String format, String lang) {
String result = new String();
ACSWWebServiceServiceLocator locator = new ACSWWebServiceServiceLocator();
try {
URL url = new URL(AgrovocWS_address);
ACSWWebService agrovoc_service = locator.getACSWWebService(url);
result = agrovoc_service.getTermExpansion(ontologyName, term,
format, searchMode, lang); // the actual call has this order
// for parameters
} catch (ServiceException e) {
e.printStackTrace();
} catch (RemoteException e) {
e.printStackTrace();
} catch (MalformedURLException e) {
e.printStackTrace();
}
return result;
}
protected String getConceptInfoByTermcodeXML(String termcode, String format) {
String result = new String();
ACSWWebServiceServiceLocator locator = new ACSWWebServiceServiceLocator();
try {
URL url = new URL(AgrovocWS_address);
ACSWWebService agrovoc_service = locator.getACSWWebService(url);
result = agrovoc_service.getConceptInfoByTermcodeXML(termcode,
format);
} catch (ServiceException e) {
logger.error("service exception", e);
e.printStackTrace();
} catch (RemoteException e) {
e.printStackTrace();
} catch (MalformedURLException e) {
e.printStackTrace();
}
return result;
}
protected String getConceptByKeyword(String ontologyName,
String searchString, String format, String searchMode, String lang) {
String result = new String();
ACSWWebServiceServiceLocator locator = new ACSWWebServiceServiceLocator();
try {
URL url = new URL(AgrovocWS_address);
ACSWWebService agrovoc_service = locator.getACSWWebService(url);
result = agrovoc_service.getConceptByKeyword(ontologyName,
searchString, format, searchMode, lang);
} catch (ServiceException e) {
logger.error("service exception", e);
e.printStackTrace();
} catch (RemoteException e) {
e.printStackTrace();
} catch (MalformedURLException e) {
e.printStackTrace();
}
return result;
}
protected String getWsdl() {
String result = new String();
try {
StringWriter sw = new StringWriter();
URL rss = new URL(this.AgrovocWS_address + "?wsdl");
BufferedReader in = new BufferedReader(new InputStreamReader(
rss.openStream()));
String inputLine;
while ((inputLine = in.readLine()) != null) {
sw.write(inputLine);
}
in.close();
result = sw.toString();
} catch (Exception ex) {
logger.error("error occurred in servlet", ex);
}
return result;
}
public List<Concept> getConceptsByURIWithSparql(String uri) public List<Concept> getConceptsByURIWithSparql(String uri)
throws Exception { throws Exception {
// deprecating this method...just return an empty list // deprecating this method...just return an empty list
@ -440,8 +290,8 @@ public class AgrovocService implements ExternalConceptService {
try { try {
Query query = QueryFactory.create(qs); Query query = QueryFactory.create(qs);
qexec = QueryExecutionFactory.sparqlService(this.dbpedia_endpoint, qexec = QueryExecutionFactory.sparqlService(this.dbpedia_endpoint, query);
query); qexec.setTimeout(5000, TimeUnit.MILLISECONDS);
resultList = new ArrayList<HashMap>(); resultList = new ArrayList<HashMap>();
ResultSet resultSet = qexec.execSelect(); ResultSet resultSet = qexec.execSelect();
int resultSetSize = 0; int resultSetSize = 0;
@ -501,28 +351,6 @@ public class AgrovocService implements ExternalConceptService {
} }
} }
// Get concept using agrovoc service
protected String getConceptInfoByURI(String ontologyName,
String conceptURI, String format) {
String result = new String();
ACSWWebServiceServiceLocator locator = new ACSWWebServiceServiceLocator();
try {
URL url = new URL(AgrovocWS_address);
ACSWWebService agrovoc_service = locator.getACSWWebService(url);
result = agrovoc_service.getConceptByURI(ontologyName, conceptURI,
format);
} catch (ServiceException e) {
logger.error("service exception", e);
e.printStackTrace();
} catch (RemoteException e) {
e.printStackTrace();
} catch (MalformedURLException e) {
e.printStackTrace();
}
return result;
}
/** /**
* The code here utilizes the SKOSMOS REST API for Agrovoc * The code here utilizes the SKOSMOS REST API for Agrovoc
* This returns JSON LD so we would parse JSON instead of RDF * This returns JSON LD so we would parse JSON instead of RDF

View file

@ -24,7 +24,7 @@ import edu.cornell.mannlib.semservices.service.ExternalConceptService;
public class GemetService implements ExternalConceptService { public class GemetService implements ExternalConceptService {
protected final Log logger = LogFactory.getLog(getClass()); protected final Log logger = LogFactory.getLog(getClass());
private final String GemetWS_address = "http://www.eionet.europa.eu/gemet/"; private final String GemetWS_address = "https://www.eionet.europa.eu/gemet/";
private final String narrowerUri = "http://www.w3.org/2004/02/skos/core%23narrower"; private final String narrowerUri = "http://www.w3.org/2004/02/skos/core%23narrower";
private final String broaderUri = "http://www.w3.org/2004/02/skos/core%23broader"; private final String broaderUri = "http://www.w3.org/2004/02/skos/core%23broader";
private final String relatedUri = "http://www.w3.org/2004/02/skos/core%23related"; private final String relatedUri = "http://www.w3.org/2004/02/skos/core%23related";

View file

@ -18,7 +18,7 @@ import javax.xml.parsers.ParserConfigurationException;
import net.sf.json.JSONObject; import net.sf.json.JSONObject;
import net.sf.json.JSONSerializer; import net.sf.json.JSONSerializer;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.w3c.dom.Attr; import org.w3c.dom.Attr;
@ -49,7 +49,7 @@ public class LCSHService implements ExternalConceptService {
String results = null; String results = null;
String dataUrl = baseUri + "?q=" + URLEncoder.encode(term, "UTF-8") String dataUrl = baseUri + "?q=" + URLEncoder.encode(term, "UTF-8")
+ "&q=cs%3Ahttp%3A%2F%2Fid.loc.gov%2Fauthorities%2Fsubjects" + "&q=cs%3Ahttp%3A%2F%2Fid.loc.gov%2Fauthorities%2Fsubjects"
+ "&format=XML"; + "&format=atom";
log.debug("dataURL " + dataUrl); log.debug("dataURL " + dataUrl);
try { try {
@ -81,7 +81,7 @@ public class LCSHService implements ExternalConceptService {
return conceptList; return conceptList;
} }
// Results are in json format (atom) - atom entries need to be extracted // Results are in XML format (atom) - atom entries need to be extracted
// retrieve the URIs and get the SKOS version of the entry, getting broader // retrieve the URIs and get the SKOS version of the entry, getting broader
// and narrower terms as applicable as well as any description (skos:note) // and narrower terms as applicable as well as any description (skos:note)
// that might exist // that might exist
@ -99,7 +99,7 @@ public class LCSHService implements ExternalConceptService {
//This is the URL for retrieving the concept - the pattern is http://id.loc.gov/authorities/subjects/sh85014203.skos.rdf //This is the URL for retrieving the concept - the pattern is http://id.loc.gov/authorities/subjects/sh85014203.skos.rdf
//This is not the URI itself which would be http://id.loc.gov/authorities/subjects/sh85014203 //This is not the URI itself which would be http://id.loc.gov/authorities/subjects/sh85014203
String conceptURLString = getSKOSURL(uri); String conceptURLString = getSKOSURL(uri);
String baseConceptURI = getConceptURI(uri); String baseConceptURI = uri;
URL conceptURL = null; URL conceptURL = null;
try { try {
conceptURL = new URL(conceptURLString); conceptURL = new URL(conceptURLString);
@ -154,23 +154,12 @@ public class LCSHService implements ExternalConceptService {
private String getSKOSURL(String uri) { private String getSKOSURL(String uri) {
// Strip .xml at the end and replace with .skos.rdf String skosURI = uri + skosSuffix;
String skosURI = uri;
if (uri.endsWith(".xml")) { return skosURI;
skosURI = uri.substring(0, uri.length() - 4);
skosURI += skosSuffix;
}
return hostUri + skosURI;
} }
//Given the URI from the xml, get just the base URI
private String getConceptURI(String uri) {
String skosURI = uri;
if (uri.endsWith(".xml")) {
skosURI = uri.substring(0, uri.length() - 4);
}
return hostUri + skosURI;
}
public List<String> getConceptURISFromJSON(String results) { public List<String> getConceptURISFromJSON(String results) {
List<String> uris = new ArrayList<String>(); List<String> uris = new ArrayList<String>();
@ -192,14 +181,25 @@ public class LCSHService implements ExternalConceptService {
String conceptUri = new String(); String conceptUri = new String();
try { try {
Document doc = XMLUtils.parse(rdf); Document doc = XMLUtils.parse(rdf);
NodeList nodes = doc.getElementsByTagName("search:result"); NodeList nodes = doc.getElementsByTagName("entry");
int len = nodes.getLength(); int len = nodes.getLength();
int i; int i, j;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
Node node = nodes.item(i); Node node = nodes.item(i);
NamedNodeMap attrs = node.getAttributes(); NodeList childNodes = node.getChildNodes();
Attr idAttr = (Attr) attrs.getNamedItem("uri"); for(j = 0; j < childNodes.getLength(); j++) {
conceptUri = idAttr.getTextContent(); Node childNode = childNodes.item(j);
if(childNode.getNodeName().equals("link")) {
NamedNodeMap attrs = childNode.getAttributes();
Attr hrefAttr = (Attr) attrs.getNamedItem("href");
//if type doesn't exist, this is the direct URL without extension
if((hrefAttr != null) && ((Attr)attrs.getNamedItem("type") == null)) {
conceptUri = hrefAttr.getTextContent();
}
}
}
log.debug("concept uri is " + conceptUri); log.debug("concept uri is " + conceptUri);
uris.add(conceptUri); uris.add(conceptUri);
} }
@ -250,10 +250,4 @@ public class LCSHService implements ExternalConceptService {
} }
} }

View file

@ -1,26 +0,0 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
package edu.cornell.mannlib.semservices.util;
import java.util.Iterator;
import javax.xml.XMLConstants;
import javax.xml.namespace.NamespaceContext;
public class MetadataNamespaceContext implements NamespaceContext {
public String getNamespaceURI(String prefix) {
if (prefix == null) throw new NullPointerException("Null prefix");
else if ("mix".equals(prefix)) return "http://www.loc.gov/mix/";
else if ("xml".equals(prefix)) return XMLConstants.XML_NS_URI;
return XMLConstants.NULL_NS_URI;
}
// This method isn't necessary for XPath processing.
public String getPrefix(String uri) {
throw new UnsupportedOperationException();
}
// This method isn't necessary for XPath processing either.
public Iterator getPrefixes(String uri) {
throw new UnsupportedOperationException();
}
}

View file

@ -1,266 +0,0 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
/* 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
we want to extract*/
package edu.cornell.mannlib.semservices.util;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.StringReader;
import java.io.StringWriter;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.jena.rdf.model.Model;
import org.apache.jena.rdf.model.ModelFactory;
import org.apache.jena.rdf.model.NodeIterator;
import org.apache.jena.rdf.model.RDFNode;
import org.apache.jena.rdf.model.ResourceFactory;
import org.apache.jena.rdf.model.Statement;
import org.apache.jena.rdf.model.StmtIterator;
import edu.cornell.mannlib.semservices.bo.Concept;
public class SKOSUtils {
protected final static Log log = LogFactory.getLog(SKOSUtils.class);
public static String getConceptXML(String conceptUriString) {
URL conceptURL = null;
try {
conceptURL = new URL(conceptUriString);
} catch (Exception e) {
log.error("Exception occurred in instantiating URL for "
+ conceptUriString, e);
// If the url is having trouble, just return null for the concept
return null;
}
log.debug("loading concept uri " + conceptUriString);
String results = null;
try {
StringWriter sw = new StringWriter();
BufferedReader in = new BufferedReader(new InputStreamReader(
conceptURL.openStream()));
String inputLine;
while ((inputLine = in.readLine()) != null) {
sw.write(inputLine);
}
in.close();
results = sw.toString();
log.debug(results);
} catch (Exception ex) {
log.error("Error occurred in getting concept from the URL "
+ conceptUriString, ex);
return null;
}
return results;
}
// Downloading the XML from the URI itself
// No language tag support here but can be specified if need be at this
// level as well
public static Concept createConceptUsingXMLFromURL(Concept concept,
String conceptURLString, String langTagValue, boolean addNotes) {
String results = getConceptXML(conceptURLString);
if (StringUtils.isEmpty(results)) {
return null;
}
// return createConceptUsingXML(concept, results, langTagValue);
return createConceptUsingXMLModel(concept, results, langTagValue,
addNotes);
}
// Because of the fact the xml returns matches by tag name, and the XML may
// look like <skos:narrower><skos:Concept ..><skos:broader
// rdf:resource:"conceptURI">
// where conceptURI is the concept that is the subject of skos:narrower, we
// need to ensure we are not returning the same uri as that of the main
// concept
public static List<String> removeConceptURIFromList(List<String> uris,
String conceptURI) {
// remove will return a boolean if the value exists in the list and is
// removed
// if/when it returns false, the URI is not in the list
while (uris.remove(conceptURI)) {
}
;
return uris;
}
/**
* The above code, although functional, does not take advantage of the fact
* that we can actually read and query the RDF in precisely the manner we
* wish.
*/
public static Concept createConceptUsingXMLModel(Concept concept,
String results, String langTagValue, boolean addNotes) {
try {
String conceptURI = concept.getUri();
// Load Model from RDF
StringReader reader = new StringReader(results);
Model model = ModelFactory.createDefaultModel();
model.read(reader, null, "RDF/XML");
// Execute the following query to get the information we want for
// this resource
// Preferred label
List<String> labelLiterals = getPrefLabelsFromModel(conceptURI,
model, langTagValue);
if (labelLiterals.size() > 0) {
concept.setLabel(labelLiterals.get(0));
} else {
// This is an error because there should be at least one label
// returned
log.debug("The number of preferred labels is not greater than zero");
}
// Alternate label
List<String> altLabelList = getAltLabelsFromModel(conceptURI,
model, langTagValue);
concept.setAltLabelList(altLabelList);
// Broder, narrower, exact match, and close match properties
List<String> broaderURIList = getBroaderURIsFromModel(conceptURI,
model);
// broaderURIList = removeConceptURIFromList(broaderURIList,
// conceptURI);
concept.setBroaderURIList(broaderURIList);
List<String> narrowerURIList = getNarrowerURIsFromModel(conceptURI,
model);
// narrowerURIList = removeConceptURIFromList(narrowerURIList,
// conceptURI);
concept.setNarrowerURIList(narrowerURIList);
List<String> exactMatchURIList = getExactMatchURIsFromModel(
conceptURI, model);
// exactMatchURIList = removeConceptURIFromList(exactMatchURIList,
// conceptURI);
concept.setExactMatchURIList(exactMatchURIList);
List<String> closeMatchURIList = getCloseMatchURIsFromModel(
conceptURI, model);
// closeMatchURIList = removeConceptURIFromList(closeMatchURIList,
// conceptURI);
concept.setCloseMatchURIList(closeMatchURIList);
// Notes may exist, in which case they should be employed
if (addNotes) {
List<String> notes = getNotesFromModel(conceptURI, model,
langTagValue);
if (notes.size() > 0) {
concept.setDefinition(notes.get(0));
}
}
} catch (Exception e) {
log.error("error occurred in parsing " + results, e);
}
return concept;
}
private static List<String> getPrefLabelsFromModel(String conceptURI,
Model model, String langTagValue) {
String propertyURI = "http://www.w3.org/2004/02/skos/core#prefLabel";
return getLabelsFromModel(conceptURI, propertyURI, model, langTagValue);
}
private static List<String> getAltLabelsFromModel(String conceptURI,
Model model, String langTagValue) {
String propertyURI = "http://www.w3.org/2004/02/skos/core#altLabel";
return getLabelsFromModel(conceptURI, propertyURI, model, langTagValue);
}
private static List<String> getLabelsFromModel(String conceptURI,
String propertyURI, Model model, String langTagValue) {
List<String> labels = new ArrayList<String>();
StmtIterator statements = model.listStatements(
ResourceFactory.createResource(conceptURI),
ResourceFactory.createProperty(propertyURI), (RDFNode) null);
while (statements.hasNext()) {
Statement statement = statements.nextStatement();
RDFNode node = statement.getObject();
if (node != null && node.isLiteral()) {
String label = node.asLiteral().getString();
if (StringUtils.isNotEmpty(langTagValue)) {
String language = node.asLiteral().getLanguage();
if (language != null && language.equals(langTagValue)) {
labels.add(label);
}
} else {
labels.add(label);
}
}
}
return labels;
}
private static List<String> getNotesFromModel(String conceptURI,
Model model, String langTagValue) {
String propertyURI = "http://www.w3.org/2004/02/skos/core#note";
return getLabelsFromModel(conceptURI, propertyURI, model, langTagValue);
}
private static List<String> getCloseMatchURIsFromModel(String conceptURI,
Model model) {
String propertyURI = "http://www.w3.org/2004/02/skos/core#closeMatch";
return getRelatedURIsFromModel(conceptURI, propertyURI, model);
}
private static List<String> getExactMatchURIsFromModel(String conceptURI,
Model model) {
String propertyURI = "http://www.w3.org/2004/02/skos/core#exactMatch";
return getRelatedURIsFromModel(conceptURI, propertyURI, model);
}
private static List<String> getNarrowerURIsFromModel(String conceptURI,
Model model) {
String propertyURI = "http://www.w3.org/2004/02/skos/core#narrower";
return getRelatedURIsFromModel(conceptURI, propertyURI, model);
}
private static List<String> getBroaderURIsFromModel(String conceptURI,
Model model) {
String propertyURI = "http://www.w3.org/2004/02/skos/core#broader";
return getRelatedURIsFromModel(conceptURI, propertyURI, model);
}
private static List<String> getRelatedURIsFromModel(String conceptURI,
String propertyURI, Model model) {
List<String> URIs = new ArrayList<String>();
NodeIterator nodeIterator = model.listObjectsOfProperty(
ResourceFactory.createResource(conceptURI),
ResourceFactory.createProperty(propertyURI));
while (nodeIterator.hasNext()) {
RDFNode node = nodeIterator.nextNode();
if (node.isResource() && node.asResource().getURI() != null) {
String URI = node.asResource().getURI();
URIs.add(URI);
}
}
return URIs;
}
}

View file

@ -1,361 +0,0 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
package edu.cornell.mannlib.semservices.util;
import java.io.BufferedWriter;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStreamWriter;
import java.io.StringReader;
import java.io.StringWriter;
import java.io.Writer;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.TransformerFactoryConfigurationError;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpressionException;
import javax.xml.xpath.XPathFactory;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.w3c.dom.Document;
import org.w3c.dom.DocumentType;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
/**
* Convenience Class to parse XML strings to DOM Document for XML contents
* retrieval.
*/
public class XMLUtils {
private static DocumentBuilder parser;
public static Writer writer;
static private String indent = "";
protected static final Log logger = LogFactory.getLog(XMLUtils.class);
/**
* @throws ParserConfigurationException
*/
public static DocumentBuilder getDocumentBuilder()
throws ParserConfigurationException {
if (parser == null) {
// JPT: Remove xerces use
DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory
.newInstance();
documentBuilderFactory.setNamespaceAware(true);
documentBuilderFactory.setValidating(false);
parser = documentBuilderFactory.newDocumentBuilder();
}
return parser;
}
/**
* @param xmlString XML String
* @throws IOException
* @throws SAXException
* @throws ParserConfigurationException
*/
public synchronized static Document parse(String xmlString)
throws IOException, SAXException, ParserConfigurationException {
StringReader reader = new StringReader(xmlString);
InputSource inputSource = new InputSource(reader);
return getDocumentBuilder().parse(inputSource);
}
/**
* @param stream Input stream
* @throws IOException
* @throws SAXException
* @throws ParserConfigurationException
*/
public synchronized static Document parse(InputStream stream)
throws IOException, SAXException, ParserConfigurationException {
return getDocumentBuilder().parse(stream);
}
/**
* @param document DOM Document
* @param name Name
*/
public static String getElementByName(Document document, String name) {
NodeList nodes = document.getElementsByTagName(name);
String s = null;
for (int i=0; i < nodes.getLength() ; i++) {
Node node = nodes.item(i);
s = node.getTextContent().trim();
}
return s;
}
/**
* @param doc DOM Document
* @throws IOException
*/
@SuppressWarnings("deprecation")
public static void serializeDoc(Document doc) throws IOException {
org.apache.xml.serialize.XMLSerializer serializer = new org.apache.xml.serialize.XMLSerializer();
serializer.setOutputByteStream(System.out);
serializer.serialize(doc);
}
@SuppressWarnings("deprecation")
public static String serializeDoctoString(Document doc) throws IOException {
org.apache.xml.serialize.XMLSerializer serializer = new org.apache.xml.serialize.XMLSerializer();
ByteArrayOutputStream bout = new ByteArrayOutputStream();
serializer.setOutputByteStream(bout);
serializer.serialize(doc);
return bout.toString();
}
/**
* @param xml XML String
*/
public static void prettyPrint(String xml) {
Source xmlInput = new StreamSource(new StringReader(xml));
StreamResult xmlOutput = new StreamResult(new StringWriter());
Transformer transformer = null;
try {
transformer = TransformerFactory.newInstance().newTransformer();
} catch (TransformerConfigurationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (TransformerFactoryConfigurationError e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
//transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, "testing.dtd");
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
try {
transformer.transform(xmlInput, xmlOutput);
} catch (TransformerException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
String formattedxml=xmlOutput.getWriter().toString();
System.out.println(formattedxml);
}
/**
* @param xml XML String
*/
public static String prettyPrintToString(String xml) {
Source xmlInput = new StreamSource(new StringReader(xml));
StreamResult xmlOutput = new StreamResult(new StringWriter());
Transformer transformer = null;
try {
transformer = TransformerFactory.newInstance().newTransformer();
} catch (TransformerConfigurationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (TransformerFactoryConfigurationError e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
//transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, "testing.dtd");
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
try {
transformer.transform(xmlInput, xmlOutput);
} catch (TransformerException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
String formattedxml=xmlOutput.getWriter().toString();
return formattedxml;
}
/**
* @param node DOM Node
*/
public static void displayNodeInfo(Node node) {
switch (node.getNodeType()) {
case Node.DOCUMENT_NODE:
System.out.println("Document Node ");
break;
case Node.ELEMENT_NODE:
System.out.println("Element Node: "+ node.getNodeName());
break;
case Node.TEXT_NODE:
System.out.println("Text Node: "+ node.getNodeName());
break;
case Node.CDATA_SECTION_NODE:
System.out.println("CDATA Section Node: ");
break;
case Node.COMMENT_NODE:
System.out.println("Comment Node ");
break;
case Node.PROCESSING_INSTRUCTION_NODE:
System.out.println("Processing Instruction Node ");
break;
case Node.ENTITY_REFERENCE_NODE:
System.out.println("Entity Reference Node ");
break;
case Node.DOCUMENT_TYPE_NODE:
System.out.println("Document Type Node ");
break;
}
}
/**
* @param node DOM Node
* @throws IOException
*/
public static void serializeNode(Node node) throws IOException {
if (writer == null) writer = new BufferedWriter(new OutputStreamWriter(System.out));
switch (node.getNodeType()) {
case Node.DOCUMENT_NODE:
Document doc = (Document) node;
writer.write("<?xml version=\"");
writer.write(doc.getXmlVersion());
writer.write("\" encoding=\"UTF-8\" standalone=\"");
if (doc.getXmlStandalone())
writer.write("yes");
else
writer.write("no");
writer.write("\"?>\n");
NodeList nodes = node.getChildNodes();
if (nodes != null)
for (int i = 0; i < nodes.getLength(); i++)
serializeNode(nodes.item(i));
break;
case Node.ELEMENT_NODE:
String name = node.getNodeName();
writer.write("<" + name);
NamedNodeMap attributes = node.getAttributes();
for (int i = 0; i < attributes.getLength(); i++) {
Node current = attributes.item(i);
writer.write(" " + current.getNodeName() + "=\"");
print(current.getNodeValue());
writer.write("\"");
}
writer.write(">");
NodeList children = node.getChildNodes();
if (children != null) {
//if ((children.item(0) != null) && (children.item(0).getNodeType() == Node.ELEMENT_NODE))
// writer.write("\n");
for (int i = 0; i < children.getLength(); i++)
serializeNode(children.item(i));
if ((children.item(0) != null)
&& (children.item(children.getLength() - 1).getNodeType() == Node.ELEMENT_NODE))
writer.write("");
}
writer.write("</" + name + ">");
break;
case Node.TEXT_NODE:
print(node.getNodeValue());
break;
case Node.CDATA_SECTION_NODE:
writer.write("CDATA");
print(node.getNodeValue());
writer.write("");
break;
case Node.COMMENT_NODE:
writer.write("<!-- " + node.getNodeValue() + " -->\n");
break;
case Node.PROCESSING_INSTRUCTION_NODE:
writer.write("<?" + node.getNodeName() + " " + node.getNodeValue() + "?>\n");
break;
case Node.ENTITY_REFERENCE_NODE:
writer.write("&" + node.getNodeName() + ";");
break;
case Node.DOCUMENT_TYPE_NODE:
DocumentType docType = (DocumentType) node;
String publicId = docType.getPublicId();
String systemId = docType.getSystemId();
String internalSubset = docType.getInternalSubset();
writer.write("<!DOCTYPE " + docType.getName());
if (publicId != null)
writer.write(" PUBLIC \"" + publicId + "\" ");
else
writer.write(" SYSTEM ");
writer.write("\"" + systemId + "\"");
if (internalSubset != null)
writer.write(" [" + internalSubset + "]");
writer.write(">\n");
break;
}
writer.flush();
}
/**
* @param s String
* @throws IOException
*/
private static void print(String s) throws IOException {
if (s == null)
return;
for (int i = 0, len = s.length(); i < len; i++) {
char c = s.charAt(i);
switch (c) {
case '<':
writer.write("&lt;");
break;
case '>':
writer.write("&gt;");
break;
case '&':
writer.write("&amp;");
break;
case '\r':
writer.write("&#xD;");
break;
default:
writer.write(c);
}
}
}
/**
* @param obj (either a Document or a Node)
* @param expression Expression
* @return string contents
*/
public static Node getNodeWithXpath(Object obj, String expression) {
Object root = null;
if (obj instanceof Document) {
Document doc = (Document) obj;
root = doc.getDocumentElement();
} else {
root = (Node) obj;
}
XPath xpath = XPathFactory.newInstance().newXPath();
xpath.setNamespaceContext(new MetadataNamespaceContext());
Node result = null;
try {
result = ((Node) xpath.evaluate(expression, root, XPathConstants.NODE));
return result;
} catch (XPathExpressionException e) {
logger.error("XPathExpressionException ", e);
return null;
}
}
}

View file

@ -36,7 +36,7 @@ public class GeoFocusMapLocations extends AbstractAjaxResponder {
+ "PREFIX core: <http://vivoweb.org/ontology/core#> \n" + "PREFIX core: <http://vivoweb.org/ontology/core#> \n"
+ "PREFIX foaf: <http://xmlns.com/foaf/0.1/> \n" + "PREFIX foaf: <http://xmlns.com/foaf/0.1/> \n"
+ "PREFIX vivoc: <http://vivo.library.cornell.edu/ns/0.1#> \n" + "PREFIX vivoc: <http://vivo.library.cornell.edu/ns/0.1#> \n"
+ "PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> " + "PREFIX afn: <http://jena.apache.org/ARQ/function#> "
+ "SELECT DISTINCT ?label ?location (afn:localname(?location) AS ?localName) (COUNT(DISTINCT ?person) AS ?count) \n" + "SELECT DISTINCT ?label ?location (afn:localname(?location) AS ?localName) (COUNT(DISTINCT ?person) AS ?count) \n"
+ "WHERE { { \n" + "WHERE { { \n"
+ " ?location rdf:type core:GeographicRegion . \n" + " ?location rdf:type core:GeographicRegion . \n"

View file

@ -66,7 +66,7 @@ public class ManageGrantsForIndividualController extends FreemarkerHttpServlet {
+ "PREFIX core: <http://vivoweb.org/ontology/core#> \n" + "PREFIX core: <http://vivoweb.org/ontology/core#> \n"
+ "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> \n" + "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> \n"
+ "PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> \n" + "PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> \n"
+ "PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> \n" + "PREFIX afn: <http://jena.apache.org/ARQ/function#> \n"
+ "SELECT DISTINCT ?subclass ?role (str(?label2) as ?label) ?activity ?hideThis WHERE { \n" + "SELECT DISTINCT ?subclass ?role (str(?label2) as ?label) ?activity ?hideThis WHERE { \n"
+ " ?subject <http://purl.obolibrary.org/obo/RO_0000053> ?role . \n" + " ?subject <http://purl.obolibrary.org/obo/RO_0000053> ?role . \n"
+ " ?role a core:ResearcherRole . \n" + " ?role a core:ResearcherRole . \n"

View file

@ -66,7 +66,7 @@ public class ManagePeopleForOrganizationController extends FreemarkerHttpServlet
+ "PREFIX core: <http://vivoweb.org/ontology/core#> \n" + "PREFIX core: <http://vivoweb.org/ontology/core#> \n"
+ "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> \n" + "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> \n"
+ "PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> \n" + "PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> \n"
+ "PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> \n" + "PREFIX afn: <http://jena.apache.org/ARQ/function#> \n"
+ "PREFIX foaf: <http://xmlns.com/foaf/0.1/> \n" + "PREFIX foaf: <http://xmlns.com/foaf/0.1/> \n"
+ "SELECT DISTINCT ?subclass ?position ?positionLabel (str(?label) as ?name) ?person ?hideThis WHERE { \n" + "SELECT DISTINCT ?subclass ?position ?positionLabel (str(?label) as ?name) ?person ?hideThis WHERE { \n"
+ " ?subject core:relatedBy ?position . \n" + " ?subject core:relatedBy ?position . \n"

View file

@ -66,7 +66,7 @@ public class ManagePublicationsForIndividualController extends FreemarkerHttpSer
+ "PREFIX core: <http://vivoweb.org/ontology/core#> \n" + "PREFIX core: <http://vivoweb.org/ontology/core#> \n"
+ "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> \n" + "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> \n"
+ "PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> \n" + "PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> \n"
+ "PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> \n" + "PREFIX afn: <http://jena.apache.org/ARQ/function#> \n"
+ "SELECT DISTINCT ?subclass ?authorship (str(?label) as ?title) ?pub ?hideThis WHERE { \n" + "SELECT DISTINCT ?subclass ?authorship (str(?label) as ?title) ?pub ?hideThis WHERE { \n"
+ " ?subject core:relatedBy ?authorship . \n" + " ?subject core:relatedBy ?authorship . \n"
+ " ?authorship a core:Authorship . \n" + " ?authorship a core:Authorship . \n"

View file

@ -6,18 +6,20 @@ import java.io.BufferedReader;
import java.io.File; import java.io.File;
import java.io.FileReader; import java.io.FileReader;
import java.io.IOException; import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import org.apache.commons.csv.CSVFormat;
import org.apache.commons.csv.CSVParser;
import org.apache.commons.csv.CSVRecord;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.skife.csv.SimpleReader;
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
/** /**
* An implementation of FileHarvestJob that can be used for any CSV file harvest. * An implementation of FileHarvestJob that can be used for any CSV file harvest.
*/ */
@ -214,75 +216,48 @@ class CsvFileHarvestJob implements FileHarvestJob {
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
public String validateUpload(File file) { public String validateUpload(File file) {
try { try {
SimpleReader reader = new SimpleReader(); String message = "No data in file";
CSVParser cReader = new CSVParser(new FileReader(file), CSVFormat.DEFAULT);
List templateCsv = reader.parse(this.templateFile); try {
String[] templateFirstLine = (String[])templateCsv.get(0); int rowNum = 0;
int numberFields = 0;
//if a line ends in a comma (absolutely a comma, no whitespace), SimpleReader will not consider the part after the comma to be a blank section. String errorMsg = "File header does not match template";
List csv = reader.parse(file); for (CSVRecord cRecord : cReader) {
boolean[] linesEndingInComma = getLinesEndingInComma(file); rowNum++;
if (false) {
int length = csv.size(); numberFields = cRecord.size();
errorMsg += "file header items: ";
if(length == 0) for(int i = 0; i < cRecord.size(); i++) {
return "No data in file"; errorMsg += cRecord.get(i) + ", ";
}
for(int i = 0; i < length; i++) { } else {
String[] line = (String[])csv.get(i); if (cRecord.size() > 0) {
boolean endsInComma = linesEndingInComma[i]; if(cRecord.size() != numberFields) {
if(i == 0) { if (errorMsg != null) {
String errorMessage = validateCsvFirstLine(templateFirstLine, line); errorMsg += "template items: ";
if(errorMessage != null) for(int i = 0; i < cRecord.size(); i++) {
return errorMessage; errorMsg += cRecord.get(i) + ", ";
} }
else if(line.length != 0) { return errorMsg;
int actualLineLength = line.length + (endsInComma ? 1 : 0); }
if(actualLineLength != templateFirstLine.length) { return "Mismatch in number of entries in row " + rowNum + ": expected " + numberFields + ", found " + cRecord.size();
return "Mismatch in number of entries in row " + i + ": expected " + templateFirstLine.length + ", found " + actualLineLength; }
}
message = null;
errorMsg = null;
} }
} }
}
return message;
} finally {
cReader.close();
}
} catch (IOException e) { } catch (IOException e) {
log.error(e, e); log.error(e, e);
return e.getMessage(); return e.getMessage();
} }
return null;
} }
/**
* Makes sure that the first line of the CSV file is identical to the first line of the template file. This is
* assuming we are expecting all user CSV files to contain an initial header line. If this is not the case, then
* this method is unnecessary.
* @param templateFirstLine the parsed-out contents of the first line of the template file
* @param line the parsed-out contents of the first line of the input file
* @return an error message if the two lines don't match, or null if they do
*/
private String validateCsvFirstLine(String[] templateFirstLine, String[] line) {
String errorMessage = "File header does not match template";
if(line.length != templateFirstLine.length) {
//return errorMessage + ": " + "file header columns = " + line.length + ", template columns = " + templateFirstLine.length;
String errorMsg = "";
errorMsg += "file header items: ";
for(int i = 0; i < line.length; i++) {
errorMsg += line[i] + ", ";
}
errorMsg += "template items: ";
for(int i = 0; i < templateFirstLine.length; i++) {
errorMsg += templateFirstLine[i] + ", ";
}
return errorMsg;
}
for(int i = 0; i < line.length; i++)
{
if(!line[i].equals(templateFirstLine[i]))
return errorMessage + ": file header column " + (i + 1) + " = " + line[i] + ", template column " + (i + 1) + " = " + templateFirstLine[i];
}
return null;
}
/* /*
private void prepareWorkspaceDirectory() { private void prepareWorkspaceDirectory() {
String path = FileHarvestController.getFileHarvestRootPath() + "workspaces/" + this.sessionId; String path = FileHarvestController.getFileHarvestRootPath() + "workspaces/" + this.sessionId;

View file

@ -9,7 +9,7 @@ import java.util.Map;
import javax.servlet.ServletContext; import javax.servlet.ServletContext;
import org.apache.commons.lang.StringEscapeUtils; import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
@ -168,7 +168,7 @@ public class ShortURLVisualizationController extends FreemarkerHttpServlet {
+ matchedPatternGroups.get(1); + matchedPatternGroups.get(1);
} }
subjectURI = StringEscapeUtils.escapeHtml(subjectURI); subjectURI = StringEscapeUtils.ESCAPE_HTML4.translate(subjectURI);
parameters.put(VisualizationFrameworkConstants.INDIVIDUAL_URI_KEY, subjectURI); parameters.put(VisualizationFrameworkConstants.INDIVIDUAL_URI_KEY, subjectURI);
if (VisualizationFrameworkConstants.COAUTHORSHIP_VIS_SHORT_URL if (VisualizationFrameworkConstants.COAUTHORSHIP_VIS_SHORT_URL
@ -243,7 +243,7 @@ public class ShortURLVisualizationController extends FreemarkerHttpServlet {
List<String> matchedGroups = new ArrayList<String>(); List<String> matchedGroups = new ArrayList<String>();
String subURIString = vitroRequest.getRequestURI().substring(vitroRequest.getContextPath().length()+1); String subURIString = vitroRequest.getRequestURI().substring(vitroRequest.getContextPath().length()+1);
String[] urlParams = StringEscapeUtils.escapeHtml(subURIString).split("/"); String[] urlParams = StringEscapeUtils.ESCAPE_HTML4.translate(subURIString).split("/");
if (urlParams.length > 1 if (urlParams.length > 1
&& urlParams[0].equalsIgnoreCase("vis")) { && urlParams[0].equalsIgnoreCase("vis")) {

View file

@ -6,7 +6,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;

View file

@ -8,7 +8,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.jena.rdf.model.Literal; import org.apache.jena.rdf.model.Literal;

View file

@ -352,7 +352,7 @@ public class AddAuthorsToInformationResourceGenerator extends VivoBaseGenerator
private static String AUTHORSHIPS_MODEL = " \n" private static String AUTHORSHIPS_MODEL = " \n"
+ "PREFIX core: <http://vivoweb.org/ontology/core#>\n" + "PREFIX core: <http://vivoweb.org/ontology/core#>\n"
+ "PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>\n" + "PREFIX afn: <http://jena.apache.org/ARQ/function#>\n"
+ "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\n" + "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\n"
+ "PREFIX foaf: <http://xmlns.com/foaf/0.1/>\n" + "PREFIX foaf: <http://xmlns.com/foaf/0.1/>\n"
+ "PREFIX vcard: <http://www.w3.org/2006/vcard/ns#>\n" + "PREFIX vcard: <http://www.w3.org/2006/vcard/ns#>\n"
@ -418,7 +418,7 @@ public class AddAuthorsToInformationResourceGenerator extends VivoBaseGenerator
private static String AUTHORSHIPS_QUERY = " \n" private static String AUTHORSHIPS_QUERY = " \n"
+ "PREFIX core: <http://vivoweb.org/ontology/core#> \n" + "PREFIX core: <http://vivoweb.org/ontology/core#> \n"
+ "PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> \n" + "PREFIX afn: <http://jena.apache.org/ARQ/function#> \n"
+ "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> \n" + "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> \n"
+ "PREFIX foaf: <http://xmlns.com/foaf/0.1/> \n" + "PREFIX foaf: <http://xmlns.com/foaf/0.1/> \n"
+ "PREFIX vcard: <http://www.w3.org/2006/vcard/ns#> \n" + "PREFIX vcard: <http://www.w3.org/2006/vcard/ns#> \n"

View file

@ -315,7 +315,7 @@ public class AddEditorsToInformationResourceGenerator extends VivoBaseGenerator
private static String EDITORSHIPS_MODEL = "" private static String EDITORSHIPS_MODEL = ""
+ "PREFIX core: <http://vivoweb.org/ontology/core#>\n" + "PREFIX core: <http://vivoweb.org/ontology/core#>\n"
+ "PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>\n" + "PREFIX afn: <http://jena.apache.org/ARQ/function#>\n"
+ "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\n" + "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\n"
+ "PREFIX foaf: <http://xmlns.com/foaf/0.1/>\n" + "PREFIX foaf: <http://xmlns.com/foaf/0.1/>\n"
+ "CONSTRUCT\n" + "CONSTRUCT\n"
@ -353,7 +353,7 @@ public class AddEditorsToInformationResourceGenerator extends VivoBaseGenerator
private static String EDITORSHIPS_QUERY = "" private static String EDITORSHIPS_QUERY = ""
+ "PREFIX core: <http://vivoweb.org/ontology/core#> \n" + "PREFIX core: <http://vivoweb.org/ontology/core#> \n"
+ "PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> \n" + "PREFIX afn: <http://jena.apache.org/ARQ/function#> \n"
+ "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> \n" + "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> \n"
+ "PREFIX foaf: <http://xmlns.com/foaf/0.1/> \n" + "PREFIX foaf: <http://xmlns.com/foaf/0.1/> \n"
+ "SELECT ?editorshipURI (afn:localname(?editorshipURI) AS ?editorshipName) ?editorURI ?editorName ?rank \n" + "SELECT ?editorshipURI (afn:localname(?editorshipURI) AS ?editorshipName) ?editorURI ?editorName ?rank \n"

View file

@ -11,7 +11,7 @@ import java.util.Map;
import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSession;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.vivoweb.webapp.util.ModelUtils; import org.vivoweb.webapp.util.ModelUtils;

View file

@ -13,7 +13,7 @@ import javax.servlet.http.HttpSession;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.jena.rdf.model.Literal; import org.apache.jena.rdf.model.Literal;
import org.apache.jena.rdf.model.Model; import org.apache.jena.rdf.model.Model;

View file

@ -39,7 +39,7 @@ public class VIVODefaultAddMissingIndividualFormGenerator extends DefaultAddMiss
return prefixStrings; return prefixStrings;
} }
private String getN3ForName() { protected String getN3ForName() {
return "?" + objectVarName + " rdfs:label ?label ."; return "?" + objectVarName + " rdfs:label ?label .";
} }

View file

@ -12,7 +12,7 @@ import net.sf.json.JSON;
import net.sf.json.JSONArray; import net.sf.json.JSONArray;
import net.sf.json.JSONSerializer; import net.sf.json.JSONSerializer;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;

View file

@ -9,7 +9,7 @@ import java.util.HashMap;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;

View file

@ -9,7 +9,7 @@ import java.util.HashMap;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;

View file

@ -4,7 +4,7 @@ package edu.cornell.mannlib.vitro.webapp.searchindex.extensions;
import static edu.cornell.mannlib.vitro.webapp.search.VitroSearchTermNames.ALLTEXT; import static edu.cornell.mannlib.vitro.webapp.search.VitroSearchTermNames.ALLTEXT;
import static edu.cornell.mannlib.vitro.webapp.search.VitroSearchTermNames.ALLTEXTUNSTEMMED; import static edu.cornell.mannlib.vitro.webapp.search.VitroSearchTermNames.ALLTEXTUNSTEMMED;
import static edu.cornell.mannlib.vitro.webapp.utils.sparql.SelectQueryRunner.createQueryContext; import static edu.cornell.mannlib.vitro.webapp.utils.sparqlrunner.SparqlQueryRunner.createSelectQueryContext;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
@ -104,31 +104,19 @@ public class LabelsAcrossContextNodes implements IndexingUriFinder,
this.rdfService = models.getRDFService(); this.rdfService = models.getRDFService();
} }
@Property(uri = "http://www.w3.org/2000/01/rdf-schema#label") @Property(uri = "http://www.w3.org/2000/01/rdf-schema#label", maxOccurs = 1)
public void setLabel(String l) { public void setLabel(String l) {
label = l; label = l;
} }
@Property(uri = "http://vitro.mannlib.cornell.edu/ns/vitro/ApplicationSetup#hasIncomingProperty") @Property(uri = "http://vitro.mannlib.cornell.edu/ns/vitro/ApplicationSetup#hasIncomingProperty", minOccurs = 1, maxOccurs = 1)
public void setIncomingProperty(String incomingUri) { public void setIncomingProperty(String incomingUri) {
if (incomingPropertyUri == null) { incomingPropertyUri = incomingUri;
incomingPropertyUri = incomingUri;
} else {
throw new IllegalStateException(
"Configuration includes multiple declarations for hasIncomingProperty: "
+ incomingPropertyUri + ", and " + incomingUri);
}
} }
@Property(uri = "http://vitro.mannlib.cornell.edu/ns/vitro/ApplicationSetup#hasOutgoingProperty") @Property(uri = "http://vitro.mannlib.cornell.edu/ns/vitro/ApplicationSetup#hasOutgoingProperty", minOccurs = 1, maxOccurs = 1)
public void setOutgoingProperty(String outgoingUri) { public void setOutgoingProperty(String outgoingUri) {
if (outgoingPropertyUri == null) { outgoingPropertyUri = outgoingUri;
outgoingPropertyUri = outgoingUri;
} else {
throw new IllegalStateException(
"Configuration includes multiple declarations for hasOutgoingProperty: "
+ outgoingPropertyUri + ", and " + outgoingUri);
}
} }
@Property(uri = "http://vitro.mannlib.cornell.edu/ns/vitro/ApplicationSetup#hasTypeRestriction") @Property(uri = "http://vitro.mannlib.cornell.edu/ns/vitro/ApplicationSetup#hasTypeRestriction")
@ -149,14 +137,6 @@ public class LabelsAcrossContextNodes implements IndexingUriFinder,
formatRestrictions(typeRestrictions), formatRestrictions(typeRestrictions),
formatRestrictions(contextNodeClasses)); formatRestrictions(contextNodeClasses));
} }
if (incomingPropertyUri == null) {
throw new IllegalStateException(
"Configuration did not declare hasIncomingProperty.");
}
if (outgoingPropertyUri == null) {
throw new IllegalStateException(
"Configuration did not declare hasOutgoingProperty.");
}
} }
private String formatRestrictions(Set<String> uris) { private String formatRestrictions(Set<String> uris) {
@ -242,25 +222,26 @@ public class LabelsAcrossContextNodes implements IndexingUriFinder,
private void addLabelsFromAllContextNodeClasses(Individual ind, private void addLabelsFromAllContextNodeClasses(Individual ind,
SearchInputDocument doc) { SearchInputDocument doc) {
addValuesToTextFields(doc, addValuesToTextFields(
createQueryContext(rdfService, LABELS_WITHOUT_RESTRICTION) doc,
createSelectQueryContext(rdfService, LABELS_WITHOUT_RESTRICTION)
.bindVariableToUri("uri", ind.getURI()) .bindVariableToUri("uri", ind.getURI())
.bindVariableToUri("incoming", incomingPropertyUri) .bindVariableToUri("incoming", incomingPropertyUri)
.bindVariableToUri("outgoing", outgoingPropertyUri) .bindVariableToUri("outgoing", outgoingPropertyUri)
.execute().getStringFields("label").flatten()); .execute().toStringFields("label").flatten());
} }
private void addLabelsFromContextNodeClass(Individual ind, private void addLabelsFromContextNodeClass(Individual ind,
SearchInputDocument doc, String contextNodeClass) { SearchInputDocument doc, String contextNodeClass) {
addValuesToTextFields( addValuesToTextFields(
doc, doc,
createQueryContext(rdfService, createSelectQueryContext(rdfService,
LABELS_FOR_SPECIFIC_CONTEXT_NODE_TYPE) LABELS_FOR_SPECIFIC_CONTEXT_NODE_TYPE)
.bindVariableToUri("uri", ind.getURI()) .bindVariableToUri("uri", ind.getURI())
.bindVariableToUri("nodeType", contextNodeClass) .bindVariableToUri("nodeType", contextNodeClass)
.bindVariableToUri("incoming", incomingPropertyUri) .bindVariableToUri("incoming", incomingPropertyUri)
.bindVariableToUri("outgoing", outgoingPropertyUri) .bindVariableToUri("outgoing", outgoingPropertyUri)
.execute().getStringFields("label").flatten()); .execute().toStringFields("label").flatten());
} }
private void addValuesToTextFields(SearchInputDocument doc, private void addValuesToTextFields(SearchInputDocument doc,
@ -349,23 +330,23 @@ public class LabelsAcrossContextNodes implements IndexingUriFinder,
} }
private Set<String> locatePartnersWithoutRestriction(String uri) { private Set<String> locatePartnersWithoutRestriction(String uri) {
return createQueryContext(rdfService, return createSelectQueryContext(rdfService,
LOCATE_PARTNERS_WITHOUT_RESTRICTION) LOCATE_PARTNERS_WITHOUT_RESTRICTION)
.bindVariableToUri("uri", uri) .bindVariableToUri("uri", uri)
.bindVariableToUri("incoming", incomingPropertyUri) .bindVariableToUri("incoming", incomingPropertyUri)
.bindVariableToUri("outgoing", outgoingPropertyUri).execute() .bindVariableToUri("outgoing", outgoingPropertyUri).execute()
.getStringFields("partner").flattenToSet(); .toStringFields("partner").flattenToSet();
} }
private Collection<? extends String> locatePartnersAcrossContextNodeClass( private Collection<? extends String> locatePartnersAcrossContextNodeClass(
String uri, String contextNodeClass) { String uri, String contextNodeClass) {
return createQueryContext(rdfService, return createSelectQueryContext(rdfService,
LOCATE_PARTNERS_ON_CONTEXT_NODE_TYPE) LOCATE_PARTNERS_ON_CONTEXT_NODE_TYPE)
.bindVariableToUri("uri", uri) .bindVariableToUri("uri", uri)
.bindVariableToUri("nodeType", contextNodeClass) .bindVariableToUri("nodeType", contextNodeClass)
.bindVariableToUri("incoming", incomingPropertyUri) .bindVariableToUri("incoming", incomingPropertyUri)
.bindVariableToUri("outgoing", outgoingPropertyUri).execute() .bindVariableToUri("outgoing", outgoingPropertyUri).execute()
.getStringFields("partner").flattenToSet(); .toStringFields("partner").flattenToSet();
} }
private boolean isIncomingStatementOnAcceptableContextNode(Statement stmt) { private boolean isIncomingStatementOnAcceptableContextNode(Statement stmt) {
@ -388,9 +369,9 @@ public class LabelsAcrossContextNodes implements IndexingUriFinder,
} }
private Set<String> getTypes(String uri) { private Set<String> getTypes(String uri) {
return createQueryContext(rdfService, GET_TYPES) return createSelectQueryContext(rdfService, GET_TYPES)
.bindVariableToUri("uri", uri).execute() .bindVariableToUri("uri", uri).execute().toStringFields("type")
.getStringFields("type").flattenToSet(); .flattenToSet();
} }
private Set<String> locateOtherPartners(Statement stmt) { private Set<String> locateOtherPartners(Statement stmt) {
@ -402,12 +383,12 @@ public class LabelsAcrossContextNodes implements IndexingUriFinder,
String objectUri = (stmt.getObject().isURIResource()) ? stmt String objectUri = (stmt.getObject().isURIResource()) ? stmt
.getObject().asResource().getURI() : "NO_MATCH"; .getObject().asResource().getURI() : "NO_MATCH";
return createQueryContext(rdfService, return createSelectQueryContext(rdfService,
LOCATE_OTHER_PARTNERS_ON_THIS_NODE) LOCATE_OTHER_PARTNERS_ON_THIS_NODE)
.bindVariableToUri("contextNode", nodeUri) .bindVariableToUri("contextNode", nodeUri)
.bindVariableToUri("uri", objectUri) .bindVariableToUri("uri", objectUri)
.bindVariableToUri("outgoing", outgoingPropertyUri).execute() .bindVariableToUri("outgoing", outgoingPropertyUri).execute()
.getStringFields("partner").flattenToSet(); .toStringFields("partner").flattenToSet();
} }
private List<String> filterByType(Collection<String> uris) { private List<String> filterByType(Collection<String> uris) {

View file

@ -11,7 +11,7 @@ import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;

View file

@ -3,6 +3,7 @@
package edu.cornell.mannlib.vitro.webapp.visualization.capabilitymap; package edu.cornell.mannlib.vitro.webapp.visualization.capabilitymap;
import com.google.gson.Gson; import com.google.gson.Gson;
import org.apache.commons.lang3.StringUtils;
import org.apache.jena.query.Dataset; import org.apache.jena.query.Dataset;
import org.apache.jena.query.QueryExecution; import org.apache.jena.query.QueryExecution;
import org.apache.jena.query.QueryExecutionFactory; import org.apache.jena.query.QueryExecutionFactory;
@ -24,7 +25,6 @@ import edu.cornell.mannlib.vitro.webapp.visualization.model.ConceptPeopleMap;
import edu.cornell.mannlib.vitro.webapp.visualization.model.OrganizationPeopleMap; import edu.cornell.mannlib.vitro.webapp.visualization.model.OrganizationPeopleMap;
import edu.cornell.mannlib.vitro.webapp.visualization.utilities.VisualizationCaches; import edu.cornell.mannlib.vitro.webapp.visualization.utilities.VisualizationCaches;
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.VisualizationRequestHandler; import edu.cornell.mannlib.vitro.webapp.visualization.visutils.VisualizationRequestHandler;
import org.apache.axis.utils.StringUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import java.util.HashMap; import java.util.HashMap;

View file

@ -22,7 +22,7 @@ import edu.cornell.mannlib.vitro.webapp.rdfservice.RDFServiceException;
import edu.cornell.mannlib.vitro.webapp.rdfservice.ResultSetConsumer; import edu.cornell.mannlib.vitro.webapp.rdfservice.ResultSetConsumer;
import edu.cornell.mannlib.vitro.webapp.visualization.utilities.VisualizationCaches; import edu.cornell.mannlib.vitro.webapp.visualization.utilities.VisualizationCaches;
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.UtilityFunctions; import edu.cornell.mannlib.vitro.webapp.visualization.visutils.UtilityFunctions;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.jena.iri.IRI; import org.apache.jena.iri.IRI;
import org.apache.jena.iri.IRIFactory; import org.apache.jena.iri.IRIFactory;

View file

@ -8,8 +8,8 @@ import java.util.Map.Entry;
import java.util.Set; import java.util.Set;
import java.util.TreeMap; import java.util.TreeMap;
import org.apache.commons.lang.StringEscapeUtils; import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.jena.query.Dataset; import org.apache.jena.query.Dataset;

View file

@ -41,7 +41,7 @@ public class QueryConstants {
put("vivo", "http://vivo.library.cornell.edu/ns/0.1#"); put("vivo", "http://vivo.library.cornell.edu/ns/0.1#");
put("geo", "http://aims.fao.org/aos/geopolitical.owl#"); put("geo", "http://aims.fao.org/aos/geopolitical.owl#");
put("public", "http://vitro.mannlib.cornell.edu/ns/vitro/public#"); put("public", "http://vitro.mannlib.cornell.edu/ns/vitro/public#");
put("afn", "http://jena.hpl.hp.com/ARQ/function#"); put("afn", "http://jena.apache.org/ARQ/function#");
put("vivosocnet", "http://vivo.cns.iu.edu/ns/#"); put("vivosocnet", "http://vivo.cns.iu.edu/ns/#");
put("obo", "http://purl.obolibrary.org/obo/"); put("obo", "http://purl.obolibrary.org/obo/");
put("vcard", "http://www.w3.org/2006/vcard/ns#"); put("vcard", "http://www.w3.org/2006/vcard/ns#");

View file

@ -8,7 +8,7 @@ import java.util.Set;
import edu.cornell.mannlib.vitro.webapp.rdfservice.RDFService; import edu.cornell.mannlib.vitro.webapp.rdfservice.RDFService;
import edu.cornell.mannlib.vitro.webapp.rdfservice.RDFServiceException; import edu.cornell.mannlib.vitro.webapp.rdfservice.RDFServiceException;
import edu.cornell.mannlib.vitro.webapp.rdfservice.impl.RDFServiceUtils; import edu.cornell.mannlib.vitro.webapp.rdfservice.impl.RDFServiceUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.apache.jena.iri.IRI; import org.apache.jena.iri.IRI;

View file

@ -17,7 +17,7 @@ import edu.cornell.mannlib.vitro.webapp.rdfservice.RDFService;
import edu.cornell.mannlib.vitro.webapp.rdfservice.RDFServiceException; import edu.cornell.mannlib.vitro.webapp.rdfservice.RDFServiceException;
import edu.cornell.mannlib.vitro.webapp.rdfservice.ResultSetConsumer; import edu.cornell.mannlib.vitro.webapp.rdfservice.ResultSetConsumer;
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.UtilityFunctions; import edu.cornell.mannlib.vitro.webapp.visualization.visutils.UtilityFunctions;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.apache.jena.iri.IRI; import org.apache.jena.iri.IRI;

View file

@ -6,8 +6,8 @@ import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.TreeMap; import java.util.TreeMap;
import org.apache.commons.lang.StringEscapeUtils; import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.jena.query.Dataset; import org.apache.jena.query.Dataset;

View file

@ -22,8 +22,8 @@ import edu.cornell.mannlib.vitro.webapp.visualization.utilities.VisualizationCac
import mapping.ScienceMapping; import mapping.ScienceMapping;
import mapping.ScienceMappingResult; import mapping.ScienceMappingResult;
import org.apache.commons.lang.StringEscapeUtils; import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import com.google.gson.Gson; import com.google.gson.Gson;

View file

@ -18,7 +18,7 @@ import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException; import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Activity; import edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.Activity;
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.QueryRunner; import edu.cornell.mannlib.vitro.webapp.visualization.visutils.QueryRunner;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.jena.iri.IRI; import org.apache.jena.iri.IRI;
import org.apache.jena.iri.IRIFactory; import org.apache.jena.iri.IRIFactory;

View file

@ -8,7 +8,7 @@ import java.util.Map.Entry;
import java.util.Set; import java.util.Set;
import edu.cornell.mannlib.vitro.webapp.visualization.visutils.QueryRunner; import edu.cornell.mannlib.vitro.webapp.visualization.visutils.QueryRunner;
import org.apache.commons.lang.StringEscapeUtils; import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.jena.query.Dataset; import org.apache.jena.query.Dataset;

View file

@ -14,7 +14,7 @@ import org.apache.jena.vocabulary.RDFS;
import edu.cornell.mannlib.vitro.webapp.rdfservice.RDFService; import edu.cornell.mannlib.vitro.webapp.rdfservice.RDFService;
import edu.cornell.mannlib.vitro.webapp.rdfservice.RDFServiceException; import edu.cornell.mannlib.vitro.webapp.rdfservice.RDFServiceException;
import edu.cornell.mannlib.vitro.webapp.rdfservice.ResultSetConsumer; import edu.cornell.mannlib.vitro.webapp.rdfservice.ResultSetConsumer;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.jena.iri.IRI; import org.apache.jena.iri.IRI;
import org.apache.jena.iri.IRIFactory; import org.apache.jena.iri.IRIFactory;

View file

@ -7,8 +7,8 @@ import java.util.Map;
import java.util.Map.Entry; import java.util.Map.Entry;
import java.util.Set; import java.util.Set;
import org.apache.commons.lang.StringEscapeUtils; import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.jena.query.Dataset; import org.apache.jena.query.Dataset;

View file

@ -4,7 +4,7 @@ package edu.cornell.mannlib.vitro.webapp.visualization.temporalgraph;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.jena.iri.IRI; import org.apache.jena.iri.IRI;
import org.apache.jena.iri.IRIFactory; import org.apache.jena.iri.IRIFactory;

View file

@ -15,8 +15,8 @@ import edu.cornell.mannlib.vitro.webapp.visualization.model.OrganizationPeopleMa
import edu.cornell.mannlib.vitro.webapp.visualization.utilities.CounterUtils; import edu.cornell.mannlib.vitro.webapp.visualization.utilities.CounterUtils;
import edu.cornell.mannlib.vitro.webapp.visualization.utilities.OrgUtils; import edu.cornell.mannlib.vitro.webapp.visualization.utilities.OrgUtils;
import edu.cornell.mannlib.vitro.webapp.visualization.utilities.VisualizationCaches; import edu.cornell.mannlib.vitro.webapp.visualization.utilities.VisualizationCaches;
import org.apache.commons.lang.StringEscapeUtils; import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import com.google.gson.Gson; import com.google.gson.Gson;

View file

@ -15,8 +15,8 @@ import edu.cornell.mannlib.vitro.webapp.visualization.model.OrganizationPeopleMa
import edu.cornell.mannlib.vitro.webapp.visualization.utilities.CounterUtils; import edu.cornell.mannlib.vitro.webapp.visualization.utilities.CounterUtils;
import edu.cornell.mannlib.vitro.webapp.visualization.utilities.OrgUtils; import edu.cornell.mannlib.vitro.webapp.visualization.utilities.OrgUtils;
import edu.cornell.mannlib.vitro.webapp.visualization.utilities.VisualizationCaches; import edu.cornell.mannlib.vitro.webapp.visualization.utilities.VisualizationCaches;
import org.apache.commons.lang.StringEscapeUtils; import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import com.google.gson.Gson; import com.google.gson.Gson;

View file

@ -2,7 +2,7 @@
package edu.cornell.mannlib.vitro.webapp.visualization.utilities; package edu.cornell.mannlib.vitro.webapp.visualization.utilities;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang3.StringUtils;
import java.util.HashSet; import java.util.HashSet;
import java.util.Map; import java.util.Map;

View file

@ -7,7 +7,7 @@ import java.util.Map;
import edu.cornell.mannlib.vitro.webapp.rdfservice.RDFServiceException; import edu.cornell.mannlib.vitro.webapp.rdfservice.RDFServiceException;
import edu.cornell.mannlib.vitro.webapp.rdfservice.ResultSetConsumer; import edu.cornell.mannlib.vitro.webapp.rdfservice.ResultSetConsumer;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.jena.iri.IRI; import org.apache.jena.iri.IRI;
import org.apache.jena.iri.IRIFactory; import org.apache.jena.iri.IRIFactory;

View file

@ -4,7 +4,7 @@ package edu.cornell.mannlib.vitro.webapp.visualization.valueobjects;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.jena.rdf.model.Model; import org.apache.jena.rdf.model.Model;

View file

@ -5,7 +5,7 @@ package edu.cornell.mannlib.vitro.webapp.visualization.visutils;
import edu.cornell.mannlib.vitro.webapp.rdfservice.RDFService; import edu.cornell.mannlib.vitro.webapp.rdfservice.RDFService;
import edu.cornell.mannlib.vitro.webapp.rdfservice.RDFServiceException; import edu.cornell.mannlib.vitro.webapp.rdfservice.RDFServiceException;
import edu.cornell.mannlib.vitro.webapp.rdfservice.ResultSetConsumer; import edu.cornell.mannlib.vitro.webapp.rdfservice.ResultSetConsumer;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.apache.jena.iri.IRI; import org.apache.jena.iri.IRI;

View file

@ -12,7 +12,7 @@ import java.util.TreeMap;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.joda.time.DateTime; import org.joda.time.DateTime;
import org.joda.time.format.DateTimeFormatter; import org.joda.time.format.DateTimeFormatter;

View file

@ -2,7 +2,7 @@
package edu.cornell.mannlib.vitro.webapp.web.templatemodels.individuallist; package edu.cornell.mannlib.vitro.webapp.web.templatemodels.individuallist;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;

View file

@ -2,7 +2,7 @@
package edu.cornell.mannlib.vitro.webapp.web.templatemodels.searchresult; package edu.cornell.mannlib.vitro.webapp.web.templatemodels.searchresult;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;

View file

@ -21,7 +21,7 @@ import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent; import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener; import javax.servlet.ServletContextListener;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;

View file

@ -18,15 +18,14 @@ import org.apache.jena.rdf.model.Resource;
import edu.cornell.mannlib.vitro.webapp.auth.identifier.IdentifierBundle; import edu.cornell.mannlib.vitro.webapp.auth.identifier.IdentifierBundle;
import edu.cornell.mannlib.vitro.webapp.auth.identifier.RequestIdentifiers; import edu.cornell.mannlib.vitro.webapp.auth.identifier.RequestIdentifiers;
import edu.cornell.mannlib.vitro.webapp.auth.identifier.common.HasAssociatedIndividual;
import edu.cornell.mannlib.vitro.webapp.auth.identifier.common.HasProfile; import edu.cornell.mannlib.vitro.webapp.auth.identifier.common.HasProfile;
import edu.cornell.mannlib.vitro.webapp.auth.identifier.common.HasProxyEditingRights; import edu.cornell.mannlib.vitro.webapp.auth.identifier.common.HasProxyEditingRights;
import edu.cornell.mannlib.vitro.webapp.auth.identifier.common.IsRootUser; import edu.cornell.mannlib.vitro.webapp.auth.identifier.common.IsRootUser;
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder; import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder;
import edu.cornell.mannlib.vitro.webapp.utils.SparqlQueryRunner;
import edu.cornell.mannlib.vitro.webapp.utils.SparqlQueryRunner.QueryParser;
import edu.cornell.mannlib.vitro.webapp.utils.dataGetter.DataGetter; import edu.cornell.mannlib.vitro.webapp.utils.dataGetter.DataGetter;
import edu.cornell.mannlib.vitro.webapp.utils.sparqlrunner.ResultSetParser;
import edu.cornell.mannlib.vitro.webapp.utils.sparqlrunner.SparqlQueryRunner;
import edu.cornell.mannlib.vivo.orcid.controller.OrcidIntegrationController; import edu.cornell.mannlib.vivo.orcid.controller.OrcidIntegrationController;
/** /**
@ -122,8 +121,9 @@ public class OrcidIdDataGetter implements DataGetter {
private List<OrcidInfo> runSparqlQuery(String individualUri) { private List<OrcidInfo> runSparqlQuery(String individualUri) {
String queryStr = String.format(QUERY_TEMPLATE, individualUri, String queryStr = String.format(QUERY_TEMPLATE, individualUri,
ORCID_ID, ORCID_IS_CONFIRMED); ORCID_ID, ORCID_IS_CONFIRMED);
SparqlQueryRunner runner = new SparqlQueryRunner(vreq.getJenaOntModel()); return SparqlQueryRunner
return runner.executeSelect(new OrcidResultParser(), queryStr); .createSelectQueryContext(vreq.getJenaOntModel(), queryStr)
.execute().parse(new OrcidResultParser());
} }
private Map<String, Object> buildMap(boolean isAuthorizedToConfirm, private Map<String, Object> buildMap(boolean isAuthorizedToConfirm,
@ -154,7 +154,7 @@ public class OrcidIdDataGetter implements DataGetter {
/** /**
* Parse the results of the SPARQL query. * Parse the results of the SPARQL query.
*/ */
private static class OrcidResultParser extends QueryParser<List<OrcidInfo>> { private static class OrcidResultParser extends ResultSetParser<List<OrcidInfo>> {
@Override @Override
protected List<OrcidInfo> defaultValue() { protected List<OrcidInfo> defaultValue() {
return Collections.emptyList(); return Collections.emptyList();

View file

@ -2,6 +2,7 @@
package org.vivoweb.webapp.sitemap; package org.vivoweb.webapp.sitemap;
import org.apache.commons.lang3.StringUtils;
import org.apache.jena.query.QuerySolution; import org.apache.jena.query.QuerySolution;
import edu.cornell.mannlib.vitro.webapp.controller.VitroHttpServlet; import edu.cornell.mannlib.vitro.webapp.controller.VitroHttpServlet;
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
@ -9,7 +10,6 @@ import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder;
import edu.cornell.mannlib.vitro.webapp.rdfservice.RDFServiceException; import edu.cornell.mannlib.vitro.webapp.rdfservice.RDFServiceException;
import edu.cornell.mannlib.vitro.webapp.rdfservice.ResultSetConsumer; import edu.cornell.mannlib.vitro.webapp.rdfservice.ResultSetConsumer;
import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants; import edu.cornell.mannlib.vitro.webapp.visualization.constants.QueryConstants;
import org.apache.axis.utils.StringUtils;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import javax.servlet.ServletException; import javax.servlet.ServletException;

View file

@ -11,7 +11,7 @@ import edu.cornell.mannlib.vitro.webapp.controller.individuallist.IndividualJson
import edu.cornell.mannlib.vitro.webapp.dao.ObjectPropertyStatementDao; import edu.cornell.mannlib.vitro.webapp.dao.ObjectPropertyStatementDao;
import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory; import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory;
import edu.cornell.mannlib.vitro.webapp.dao.jena.QueryUtils; import edu.cornell.mannlib.vitro.webapp.dao.jena.QueryUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.json.JSONException; import org.json.JSONException;

View file

@ -7,13 +7,13 @@
<groupId>org.vivoweb</groupId> <groupId>org.vivoweb</groupId>
<artifactId>vivo-home</artifactId> <artifactId>vivo-home</artifactId>
<version>1.9.0-SNAPSHOT</version> <version>1.10.0-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<parent> <parent>
<groupId>org.vivoweb</groupId> <groupId>org.vivoweb</groupId>
<artifactId>vivo-project</artifactId> <artifactId>vivo-project</artifactId>
<version>1.9.0-SNAPSHOT</version> <version>1.10.0-SNAPSHOT</version>
<relativePath>..</relativePath> <relativePath>..</relativePath>
</parent> </parent>

View file

@ -95,7 +95,7 @@
<rdfs:label xml:lang="en-US">M.P.H. Master of Public Health</rdfs:label> <rdfs:label xml:lang="en-US">M.P.H. Master of Public Health</rdfs:label>
<core:description rdf:datatype="http://www.w3.org/2001/XMLSchema#string">&lt;p&gt;Professional public health degree. (contrast with M.S.P.H.)&lt;/p&gt; <core:description rdf:datatype="http://www.w3.org/2001/XMLSchema#string">&lt;p&gt;Professional public health degree. (contrast with M.S.P.H.)&lt;/p&gt;
&lt;p&gt;See the Wikipedia entry at: http://en.wikipedia.org/wiki/Professional_degrees_of_public_health&lt;/p&gt;</core:description> &lt;p&gt;See the Wikipedia entry at: http://en.wikipedia.org/wiki/Professional_degrees_of_public_health&lt;/p&gt;</core:description>
<core:abbreviation rdf:datatype="http://www.w3.org/2000/01/rdf-schema#Literal">M.P.H.</core:abbreviation> <core:abbreviation>M.P.H.</core:abbreviation>
<rdf:type rdf:resource="http://vivoweb.org/ontology/core#AcademicDegree"/> <rdf:type rdf:resource="http://vivoweb.org/ontology/core#AcademicDegree"/>
</rdf:Description> </rdf:Description>
<rdf:Description rdf:about="http://vivoweb.org/ontology/degree/academicDegree101"> <rdf:Description rdf:about="http://vivoweb.org/ontology/degree/academicDegree101">
@ -398,7 +398,7 @@
<core:description rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Abbreviation commonly used by Canadian and British universities.</core:description> <core:description rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Abbreviation commonly used by Canadian and British universities.</core:description>
<rdfs:label xml:lang="en-US">B.Sc. Bachelor of Science</rdfs:label> <rdfs:label xml:lang="en-US">B.Sc. Bachelor of Science</rdfs:label>
<rdf:type rdf:resource="http://vivoweb.org/ontology/core#AcademicDegree"/> <rdf:type rdf:resource="http://vivoweb.org/ontology/core#AcademicDegree"/>
<core:abbreviation rdf:datatype="http://www.w3.org/2000/01/rdf-schema#Literal">B.Sc.</core:abbreviation> <core:abbreviation>B.Sc.</core:abbreviation>
</rdf:Description> </rdf:Description>
<rdf:Description rdf:about="http://vivoweb.org/ontology/degree/academicDegree17"> <rdf:Description rdf:about="http://vivoweb.org/ontology/degree/academicDegree17">
<rdfs:label xml:lang="en-US">B.D. Bachelor of Divinity</rdfs:label> <rdfs:label xml:lang="en-US">B.D. Bachelor of Divinity</rdfs:label>

View file

@ -13,7 +13,7 @@
xmlns:vitro="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#" xmlns:vitro="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:j.2="http://www.w3.org/2008/05/skos#" xmlns:j.2="http://www.w3.org/2008/05/skos#"
xmlns:afn="http://jena.hpl.hp.com/ARQ/function#" xmlns:afn="http://jena.apache.org/ARQ/function#"
xmlns:bibo="http://purl.org/ontology/bibo/" xmlns:bibo="http://purl.org/ontology/bibo/"
xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:j.3="http://www.w3.org/2003/06/sw-vocab-status/ns#" xmlns:j.3="http://www.w3.org/2003/06/sw-vocab-status/ns#"

View file

@ -6,7 +6,7 @@
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix core: <http://vivoweb.org/ontology/core#> . @prefix core: <http://vivoweb.org/ontology/core#> .
@prefix vivoweb: <http://vivoweb.org/ontology#> . @prefix vivoweb: <http://vivoweb.org/ontology#> .
@prefix afn: <http://jena.hpl.hp.com/ARQ/function#> . @prefix afn: <http://jena.apache.org/ARQ/function#> .
#### Check to see if the person being viewed has a first and last name. #### #### Check to see if the person being viewed has a first and last name. ####

View file

@ -1,5 +1,5 @@
@prefix hr: <http://vivo.cornell.edu/ns/hr/0.9/hr.owl#> . @prefix hr: <http://vivo.cornell.edu/ns/hr/0.9/hr.owl#> .
@prefix afn: <http://jena.hpl.hp.com/ARQ/function#> . @prefix afn: <http://jena.apache.org/ARQ/function#> .
@prefix : <http://vivoweb.org/ontology/activity-insight#> . @prefix : <http://vivoweb.org/ontology/activity-insight#> .
@prefix scires: <http://vivoweb.org/ontology/scientific-research#> . @prefix scires: <http://vivoweb.org/ontology/scientific-research#> .
@prefix aka: <http://vivoweb.org/ontology/aka#> . @prefix aka: <http://vivoweb.org/ontology/aka#> .

View file

@ -71,7 +71,7 @@
<geopolitical:sourceIdentifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string">http://data.worldbank.org/indicator/NY.GDP.MKTP.CD</geopolitical:sourceIdentifier> <geopolitical:sourceIdentifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string">http://data.worldbank.org/indicator/NY.GDP.MKTP.CD</geopolitical:sourceIdentifier>
<geopolitical:sourceIdentifier xml:lang="ar">http://data.albankaldawli.org/indicator/NY.GDP.MKTP.CD</geopolitical:sourceIdentifier> <geopolitical:sourceIdentifier xml:lang="ar">http://data.albankaldawli.org/indicator/NY.GDP.MKTP.CD</geopolitical:sourceIdentifier>
<geopolitical:sourceIdentifier xml:lang="en">http://data.worldbank.org/indicator/NY.GDP.MKTP.CD</geopolitical:sourceIdentifier> <geopolitical:sourceIdentifier xml:lang="en">http://data.worldbank.org/indicator/NY.GDP.MKTP.CD</geopolitical:sourceIdentifier>
<geopolitical:sourceIdentifier xml:lang="es">ttp://datos.bancomundial.org/indicador/NY.GDP.MKTP.CD</geopolitical:sourceIdentifier> <geopolitical:sourceIdentifier xml:lang="es">http://datos.bancomundial.org/indicador/NY.GDP.MKTP.CD</geopolitical:sourceIdentifier>
<geopolitical:sourceIdentifier xml:lang="fr">http://donnees.banquemondiale.org/indicateur/NY.GDP.MKTP.CD</geopolitical:sourceIdentifier> <geopolitical:sourceIdentifier xml:lang="fr">http://donnees.banquemondiale.org/indicateur/NY.GDP.MKTP.CD</geopolitical:sourceIdentifier>
</owl:DatatypeProperty> </owl:DatatypeProperty>

View file

@ -9,7 +9,7 @@
xmlns:swrlb="http://www.w3.org/2003/11/swrlb#" xmlns:swrlb="http://www.w3.org/2003/11/swrlb#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:bibo="http://purl.org/ontology/bibo/" xmlns:bibo="http://purl.org/ontology/bibo/"
xmlns:afn="http://jena.hpl.hp.com/ARQ/function#" xmlns:afn="http://jena.apache.org/ARQ/function#"
xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:scires="http://vivoweb.org/ontology/scientific-research#" xmlns:scires="http://vivoweb.org/ontology/scientific-research#"

View file

@ -9,7 +9,7 @@
xmlns:swrlb="http://www.w3.org/2003/11/swrlb#" xmlns:swrlb="http://www.w3.org/2003/11/swrlb#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:bibo="http://purl.org/ontology/bibo/" xmlns:bibo="http://purl.org/ontology/bibo/"
xmlns:afn="http://jena.hpl.hp.com/ARQ/function#" xmlns:afn="http://jena.apache.org/ARQ/function#"
xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:scires="http://vivoweb.org/ontology/scientific-research#" xmlns:scires="http://vivoweb.org/ontology/scientific-research#"

View file

@ -9,7 +9,7 @@
xmlns:swrlb="http://www.w3.org/2003/11/swrlb#" xmlns:swrlb="http://www.w3.org/2003/11/swrlb#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:bibo="http://purl.org/ontology/bibo/" xmlns:bibo="http://purl.org/ontology/bibo/"
xmlns:afn="http://jena.hpl.hp.com/ARQ/function#" xmlns:afn="http://jena.apache.org/ARQ/function#"
xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:scires="http://vivoweb.org/ontology/scientific-research#" xmlns:scires="http://vivoweb.org/ontology/scientific-research#"

View file

@ -1,4 +1,4 @@
@prefix afn: <http://jena.hpl.hp.com/ARQ/function#> . @prefix afn: <http://jena.apache.org/ARQ/function#> .
@prefix : <http://purl.obolibrary.org/obo/arg/app-views/vivo/vivo-app.owl#> . @prefix : <http://purl.obolibrary.org/obo/arg/app-views/vivo/vivo-app.owl#> .
@prefix hr: <http://vivo.cornell.edu/ns/hr/0.9/hr.owl#> . @prefix hr: <http://vivo.cornell.edu/ns/hr/0.9/hr.owl#> .
@prefix ns: <http://www.w3.org/2003/06/sw-vocab-status/ns#> . @prefix ns: <http://www.w3.org/2003/06/sw-vocab-status/ns#> .

View file

@ -1,5 +1,5 @@
@prefix hr: <http://vivo.cornell.edu/ns/hr/0.9/hr.owl#> . @prefix hr: <http://vivo.cornell.edu/ns/hr/0.9/hr.owl#> .
@prefix afn: <http://jena.hpl.hp.com/ARQ/function#> . @prefix afn: <http://jena.apache.org/ARQ/function#> .
@prefix : <http://vivoweb.org/ontology/activity-insight#> . @prefix : <http://vivoweb.org/ontology/activity-insight#> .
@prefix scires: <http://vivoweb.org/ontology/scientific-research#> . @prefix scires: <http://vivoweb.org/ontology/scientific-research#> .
@prefix aka: <http://vivoweb.org/ontology/aka#> . @prefix aka: <http://vivoweb.org/ontology/aka#> .

View file

@ -7,13 +7,13 @@
<groupId>org.vivoweb</groupId> <groupId>org.vivoweb</groupId>
<artifactId>vivo-installer-home</artifactId> <artifactId>vivo-installer-home</artifactId>
<version>1.9.0-SNAPSHOT</version> <version>1.10.0-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<parent> <parent>
<groupId>org.vivoweb</groupId> <groupId>org.vivoweb</groupId>
<artifactId>vivo-installer</artifactId> <artifactId>vivo-installer</artifactId>
<version>1.9.0-SNAPSHOT</version> <version>1.10.0-SNAPSHOT</version>
<relativePath>..</relativePath> <relativePath>..</relativePath>
</parent> </parent>

View file

@ -7,7 +7,7 @@
<groupId>org.vivoweb</groupId> <groupId>org.vivoweb</groupId>
<artifactId>vivo-installer</artifactId> <artifactId>vivo-installer</artifactId>
<version>1.9.0-SNAPSHOT</version> <version>1.10.0-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>VIVO Installer</name> <name>VIVO Installer</name>
@ -21,8 +21,8 @@
<plugin> <plugin>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<configuration> <configuration>
<source>1.7</source> <source>1.8</source>
<target>1.7</target> <target>1.8</target>
<encoding>UTF-8</encoding> <encoding>UTF-8</encoding>
</configuration> </configuration>
</plugin> </plugin>

View file

@ -7,13 +7,13 @@
<groupId>org.vivoweb</groupId> <groupId>org.vivoweb</groupId>
<artifactId>vivo-installer-solr</artifactId> <artifactId>vivo-installer-solr</artifactId>
<version>1.9.0-SNAPSHOT</version> <version>1.10.0-SNAPSHOT</version>
<packaging>war</packaging> <packaging>war</packaging>
<parent> <parent>
<groupId>org.vivoweb</groupId> <groupId>org.vivoweb</groupId>
<artifactId>vivo-installer</artifactId> <artifactId>vivo-installer</artifactId>
<version>1.9.0-SNAPSHOT</version> <version>1.10.0-SNAPSHOT</version>
<relativePath>..</relativePath> <relativePath>..</relativePath>
</parent> </parent>

View file

@ -7,13 +7,13 @@
<groupId>org.vivoweb</groupId> <groupId>org.vivoweb</groupId>
<artifactId>vivo-installer-vivo</artifactId> <artifactId>vivo-installer-vivo</artifactId>
<version>1.9.0-SNAPSHOT</version> <version>1.10.0-SNAPSHOT</version>
<packaging>war</packaging> <packaging>war</packaging>
<parent> <parent>
<groupId>org.vivoweb</groupId> <groupId>org.vivoweb</groupId>
<artifactId>vivo-installer</artifactId> <artifactId>vivo-installer</artifactId>
<version>1.9.0-SNAPSHOT</version> <version>1.10.0-SNAPSHOT</version>
<relativePath>..</relativePath> <relativePath>..</relativePath>
</parent> </parent>

View file

@ -46,4 +46,4 @@ log4j.logger.org.apache.jena.sdb.layout2.LoaderTuplesNodes=FATAL
log4j.logger.org.apache.jena.sdb.sql.SDBConnection=ERROR log4j.logger.org.apache.jena.sdb.sql.SDBConnection=ERROR
log4j.logger.org.openjena.riot=FATAL log4j.logger.org.openjena.riot=FATAL
log4j.logger.org.apache.jena.riot=FATAL log4j.logger.org.apache.jena.riot=FATAL
log4j.logger.org.directwebremoting=FATAL log4j.logger.org.directwebremoting=WARN

View file

@ -7,7 +7,7 @@
<groupId>org.vivoweb</groupId> <groupId>org.vivoweb</groupId>
<artifactId>vivo-project</artifactId> <artifactId>vivo-project</artifactId>
<version>1.9.0-SNAPSHOT</version> <version>1.10.0-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>VIVO</name> <name>VIVO</name>
@ -230,8 +230,8 @@
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<configuration> <configuration>
<source>1.7</source> <source>1.8</source>
<target>1.7</target> <target>1.8</target>
<encoding>UTF-8</encoding> <encoding>UTF-8</encoding>
</configuration> </configuration>
</plugin> </plugin>

View file

@ -1,7 +1,7 @@
package org.vivoweb.vivo.selenium; package org.vivoweb.vivo.selenium;
import com.sun.tools.internal.xjc.Driver; import com.sun.tools.internal.xjc.Driver;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang33.StringUtils;
import org.junit.Assert; import org.junit.Assert;
import org.openqa.selenium.Alert; import org.openqa.selenium.Alert;
import org.openqa.selenium.By; import org.openqa.selenium.By;

View file

@ -7,13 +7,13 @@
<groupId>org.vivoweb</groupId> <groupId>org.vivoweb</groupId>
<artifactId>vivo-webapp</artifactId> <artifactId>vivo-webapp</artifactId>
<version>1.9.0-SNAPSHOT</version> <version>1.10.0-SNAPSHOT</version>
<packaging>war</packaging> <packaging>war</packaging>
<parent> <parent>
<groupId>org.vivoweb</groupId> <groupId>org.vivoweb</groupId>
<artifactId>vivo-project</artifactId> <artifactId>vivo-project</artifactId>
<version>1.9.0-SNAPSHOT</version> <version>1.10.0-SNAPSHOT</version>
<relativePath>..</relativePath> <relativePath>..</relativePath>
</parent> </parent>
@ -69,7 +69,7 @@
<dependency> <dependency>
<groupId>org.vivoweb</groupId> <groupId>org.vivoweb</groupId>
<artifactId>vivo-api</artifactId> <artifactId>vivo-api</artifactId>
<version>1.9.0-SNAPSHOT</version> <version>1.10.0-SNAPSHOT</version>
</dependency> </dependency>
</dependencies> </dependencies>
</project> </project>

View file

@ -12,7 +12,7 @@
xmlns:vitro="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#" xmlns:vitro="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:j.2="http://www.w3.org/2008/05/skos#" xmlns:j.2="http://www.w3.org/2008/05/skos#"
xmlns:afn="http://jena.hpl.hp.com/ARQ/function#" xmlns:afn="http://jena.apache.org/ARQ/function#"
xmlns:bibo="http://purl.org/ontology/bibo/" xmlns:bibo="http://purl.org/ontology/bibo/"
xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:j.3="http://www.w3.org/2003/06/sw-vocab-status/ns#" xmlns:j.3="http://www.w3.org/2003/06/sw-vocab-status/ns#"

View file

@ -13,7 +13,7 @@
xmlns:vitro="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#" xmlns:vitro="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:j.2="http://www.w3.org/2008/05/skos#" xmlns:j.2="http://www.w3.org/2008/05/skos#"
xmlns:afn="http://jena.hpl.hp.com/ARQ/function#" xmlns:afn="http://jena.apache.org/ARQ/function#"
xmlns:bibo="http://purl.org/ontology/bibo/" xmlns:bibo="http://purl.org/ontology/bibo/"
xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:j.3="http://www.w3.org/2003/06/sw-vocab-status/ns#" xmlns:j.3="http://www.w3.org/2003/06/sw-vocab-status/ns#"

View file

@ -13,7 +13,7 @@
xmlns:vitro="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#" xmlns:vitro="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:skos="http://www.w3.org/2008/05/skos#" xmlns:skos="http://www.w3.org/2008/05/skos#"
xmlns:afn="http://jena.hpl.hp.com/ARQ/function#" xmlns:afn="http://jena.apache.org/ARQ/function#"
xmlns:bibo="http://purl.org/ontology/bibo/" xmlns:bibo="http://purl.org/ontology/bibo/"
xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:swvs="http://www.w3.org/2003/06/sw-vocab-status/ns#" xmlns:swvs="http://www.w3.org/2003/06/sw-vocab-status/ns#"

View file

@ -13,7 +13,7 @@
xmlns:vitro="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#" xmlns:vitro="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:skos="http://www.w3.org/2008/05/skos#" xmlns:skos="http://www.w3.org/2008/05/skos#"
xmlns:afn="http://jena.hpl.hp.com/ARQ/function#" xmlns:afn="http://jena.apache.org/ARQ/function#"
xmlns:bibo="http://purl.org/ontology/bibo/" xmlns:bibo="http://purl.org/ontology/bibo/"
xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:swvs="http://www.w3.org/2003/06/sw-vocab-status/ns#" xmlns:swvs="http://www.w3.org/2003/06/sw-vocab-status/ns#"

View file

@ -11,7 +11,7 @@
xmlns:vitro="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#" xmlns:vitro="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#"
xmlns:skos="http://www.w3.org/2008/05/skos#" xmlns:skos="http://www.w3.org/2008/05/skos#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:afn="http://jena.hpl.hp.com/ARQ/function#" xmlns:afn="http://jena.apache.org/ARQ/function#"
xmlns:bibo="http://purl.org/ontology/bibo/" xmlns:bibo="http://purl.org/ontology/bibo/"
xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:swvs="http://www.w3.org/2003/06/sw-vocab-status/ns#" xmlns:swvs="http://www.w3.org/2003/06/sw-vocab-status/ns#"

View file

@ -8,7 +8,7 @@
xmlns:vivo="http://vivoweb.org/ontology/core#" xmlns:vivo="http://vivoweb.org/ontology/core#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:bibo="http://purl.org/ontology/bibo/" xmlns:bibo="http://purl.org/ontology/bibo/"
xmlns:afn="http://jena.hpl.hp.com/ARQ/function#" xmlns:afn="http://jena.apache.org/ARQ/function#"
xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:scires="http://vivoweb.org/ontology/scientific-research#" xmlns:scires="http://vivoweb.org/ontology/scientific-research#"
xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcterms="http://purl.org/dc/terms/"

View file

@ -8,7 +8,7 @@
xmlns:vivo="http://vivoweb.org/ontology/core#" xmlns:vivo="http://vivoweb.org/ontology/core#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:bibo="http://purl.org/ontology/bibo/" xmlns:bibo="http://purl.org/ontology/bibo/"
xmlns:afn="http://jena.hpl.hp.com/ARQ/function#" xmlns:afn="http://jena.apache.org/ARQ/function#"
xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:scires="http://vivoweb.org/ontology/scientific-research#" xmlns:scires="http://vivoweb.org/ontology/scientific-research#"
xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcterms="http://purl.org/dc/terms/"

View file

@ -1060,7 +1060,7 @@
<servlet> <servlet>
<servlet-name>dwr-invoker</servlet-name> <servlet-name>dwr-invoker</servlet-name>
<servlet-class>uk.ltd.getahead.dwr.DWRServlet</servlet-class> <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>
<init-param> <init-param>
<param-name>debug</param-name> <param-name>debug</param-name>
<param-value>true</param-value> <param-value>true</param-value>
@ -1475,6 +1475,17 @@
<url-pattern>/orcid/*</url-pattern> <url-pattern>/orcid/*</url-pattern>
</servlet-mapping> </servlet-mapping>
<servlet>
<display-name>TpfServlet</display-name>
<servlet-name>TpfServlet</servlet-name>
<servlet-class>org.vivoweb.linkeddatafragments.servlet.VitroLinkedDataFragmentServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>TpfServlet</servlet-name>
<url-pattern>/tpf/*</url-pattern>
</servlet-mapping>
<!-- ==================== mime types ============================== --> <!-- ==================== mime types ============================== -->
<mime-mapping> <mime-mapping>

View file

@ -6,7 +6,7 @@
<list-view-config> <list-view-config>
<query-select> <query-select>
PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt; PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt;
PREFIX afn: &lt;http://jena.hpl.hp.com/ARQ/function#&gt; PREFIX afn: &lt;http://jena.apache.org/ARQ/function#&gt;
PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt; PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt;
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt; PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX owl: &lt;http://www.w3.org/2002/07/owl#&gt; PREFIX owl: &lt;http://www.w3.org/2002/07/owl#&gt;

View file

@ -6,7 +6,7 @@
<list-view-config> <list-view-config>
<query-select> <query-select>
PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt; PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt;
PREFIX afn: &lt;http://jena.hpl.hp.com/ARQ/function#&gt; PREFIX afn: &lt;http://jena.apache.org/ARQ/function#&gt;
PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt; PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt;
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt; PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX owl: &lt;http://www.w3.org/2002/07/owl#&gt; PREFIX owl: &lt;http://www.w3.org/2002/07/owl#&gt;

View file

@ -41,7 +41,7 @@
OPTIONAL { ?infoResource bibo:pageStart ?startPage } OPTIONAL { ?infoResource bibo:pageStart ?startPage }
OPTIONAL { ?infoResource bibo:pageEnd ?endPage } OPTIONAL { ?infoResource bibo:pageEnd ?endPage }
OPTIONAL { ?infoResource bibo:doi ?doi } OPTIONAL { ?infoResource bibo:doi ?doi }
OPTIONAL { ?infoResource bibo:pmid ?doi } OPTIONAL { ?infoResource bibo:pmid ?pmid }
OPTIONAL { ?infoResource bibo:isbn10 ?isbn10 } OPTIONAL { ?infoResource bibo:isbn10 ?isbn10 }
OPTIONAL { ?infoResource bibo:isbn13 ?isbn13 } OPTIONAL { ?infoResource bibo:isbn13 ?isbn13 }
OPTIONAL { ?infoResource core:placeOfPublication ?locale } OPTIONAL { ?infoResource core:placeOfPublication ?locale }

View file

@ -7,7 +7,7 @@
<query-select> <query-select>
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt; PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt; PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX afn: &lt;http://jena.hpl.hp.com/ARQ/function#&gt; PREFIX afn: &lt;http://jena.apache.org/ARQ/function#&gt;
SELECT DISTINCT ?dateTimeInterval ?label SELECT DISTINCT ?dateTimeInterval ?label
?valueStart ?valueStartName ?valueStart ?valueStartName

View file

@ -7,7 +7,7 @@
<query-select> <query-select>
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt; PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt; PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX afn: &lt;http://jena.hpl.hp.com/ARQ/function#&gt; PREFIX afn: &lt;http://jena.apache.org/ARQ/function#&gt;
SELECT DISTINCT ?dateTimeValue SELECT DISTINCT ?dateTimeValue
(afn:localname(?dateTimePrecision) AS ?precision) (afn:localname(?dateTimePrecision) AS ?precision)

View file

@ -7,7 +7,7 @@
<list-view-config> <list-view-config>
<query-select> <query-select>
PREFIX afn: &lt;http://jena.hpl.hp.com/ARQ/function#&gt; PREFIX afn: &lt;http://jena.apache.org/ARQ/function#&gt;
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt; PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt; PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt; PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;

View file

@ -7,7 +7,7 @@
<list-view-config> <list-view-config>
<query-select> <query-select>
PREFIX afn: &lt;http://jena.hpl.hp.com/ARQ/function#&gt; PREFIX afn: &lt;http://jena.apache.org/ARQ/function#&gt;
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt; PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt; PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt; PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;

View file

@ -8,7 +8,7 @@
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt; PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX vivo: &lt;http://vivoweb.org/ontology/core#&gt; PREFIX vivo: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt; PREFIX rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;
PREFIX afn: &lt;http://jena.hpl.hp.com/ARQ/function#&gt; PREFIX afn: &lt;http://jena.apache.org/ARQ/function#&gt;
SELECT ?concept ?conceptLabel ?conceptName ?vocabularySource ?vocabularySourceName SELECT ?concept ?conceptLabel ?conceptName ?vocabularySource ?vocabularySourceName
WHERE { WHERE {

View file

@ -5,7 +5,7 @@
<list-view-config> <list-view-config>
<query-select> <query-select>
PREFIX afn: &lt;http://jena.hpl.hp.com/ARQ/function#&gt; PREFIX afn: &lt;http://jena.apache.org/ARQ/function#&gt;
PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt; PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt;
PREFIX vivo: &lt;http://vivoweb.org/ontology/core#&gt; PREFIX vivo: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX owl: &lt;http://www.w3.org/2002/07/owl#&gt; PREFIX owl: &lt;http://www.w3.org/2002/07/owl#&gt;

View file

@ -5,7 +5,7 @@
<list-view-config> <list-view-config>
<query-select> <query-select>
PREFIX afn: &lt;http://jena.hpl.hp.com/ARQ/function#&gt; PREFIX afn: &lt;http://jena.apache.org/ARQ/function#&gt;
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt; PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt; PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX vitro: &lt;http://vitro.mannlib.cornell.edu/ns/vitro/0.7#&gt; PREFIX vitro: &lt;http://vitro.mannlib.cornell.edu/ns/vitro/0.7#&gt;

View file

@ -5,7 +5,7 @@
<list-view-config> <list-view-config>
<query-select> <query-select>
PREFIX afn: &lt;http://jena.hpl.hp.com/ARQ/function#&gt; PREFIX afn: &lt;http://jena.apache.org/ARQ/function#&gt;
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt; PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt; PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX vitro: &lt;http://vitro.mannlib.cornell.edu/ns/vitro/0.7#&gt; PREFIX vitro: &lt;http://vitro.mannlib.cornell.edu/ns/vitro/0.7#&gt;

View file

@ -5,7 +5,7 @@
<list-view-config> <list-view-config>
<query-select> <query-select>
PREFIX afn: &lt;http://jena.hpl.hp.com/ARQ/function#&gt; PREFIX afn: &lt;http://jena.apache.org/ARQ/function#&gt;
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt; PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt; PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX vitro: &lt;http://vitro.mannlib.cornell.edu/ns/vitro/0.7#&gt; PREFIX vitro: &lt;http://vitro.mannlib.cornell.edu/ns/vitro/0.7#&gt;

View file

@ -8,7 +8,7 @@
<list-view-config> <list-view-config>
<query-select> <query-select>
PREFIX afn: &lt;http://jena.hpl.hp.com/ARQ/function#&gt; PREFIX afn: &lt;http://jena.apache.org/ARQ/function#&gt;
PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt; PREFIX bibo: &lt;http://purl.org/ontology/bibo/&gt;
PREFIX vivo: &lt;http://vivoweb.org/ontology/core#&gt; PREFIX vivo: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX owl: &lt;http://www.w3.org/2002/07/owl#&gt; PREFIX owl: &lt;http://www.w3.org/2002/07/owl#&gt;

Some files were not shown because too many files have changed in this diff Show more