JavaDoc changes required to prevent the release process breaking
This commit is contained in:
parent
abac59cd18
commit
4349724207
124 changed files with 359 additions and 480 deletions
|
@ -370,8 +370,7 @@ public class FormUtils {
|
||||||
/**
|
/**
|
||||||
* Decodes a Base-64-encoded String of format
|
* Decodes a Base-64-encoded String of format
|
||||||
* key:value;key2:value2;key3:value, and puts the keys and values in a Map
|
* key:value;key2:value2;key3:value, and puts the keys and values in a Map
|
||||||
* @param params
|
* @param params Parameters
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public static Map beanParamMapFromString(String params) {
|
public static Map beanParamMapFromString(String params) {
|
||||||
String[] param = params.split(";");
|
String[] param = params.split(";");
|
||||||
|
|
|
@ -56,7 +56,7 @@ public class RelationshipChecker {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is this resource a member of this type? That is, is there an statement of
|
* Is this resource a member of this type? That is, is there an statement of
|
||||||
* the form: <resourceUri> rdfs:type <typeUri>
|
* the form: {@code <resourceUri> rdfs:type <typeUri> }
|
||||||
*/
|
*/
|
||||||
public boolean isResourceOfType(String resourceUri, String typeUri) {
|
public boolean isResourceOfType(String resourceUri, String typeUri) {
|
||||||
Selector selector = createSelector(resourceUri,
|
Selector selector = createSelector(resourceUri,
|
||||||
|
@ -86,7 +86,7 @@ public class RelationshipChecker {
|
||||||
/**
|
/**
|
||||||
* Get a list of the object URIs that satisfy this statement:
|
* Get a list of the object URIs that satisfy this statement:
|
||||||
*
|
*
|
||||||
* <resourceUri> <propertyUri> <objectUri>
|
* {@code <resourceUri> <propertyUri> <objectUri> }
|
||||||
*
|
*
|
||||||
* May return an empty list, but never returns null.
|
* May return an empty list, but never returns null.
|
||||||
*/
|
*/
|
||||||
|
@ -117,9 +117,9 @@ public class RelationshipChecker {
|
||||||
/**
|
/**
|
||||||
* Get a list of the object URIs that satisfy these statements:
|
* Get a list of the object URIs that satisfy these statements:
|
||||||
*
|
*
|
||||||
* <resourceUri> <linkUri> <contextNodeUri>
|
* {@code <resourceUri> <linkUri> <contextNodeUri> }
|
||||||
*
|
*
|
||||||
* <contextNodeUri> <propertyUri> <objectUri>
|
* {@code <contextNodeUri> <propertyUri> <objectUri> }
|
||||||
*
|
*
|
||||||
* May return an empty list, but never returns null.
|
* May return an empty list, but never returns null.
|
||||||
*/
|
*/
|
||||||
|
@ -161,11 +161,11 @@ public class RelationshipChecker {
|
||||||
*
|
*
|
||||||
* So we're looking for object URIs that statisfy these statements:
|
* So we're looking for object URIs that statisfy these statements:
|
||||||
*
|
*
|
||||||
* <resourceUri> <property1Uri> <linkNodeUri>
|
* {@code <resourceUri> <property1Uri> <linkNodeUri> }
|
||||||
*
|
*
|
||||||
* <linkNodeUri> rdfs:type <linkNodeTypeUri>
|
* {@code <linkNodeUri> rdfs:type <linkNodeTypeUri> }
|
||||||
*
|
*
|
||||||
* <linkNodeUri> <property2Uri> <objectUri>
|
* {@code <linkNodeUri> <property2Uri> <objectUri> }
|
||||||
*/
|
*/
|
||||||
public List<String> getObjectsThroughLinkingNode(String resourceUri,
|
public List<String> getObjectsThroughLinkingNode(String resourceUri,
|
||||||
String property1Uri, String linkNodeTypeUri, String property2Uri) {
|
String property1Uri, String linkNodeTypeUri, String property2Uri) {
|
||||||
|
|
|
@ -27,7 +27,7 @@ public interface RequiresActions {
|
||||||
* calling this method would then have the ability to
|
* calling this method would then have the ability to
|
||||||
* deny the action if it is not authorized.
|
* deny the action if it is not authorized.
|
||||||
*
|
*
|
||||||
* @param vreq
|
* @param vreq Vitro request
|
||||||
* @return Should not be null. Return Actions.AUTHORIZED
|
* @return Should not be null. Return Actions.AUTHORIZED
|
||||||
* if no authorization is required to do use the object.
|
* if no authorization is required to do use the object.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -182,7 +182,6 @@ public class ApplicationBean {
|
||||||
/**
|
/**
|
||||||
* Directory to find the images. Subdirectories include css, jsp and site_icons.
|
* Directory to find the images. Subdirectories include css, jsp and site_icons.
|
||||||
* Example: "themes/enhanced/"
|
* Example: "themes/enhanced/"
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public String getThemeDir(){
|
public String getThemeDir(){
|
||||||
if (themeInfo.isValidThemeDir(themeDir)) {
|
if (themeInfo.isValidThemeDir(themeDir)) {
|
||||||
|
|
|
@ -155,7 +155,7 @@ public class DataProperty extends Property implements Comparable<DataProperty>,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* adds a single DataPropertyStatement object to a DatatypeProperty's DataPropertyStatements list.
|
* adds a single DataPropertyStatement object to a DatatypeProperty's DataPropertyStatements list.
|
||||||
* @param dataPropertyStmt
|
* @param dataPropertyStmt Data property statement
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public void addDataPropertyStatement(DataPropertyStatement dataPropertyStmt){
|
public void addDataPropertyStatement(DataPropertyStatement dataPropertyStmt){
|
||||||
|
|
|
@ -43,14 +43,14 @@ public class FauxProperty extends BaseResourceBean implements ResourceBean,
|
||||||
private String customListView;
|
private String customListView;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Arguments are in this order to mimic the relationship: subject ==>
|
* Arguments are in this order to mimic the relationship: subject ==>
|
||||||
* property ==> object
|
* property ==> object
|
||||||
*
|
*
|
||||||
* @param domainURI
|
* @param domainURI
|
||||||
* URI of the subject class. May be null.
|
* URI of the subject class. May be null.
|
||||||
* @param baseURI
|
* @param baseURI
|
||||||
* URI of the property. May not be null.
|
* URI of the property. May not be null.
|
||||||
* @param rangeUri
|
* @param rangeURI
|
||||||
* URI of the object class. May be null.
|
* URI of the object class. May be null.
|
||||||
*/
|
*/
|
||||||
public FauxProperty(String domainURI, String baseURI, String rangeURI) {
|
public FauxProperty(String domainURI, String baseURI, String rangeURI) {
|
||||||
|
|
|
@ -109,7 +109,7 @@ public interface Individual extends ResourceBean, Comparable<Individual> {
|
||||||
* This is crap. It was put in so IndividualFiltering could filter object properties properly,
|
* This is crap. It was put in so IndividualFiltering could filter object properties properly,
|
||||||
* but what we really need is either: filters have a reference to a webappDaoFactory, or
|
* but what we really need is either: filters have a reference to a webappDaoFactory, or
|
||||||
* all ObjectPropertyStatements are resolved when they are created. See VIVO-946 and VIVO-984.
|
* all ObjectPropertyStatements are resolved when they are created. See VIVO-946 and VIVO-984.
|
||||||
* @param list
|
* @param list Object property statements
|
||||||
*/
|
*/
|
||||||
void resolveAsFauxPropertyStatements(List<ObjectPropertyStatement> list);
|
void resolveAsFauxPropertyStatements(List<ObjectPropertyStatement> list);
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ import edu.cornell.mannlib.vitro.webapp.filestorage.model.ImageInfo;
|
||||||
public class IndividualImpl extends BaseResourceBean implements Individual, Comparable<Individual> {
|
public class IndividualImpl extends BaseResourceBean implements Individual, Comparable<Individual> {
|
||||||
/**
|
/**
|
||||||
* This can be used as a "not initialized" indicator for a property that
|
* This can be used as a "not initialized" indicator for a property that
|
||||||
* could validly be set to <code>null</code>. If <code>get()</code> is
|
* could validly be set to {@code null}. If {@code get()} is
|
||||||
* called on such a property, and the property has this value, the correct
|
* called on such a property, and the property has this value, the correct
|
||||||
* value can be fetched and cached.
|
* value can be fetched and cached.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -253,7 +253,6 @@ public class ObjectProperty extends Property implements Comparable<ObjectPropert
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* adds a single ObjectPropertyStatement object to Property's object property statements List.
|
* adds a single ObjectPropertyStatement object to Property's object property statements List.
|
||||||
* @param e2e
|
|
||||||
*/
|
*/
|
||||||
public final void addObjectPropertyStatement(ObjectPropertyStatement objPropertyStmt){
|
public final void addObjectPropertyStatement(ObjectPropertyStatement objPropertyStmt){
|
||||||
if( objPropertyStmt == null ) return;
|
if( objPropertyStmt == null ) return;
|
||||||
|
|
|
@ -62,7 +62,6 @@ public class PropertyGroup extends BaseResourceBean implements Comparable<Proper
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sorts PropertyGroup objects by group rank, then alphanumeric.
|
* Sorts PropertyGroup objects by group rank, then alphanumeric.
|
||||||
* @author bdc34 modified by jc55, bjl23
|
|
||||||
*/
|
*/
|
||||||
public int compareTo(PropertyGroup o2) {
|
public int compareTo(PropertyGroup o2) {
|
||||||
Collator collator = Collator.getInstance();
|
Collator collator = Collator.getInstance();
|
||||||
|
|
|
@ -152,7 +152,6 @@ public class VClassGroup extends LinkedList <VClass> implements Comparable<VClas
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sorts VClassGroup objects by group rank, then alphanumeric.
|
* Sorts VClassGroup objects by group rank, then alphanumeric.
|
||||||
* @author bdc34 modified by jc55, bjl23
|
|
||||||
* @return a negative integer, zero, or a positive integer as the
|
* @return a negative integer, zero, or a positive integer as the
|
||||||
* first argument is less than, equal to, or greater than the
|
* first argument is less than, equal to, or greater than the
|
||||||
* second.
|
* second.
|
||||||
|
|
|
@ -46,7 +46,6 @@ public class VClassList extends VClass {
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* override this if you want a different sorting.
|
* override this if you want a different sorting.
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public Comparator<Individual> getCompare(){
|
public Comparator<Individual> getCompare(){
|
||||||
return new Comparator<Individual>(){
|
return new Comparator<Individual>(){
|
||||||
|
|
|
@ -125,7 +125,7 @@ public abstract class ConfigurationProperties {
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the value of the property, or <code>null</code> if the property has
|
* Get the value of the property, or {@code null} if the property has
|
||||||
* not been assigned a value.
|
* not been assigned a value.
|
||||||
*/
|
*/
|
||||||
public abstract String getProperty(String key);
|
public abstract String getProperty(String key);
|
||||||
|
|
|
@ -48,8 +48,6 @@ public class DashboardPropertyListController extends VitroHttpServlet {
|
||||||
*
|
*
|
||||||
* Expected Attributes:
|
* Expected Attributes:
|
||||||
* entity - set to entity to display properties for.
|
* entity - set to entity to display properties for.
|
||||||
*
|
|
||||||
* @author bdc34, then jc55
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private static final Log log = LogFactory.getLog(DashboardPropertyListController.class.getName());
|
private static final Log log = LogFactory.getLog(DashboardPropertyListController.class.getName());
|
||||||
|
|
|
@ -226,7 +226,7 @@ public class MailUsersServlet extends VitroHttpServlet {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Intended to mangle url so it can get through spam filtering
|
/** Intended to mangle url so it can get through spam filtering
|
||||||
* http://host/dir/servlet?param=value -> host: dir/servlet?param=value */
|
* http://host/dir/servlet?param=value -> host: dir/servlet?param=value */
|
||||||
public String stripProtocol( String in ){
|
public String stripProtocol( String in ){
|
||||||
if( in == null )
|
if( in == null )
|
||||||
return "";
|
return "";
|
||||||
|
|
|
@ -37,8 +37,8 @@ import org.apache.commons.logging.LogFactory;
|
||||||
*
|
*
|
||||||
* The List of FileItems includes both "formField" items and "file" items. As
|
* The List of FileItems includes both "formField" items and "file" items. As
|
||||||
* with the usual parameters on a request, we can have more than one value with
|
* with the usual parameters on a request, we can have more than one value with
|
||||||
* the same name. So this creates a map of <String, List<String>> to hold the
|
* the same name. So this creates a map of <String, List<String>> to hold the
|
||||||
* parameters, and a map of <String, List<FileItem>> to hold the files.
|
* parameters, and a map of <String, List<FileItem>> to hold the files.
|
||||||
*
|
*
|
||||||
* The parameters will be available to the wrapper through the normal methods.
|
* The parameters will be available to the wrapper through the normal methods.
|
||||||
* The files will be available as an attribute that holds the map. Also, a
|
* The files will be available as an attribute that holds the map. Also, a
|
||||||
|
|
|
@ -197,7 +197,7 @@ public class ContactMailController extends FreemarkerHttpServlet {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Intended to mangle url so it can get through spam filtering
|
/** Intended to mangle url so it can get through spam filtering
|
||||||
* http://host/dir/servlet?param=value -> host: dir/servlet?param=value */
|
* http://host/dir/servlet?param=value -> host: dir/servlet?param=value */
|
||||||
public String stripProtocol( String in ){
|
public String stripProtocol( String in ){
|
||||||
if( in == null )
|
if( in == null )
|
||||||
return "";
|
return "";
|
||||||
|
|
|
@ -429,8 +429,6 @@ public class FreemarkerHttpServlet extends VitroHttpServlet {
|
||||||
* shared variables in the Configuration. (Though we could reset them like other
|
* shared variables in the Configuration. (Though we could reset them like other
|
||||||
* shared variables. These variables are not needed outside the page and body templates,
|
* shared variables. These variables are not needed outside the page and body templates,
|
||||||
* however. If they are needed elsewhere, add to shared variables.
|
* however. If they are needed elsewhere, add to shared variables.
|
||||||
* @param VitroRequest vreq
|
|
||||||
* @return Map<String, Object>
|
|
||||||
*/
|
*/
|
||||||
// RY This is protected instead of private so FreeMarkerComponentGenerator can access.
|
// RY This is protected instead of private so FreeMarkerComponentGenerator can access.
|
||||||
// Once we don't need that (i.e., jsps have been eliminated) it can be made private.
|
// Once we don't need that (i.e., jsps have been eliminated) it can be made private.
|
||||||
|
|
|
@ -106,7 +106,7 @@ public class ImageUploadHelper {
|
||||||
* The image must be present and non-empty, and must have a mime-type that
|
* The image must be present and non-empty, and must have a mime-type that
|
||||||
* represents an image we support.
|
* represents an image we support.
|
||||||
*
|
*
|
||||||
* We rely on the fact that a {@link FileUploadServletRequest} will always
|
* We rely on the fact that a FileUploadServletRequest will always
|
||||||
* have a map of {@link FileItem}s, even if it is empty. However, that map
|
* have a map of {@link FileItem}s, even if it is empty. However, that map
|
||||||
* may not contain the field that we want, or that field may contain an
|
* may not contain the field that we want, or that field may contain an
|
||||||
* empty file.
|
* empty file.
|
||||||
|
|
|
@ -125,9 +125,9 @@ public class GrefineMqlreadServlet extends VitroHttpServlet {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct json from query String
|
* Construct json from query String
|
||||||
* @param query
|
* @param query Query
|
||||||
* @param subjectUriList
|
* @param subjectUriList Subject URIs
|
||||||
* @param propertyUriMap
|
* @param propertyUriMap Property maps
|
||||||
*/
|
*/
|
||||||
private void parseQuery(String query, ArrayList<String> subjectUriList, Map<String, JSONArray> propertyUriMap) {
|
private void parseQuery(String query, ArrayList<String> subjectUriList, Map<String, JSONArray> propertyUriMap) {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -172,9 +172,8 @@ public class JSONReconcileServlet extends VitroHttpServlet {
|
||||||
/**
|
/**
|
||||||
* Returns a default JSON response.
|
* Returns a default JSON response.
|
||||||
*
|
*
|
||||||
* @param req
|
* @param req Servlet Request
|
||||||
* @param resp
|
* @param resp Servlet Response
|
||||||
* @return
|
|
||||||
* @throws ServletException
|
* @throws ServletException
|
||||||
*/
|
*/
|
||||||
protected JSONObject getMetadata(HttpServletRequest req, HttpServletResponse resp, String defaultNamespace,
|
protected JSONObject getMetadata(HttpServletRequest req, HttpServletResponse resp, String defaultNamespace,
|
||||||
|
|
|
@ -78,7 +78,6 @@ public class ExtendedRdfAssembler {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public ResponseValues assembleRdf() {
|
public ResponseValues assembleRdf() {
|
||||||
OntModel ontModel = vreq.getJenaOntModel();
|
OntModel ontModel = vreq.getJenaOntModel();
|
||||||
|
|
|
@ -229,8 +229,7 @@ public class JenaXMLFileUpload extends JenaIngestController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Save files to baseDirectoryForFiles and return a list of File objects.
|
* Save files to baseDirectoryForFiles and return a list of File objects.
|
||||||
* @param fileStreams
|
* @param fileStreams File streams to process
|
||||||
* @return
|
|
||||||
* @throws ServletException
|
* @throws ServletException
|
||||||
*/
|
*/
|
||||||
private List<File> saveFiles( Map<String, List<FileItem>> fileStreams ) throws ServletException{
|
private List<File> saveFiles( Map<String, List<FileItem>> fileStreams ) throws ServletException{
|
||||||
|
|
|
@ -33,13 +33,14 @@ import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory;
|
||||||
* If there are more entities the last item on the returned array will be an object
|
* If there are more entities the last item on the returned array will be an object
|
||||||
* with no id property. It will look like this:
|
* with no id property. It will look like this:
|
||||||
*
|
*
|
||||||
|
* {@code
|
||||||
* {"resultGroup":0,
|
* {"resultGroup":0,
|
||||||
* "resultKey":"2WEK2306",
|
* "resultKey":"2WEK2306",
|
||||||
* "nextUrl":"http://caruso.mannlib.cornell.edu:8080/vitro/dataservice?getEntitiesByVClass=1&resultKey=2WEK2306&resultGroup=1&vclassId=null",
|
* "nextUrl":"http://caruso.mannlib.cornell.edu:8080/vitro/dataservice?getEntitiesByVClass=1&resultKey=2WEK2306&resultGroup=1&vclassId=null",
|
||||||
* "entsInVClass":1752,
|
* "entsInVClass":1752,
|
||||||
* "nextResultGroup":1,
|
* "nextResultGroup":1,
|
||||||
* "standardReplySize":256}
|
* "standardReplySize":256}
|
||||||
*
|
* }
|
||||||
*/
|
*/
|
||||||
public class GetEntitiesByVClass extends JsonArrayProducer {
|
public class GetEntitiesByVClass extends JsonArrayProducer {
|
||||||
private static final Log log = LogFactory.getLog(GetEntitiesByVClass.class);
|
private static final Log log = LogFactory.getLog(GetEntitiesByVClass.class);
|
||||||
|
|
|
@ -22,22 +22,21 @@ public interface IndividualDao {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the specified Individual to the specified VClass (i.e. adds rdf:type).
|
* Adds the specified Individual to the specified VClass (i.e. adds rdf:type).
|
||||||
* @param individualURI
|
* @param individualURI Individual URI
|
||||||
* @param vclassURI
|
* @param vclassURI URI for VClass
|
||||||
*/
|
*/
|
||||||
public abstract void addVClass(String individualURI, String vclassURI);
|
public abstract void addVClass(String individualURI, String vclassURI);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes the specified Individual from the specificed VClass (i.e. retracts rdf:type)
|
* Removes the specified Individual from the specificed VClass (i.e. retracts rdf:type)
|
||||||
* @param individualURI
|
* @param individualURI Individual URI
|
||||||
* @param vclassURI
|
* @param vclassURI URI for VCLass
|
||||||
*/
|
*/
|
||||||
public abstract void removeVClass(String individualURI, String vclassURI);
|
public abstract void removeVClass(String individualURI, String vclassURI);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a list of all the Individuals in the specified VClass.
|
* Returns a list of all the Individuals in the specified VClass.
|
||||||
* @param vclass
|
* @param vclass VClass
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public abstract List <Individual> getIndividualsByVClass(VClass vclass);
|
public abstract List <Individual> getIndividualsByVClass(VClass vclass);
|
||||||
|
|
||||||
|
@ -53,7 +52,7 @@ public interface IndividualDao {
|
||||||
int quantity);
|
int quantity);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @returns new individual URI if success.
|
* @return new individual URI if success.
|
||||||
*/
|
*/
|
||||||
public abstract String insertNewIndividual(Individual individual) throws InsertException;
|
public abstract String insertNewIndividual(Individual individual) throws InsertException;
|
||||||
|
|
||||||
|
@ -65,7 +64,7 @@ public interface IndividualDao {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* deletes a single individual from the knowledge base.
|
* deletes a single individual from the knowledge base.
|
||||||
* @param id
|
* @param individualURI URI of an individual
|
||||||
* @return 0 on failed
|
* @return 0 on failed
|
||||||
*/
|
*/
|
||||||
public abstract int deleteIndividual(String individualURI);
|
public abstract int deleteIndividual(String individualURI);
|
||||||
|
@ -78,7 +77,7 @@ public interface IndividualDao {
|
||||||
* Get a row from the entities table and make an Entity.
|
* Get a row from the entities table and make an Entity.
|
||||||
* PropertiesList will not be filled out.
|
* PropertiesList will not be filled out.
|
||||||
* VClass will be filled out.
|
* VClass will be filled out.
|
||||||
* @param entityId
|
* @param individualURI URI for Individual
|
||||||
* @return an Entity object or null if not found.
|
* @return an Entity object or null if not found.
|
||||||
*/
|
*/
|
||||||
public abstract Individual getIndividualByURI(String individualURI);
|
public abstract Individual getIndividualByURI(String individualURI);
|
||||||
|
|
|
@ -19,10 +19,10 @@ public interface ObjectPropertyDao extends PropertyDao {
|
||||||
* Use this method to supply a base ObjectProperty whose fields will be updated
|
* Use this method to supply a base ObjectProperty whose fields will be updated
|
||||||
* as necessary to correspond to the configuration for the specified Domain
|
* as necessary to correspond to the configuration for the specified Domain
|
||||||
* and Range.
|
* and Range.
|
||||||
* @param objectPropertyURI
|
* @param objectPropertyURI Object Property URI
|
||||||
* @param domainURI
|
* @param domainURI Domain URI
|
||||||
* @param rangeURI
|
* @param rangeURI Range URI
|
||||||
* @param base
|
* @param base Object property
|
||||||
* @return ObjectProperty
|
* @return ObjectProperty
|
||||||
*/
|
*/
|
||||||
public ObjectProperty getObjectPropertyByURIs(String objectPropertyURI, String domainURI, String rangeURI, ObjectProperty base);
|
public ObjectProperty getObjectPropertyByURIs(String objectPropertyURI, String domainURI, String rangeURI, ObjectProperty base);
|
||||||
|
|
|
@ -10,14 +10,11 @@ public interface PageDao {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a list of urlMappings to URIs.
|
* Returns a list of urlMappings to URIs.
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
Map<String, String> getPageMappings();
|
Map<String, String> getPageMappings();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns URI of home page.
|
* Returns URI of home page.
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
String getHomePageUri();
|
String getHomePageUri();
|
||||||
|
|
||||||
|
|
|
@ -89,15 +89,15 @@ public interface VClassDao {
|
||||||
void addVClassesToGroups(List <VClassGroup> groups );
|
void addVClassesToGroups(List <VClassGroup> groups );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param vc1
|
* @param vc1 VCLass
|
||||||
* @param vc2
|
* @param vc2 VClass
|
||||||
* @return true if vc1 subClassOf vc2
|
* @return true if vc1 subClassOf vc2
|
||||||
*/
|
*/
|
||||||
boolean isSubClassOf(VClass vc1, VClass vc2);
|
boolean isSubClassOf(VClass vc1, VClass vc2);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param vc1
|
* @param vclassURI1 VClass URI
|
||||||
* @param vc2
|
* @param vclassURI2 VClass URI
|
||||||
* @return true if vc1 subClassOf vc2
|
* @return true if vc1 subClassOf vc2
|
||||||
*/
|
*/
|
||||||
boolean isSubClassOf(String vclassURI1, String vclassURI2);
|
boolean isSubClassOf(String vclassURI1, String vclassURI2);
|
||||||
|
|
|
@ -13,9 +13,7 @@ public interface VClassGroupDao {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets all of the ClassGroups as a map ordered by displayRank.
|
* Gets all of the ClassGroups as a map ordered by displayRank.
|
||||||
* VClassGroup.getPublicName() -> VClassGroup
|
* VClassGroup.getPublicName() -> VClassGroup
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public abstract LinkedHashMap<String,VClassGroup> getClassGroupMap();
|
public abstract LinkedHashMap<String,VClassGroup> getClassGroupMap();
|
||||||
|
|
||||||
|
@ -27,24 +25,24 @@ public interface VClassGroupDao {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a list of VClassGroups with their associated VClasses
|
* Return a list of VClassGroups with their associated VClasses
|
||||||
* @param displayOrder
|
* @param displayOrder Display order
|
||||||
* @return List
|
* @return List
|
||||||
*/
|
*/
|
||||||
public abstract List<VClassGroup> getPublicGroupsWithVClasses(boolean displayOrder);
|
public abstract List<VClassGroup> getPublicGroupsWithVClasses(boolean displayOrder);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a list of VClassGroups with their associated VClasses
|
* Return a list of VClassGroups with their associated VClasses
|
||||||
* @param displayOrder
|
* @param displayOrder Display order
|
||||||
* @param includeUninstantiatedClasses
|
* @param includeUninstantiatedClasses Include all classes
|
||||||
* @return List
|
* @return List
|
||||||
*/
|
*/
|
||||||
public abstract List<VClassGroup> getPublicGroupsWithVClasses(boolean displayOrder, boolean includeUninstantiatedClasses);
|
public abstract List<VClassGroup> getPublicGroupsWithVClasses(boolean displayOrder, boolean includeUninstantiatedClasses);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a list of VClassGroups with their associated VClasses
|
* Return a list of VClassGroups with their associated VClasses
|
||||||
* @param displayOrder
|
* @param displayOrder Display order
|
||||||
* @param includeUninstantiatedClasses
|
* @param includeUninstantiatedClasses Include all classes
|
||||||
* @param getIndividualCount
|
* @param getIndividualCount Retrieve individual count
|
||||||
* @return List
|
* @return List
|
||||||
*/
|
*/
|
||||||
public abstract List<VClassGroup> getPublicGroupsWithVClasses(boolean displayOrder, boolean includeUninstantiatedClasses, boolean getIndividualCount);
|
public abstract List<VClassGroup> getPublicGroupsWithVClasses(boolean displayOrder, boolean includeUninstantiatedClasses, boolean getIndividualCount);
|
||||||
|
|
|
@ -32,8 +32,7 @@ public interface WebappDaoFactory {
|
||||||
/**
|
/**
|
||||||
* Check if a given URI string exists in the system:
|
* Check if a given URI string exists in the system:
|
||||||
* checks for the following conditions: URI found as subject in a statement or an object or as a property
|
* checks for the following conditions: URI found as subject in a statement or an object or as a property
|
||||||
* @param uriStr
|
* @param uriStr URI String
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public boolean hasExistingURI(String uriStr);
|
public boolean hasExistingURI(String uriStr);
|
||||||
|
|
||||||
|
@ -54,15 +53,13 @@ public interface WebappDaoFactory {
|
||||||
/**
|
/**
|
||||||
* Copy this DAO factory to a new object associated with the specified user
|
* Copy this DAO factory to a new object associated with the specified user
|
||||||
* URI, or return the same factory if a user-aware version cannot be used.
|
* URI, or return the same factory if a user-aware version cannot be used.
|
||||||
* @param userURI
|
* @param userURI User URI
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public WebappDaoFactory getUserAwareDaoFactory(String userURI);
|
public WebappDaoFactory getUserAwareDaoFactory(String userURI);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return URI of user associated with this WebappDaoFactory,
|
* Return URI of user associated with this WebappDaoFactory,
|
||||||
* or null if not applicable.
|
* or null if not applicable.
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public String getUserURI();
|
public String getUserURI();
|
||||||
|
|
||||||
|
|
|
@ -308,7 +308,7 @@ public class IndividualDaoSDB extends IndividualDaoJena {
|
||||||
/**
|
/**
|
||||||
* fills in the Individual objects needed for any ObjectPropertyStatements
|
* fills in the Individual objects needed for any ObjectPropertyStatements
|
||||||
* attached to the specified individual.
|
* attached to the specified individual.
|
||||||
* @param entity
|
* @param entity An individual
|
||||||
*/
|
*/
|
||||||
private void fillIndividualsForObjectPropertyStatements(Individual entity){
|
private void fillIndividualsForObjectPropertyStatements(Individual entity){
|
||||||
getOntModel().enterCriticalSection(Lock.READ);
|
getOntModel().enterCriticalSection(Lock.READ);
|
||||||
|
|
|
@ -461,9 +461,10 @@ public class JenaBaseDao extends JenaBaseDaoCon {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* convenience method
|
* convenience method
|
||||||
* @param ind
|
* @param res Resource
|
||||||
* @param dataprop
|
* @param dataprop Datatype property
|
||||||
* @param value
|
* @param value Date
|
||||||
|
* @param model Jena Model
|
||||||
*/
|
*/
|
||||||
protected synchronized void addPropertyDateValue(Resource res, DatatypeProperty dataprop, Date value, Model model) {
|
protected synchronized void addPropertyDateValue(Resource res, DatatypeProperty dataprop, Date value, Model model) {
|
||||||
if (dataprop != null && value != null) {
|
if (dataprop != null && value != null) {
|
||||||
|
@ -916,7 +917,7 @@ public class JenaBaseDao extends JenaBaseDaoCon {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks a URI for validity. Jena models can store invalid URIs, but this causes RDF/XML output serialization to fail.
|
* Checks a URI for validity. Jena models can store invalid URIs, but this causes RDF/XML output serialization to fail.
|
||||||
* @param uri
|
* @param uri URI
|
||||||
* @return null if URI is good, otherwise an error message String
|
* @return null if URI is good, otherwise an error message String
|
||||||
*/
|
*/
|
||||||
protected String checkURI( String uri ) {
|
protected String checkURI( String uri ) {
|
||||||
|
@ -1047,8 +1048,8 @@ public class JenaBaseDao extends JenaBaseDaoCon {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns additions and retractions to perform
|
* Returns additions and retractions to perform
|
||||||
* @param ontRes
|
* @param ontRes Ontology resource
|
||||||
* @param ontModel
|
* @param ontModel Ontology model
|
||||||
* @return Model[] where [0] is retractions and [1] is additions
|
* @return Model[] where [0] is retractions and [1] is additions
|
||||||
*/
|
*/
|
||||||
protected Model[] getSmartRemoval(OntResource ontRes, OntModel ontModel) {
|
protected Model[] getSmartRemoval(OntResource ontRes, OntModel ontModel) {
|
||||||
|
|
|
@ -60,7 +60,7 @@ public class JenaModelUtils {
|
||||||
* an ontology. Also creates annotations to place each root class and all
|
* an ontology. Also creates annotations to place each root class and all
|
||||||
* of its children in the appropriate groups. In the case of multiple
|
* of its children in the appropriate groups. In the case of multiple
|
||||||
* inheritance, classgroup assignment will be arbitrary.
|
* inheritance, classgroup assignment will be arbitrary.
|
||||||
* @param wadf
|
* @param wadf DAO Factory
|
||||||
* @param tboxModel containing ontology classes
|
* @param tboxModel containing ontology classes
|
||||||
* @return resultArray of OntModels, where resultArray[0] is the model containing
|
* @return resultArray of OntModels, where resultArray[0] is the model containing
|
||||||
* the triples about the classgroups, and resultArray[1] is the model containing
|
* the triples about the classgroups, and resultArray[1] is the model containing
|
||||||
|
|
|
@ -370,8 +370,7 @@ public class PageDaoJena extends JenaBaseDao implements PageDao {
|
||||||
* Gets a URI for display:forClassGroup for the specified page.
|
* Gets a URI for display:forClassGroup for the specified page.
|
||||||
* Only one value is expected in the model.
|
* Only one value is expected in the model.
|
||||||
* This may return null if there is no ClassGroup associated with the page.
|
* This may return null if there is no ClassGroup associated with the page.
|
||||||
* @param pageUri
|
* @param pageUri Page URI
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getClassGroupPage(String pageUri) {
|
public String getClassGroupPage(String pageUri) {
|
||||||
|
|
|
@ -412,7 +412,7 @@ public class PropertyDaoJena extends JenaBaseDao implements PropertyDao {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find named classes to which a restriction "applies"
|
* Find named classes to which a restriction "applies"
|
||||||
* @param resourceURI identifier of a class
|
* @param ontClass Ontology class
|
||||||
* @return set of class URIs
|
* @return set of class URIs
|
||||||
*
|
*
|
||||||
* Note: this method assumes that the caller holds a read lock on
|
* Note: this method assumes that the caller holds a read lock on
|
||||||
|
@ -461,7 +461,7 @@ public class PropertyDaoJena extends JenaBaseDao implements PropertyDao {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* requires SPARQL 1.1 (or ARQ) property path support
|
* requires SPARQL 1.1 (or ARQ) property path support
|
||||||
* @param vclassURI
|
* @param vclassURI VClass URI
|
||||||
* @return list of property resources with union domains that include the vclass
|
* @return list of property resources with union domains that include the vclass
|
||||||
*/
|
*/
|
||||||
protected List<Resource> getPropertiesWithAppropriateDomainFor(String vclassURI) {
|
protected List<Resource> getPropertiesWithAppropriateDomainFor(String vclassURI) {
|
||||||
|
|
|
@ -60,7 +60,7 @@ public class RDFServiceGraph implements GraphWithPerform {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a SparqlGraph for the union of named graphs in a remote repository
|
* Returns a SparqlGraph for the union of named graphs in a remote repository
|
||||||
* @param endpointURI
|
* @param rdfService RDF Service
|
||||||
*/
|
*/
|
||||||
public RDFServiceGraph(RDFService rdfService) {
|
public RDFServiceGraph(RDFService rdfService) {
|
||||||
this(rdfService, null);
|
this(rdfService, null);
|
||||||
|
@ -68,8 +68,8 @@ public class RDFServiceGraph implements GraphWithPerform {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a SparqlGraph for a particular named graph in a remote repository
|
* Returns a SparqlGraph for a particular named graph in a remote repository
|
||||||
* @param endpointURI
|
* @param rdfService RDFService
|
||||||
* @param graphURI
|
* @param graphURI Graph URI
|
||||||
*/
|
*/
|
||||||
public RDFServiceGraph(RDFService rdfService, String graphURI) {
|
public RDFServiceGraph(RDFService rdfService, String graphURI) {
|
||||||
this.rdfService = rdfService;
|
this.rdfService = rdfService;
|
||||||
|
|
|
@ -89,8 +89,7 @@ public class RDFServiceGraphBulkUpdater implements BulkUpdateHandler {
|
||||||
/**
|
/**
|
||||||
* Returns a pair of models. The first contains any statement containing at
|
* Returns a pair of models. The first contains any statement containing at
|
||||||
* least one blank node. The second contains all remaining statements.
|
* least one blank node. The second contains all remaining statements.
|
||||||
* @param g
|
* @param g Graph
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private Model[] separateStatementsWithBlankNodes(Graph g) {
|
private Model[] separateStatementsWithBlankNodes(Graph g) {
|
||||||
|
|
|
@ -60,7 +60,7 @@ public class SparqlGraph implements GraphWithPerform {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a SparqlGraph for the union of named graphs in a remote repository
|
* Returns a SparqlGraph for the union of named graphs in a remote repository
|
||||||
* @param endpointURI
|
* @param endpointURI Endpoint URI
|
||||||
*/
|
*/
|
||||||
public SparqlGraph(String endpointURI) {
|
public SparqlGraph(String endpointURI) {
|
||||||
this(endpointURI, null);
|
this(endpointURI, null);
|
||||||
|
@ -68,8 +68,8 @@ public class SparqlGraph implements GraphWithPerform {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a SparqlGraph for a particular named graph in a remote repository
|
* Returns a SparqlGraph for a particular named graph in a remote repository
|
||||||
* @param endpointURI
|
* @param endpointURI Endpoint URI
|
||||||
* @param graphURI
|
* @param graphURI Graph URI
|
||||||
*/
|
*/
|
||||||
public SparqlGraph(String endpointURI, String graphURI) {
|
public SparqlGraph(String endpointURI, String graphURI) {
|
||||||
this.endpointURI = endpointURI;
|
this.endpointURI = endpointURI;
|
||||||
|
|
|
@ -82,8 +82,7 @@ public class SparqlGraphBulkUpdater extends SimpleBulkUpdateHandler {
|
||||||
/**
|
/**
|
||||||
* Returns a pair of models. The first contains any statement containing at
|
* Returns a pair of models. The first contains any statement containing at
|
||||||
* least one blank node. The second contains all remaining statements.
|
* least one blank node. The second contains all remaining statements.
|
||||||
* @param g
|
* @param g Jena Graph
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private Model[] separateStatementsWithBlankNodes(Graph g) {
|
private Model[] separateStatementsWithBlankNodes(Graph g) {
|
||||||
|
|
|
@ -493,7 +493,6 @@ public class VClassDaoJena extends JenaBaseDao implements VClassDao {
|
||||||
* of determining whether something is a root class.
|
* of determining whether something is a root class.
|
||||||
* We also avoid ClassCastExceptions deep in Jena-land by eschewing Jena's
|
* We also avoid ClassCastExceptions deep in Jena-land by eschewing Jena's
|
||||||
* listSuperClasses() method.
|
* listSuperClasses() method.
|
||||||
* @author bjl23
|
|
||||||
*/
|
*/
|
||||||
private Iterator<OntClass> smarterListHierarchyRootClasses(OntModel ontModel, String ontologyURI) {
|
private Iterator<OntClass> smarterListHierarchyRootClasses(OntModel ontModel, String ontologyURI) {
|
||||||
List<OntClass> rootClassList = new ArrayList<OntClass>();
|
List<OntClass> rootClassList = new ArrayList<OntClass>();
|
||||||
|
|
|
@ -451,7 +451,7 @@ public class WebappDaoFactoryJena implements WebappDaoFactory {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method for creating a copy - does not pass the same object
|
* Method for creating a copy - does not pass the same object
|
||||||
* @param base
|
* @param base DAO Factory
|
||||||
*/
|
*/
|
||||||
public WebappDaoFactoryJena (WebappDaoFactoryJena base) {
|
public WebappDaoFactoryJena (WebappDaoFactoryJena base) {
|
||||||
// Not sure if selector somehow has greater longevity so
|
// Not sure if selector somehow has greater longevity so
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class EntityDWR {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Insets a new entity into the Vitro system.
|
* Insets a new entity into the Vitro system.
|
||||||
* @returns < 1 if failed, entityId if success.
|
* @return < 1 if failed, entityId if success.
|
||||||
*/
|
*/
|
||||||
public String insertNewEntity(Individual ent ){
|
public String insertNewEntity(Individual ent ){
|
||||||
try {
|
try {
|
||||||
|
@ -47,8 +47,6 @@ public class EntityDWR {
|
||||||
/**
|
/**
|
||||||
********************************************************
|
********************************************************
|
||||||
* Gets an Entity object for a given entities.id.
|
* Gets an Entity object for a given entities.id.
|
||||||
* @param entityId
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public Individual entityByURI(String entityURI){
|
public Individual entityByURI(String entityURI){
|
||||||
WebContext ctx = WebContextFactory.get();
|
WebContext ctx = WebContextFactory.get();
|
||||||
|
|
|
@ -49,7 +49,7 @@ public class PropertyDWR {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets only unhidden properties.
|
* Gets only unhidden properties.
|
||||||
* @returns Collection of PropertyInstance objs
|
* @return Collection of PropertyInstance objs
|
||||||
*/
|
*/
|
||||||
public Collection getAllPropInstByVClass(String classURI){
|
public Collection getAllPropInstByVClass(String classURI){
|
||||||
WebContext ctx = WebContextFactory.get();
|
WebContext ctx = WebContextFactory.get();
|
||||||
|
|
|
@ -28,8 +28,8 @@ public class VClassDWR {
|
||||||
* add proprties form.
|
* add proprties form.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @param vclassId - vclass we want to make a property for
|
* @param vclassURI - vclass we want to make a property for
|
||||||
* @param propertyId - property we want to use
|
* @param propertyURI - property we want to use
|
||||||
* @param filterOutUninstanciated - if true filter out any vclasses with zero instances.
|
* @param filterOutUninstanciated - if true filter out any vclasses with zero instances.
|
||||||
* @return a list of VClass objects, one for each vclass that could be in the
|
* @return a list of VClass objects, one for each vclass that could be in the
|
||||||
* relation indicated by the parameters.
|
* relation indicated by the parameters.
|
||||||
|
|
|
@ -26,7 +26,7 @@ import freemarker.template.Configuration;
|
||||||
/**
|
/**
|
||||||
* This is intended to work in conjunction with a template to create the HTML for a
|
* This is intended to work in conjunction with a template to create the HTML for a
|
||||||
* datetime with precision and to convert the submitted parameters into
|
* datetime with precision and to convert the submitted parameters into
|
||||||
* varname -> Literal and varname -> URI maps.
|
* varname -> Literal and varname -> URI maps.
|
||||||
*
|
*
|
||||||
* The variables that get passed to the template are defined in:
|
* The variables that get passed to the template are defined in:
|
||||||
* DateTimeWithPrecision.getMapForTemplate()
|
* DateTimeWithPrecision.getMapForTemplate()
|
||||||
|
|
|
@ -302,7 +302,6 @@ public class EditConfigurationUtils {
|
||||||
return copyList;
|
return copyList;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Make a copy of a Map<String,String> */
|
|
||||||
public static Map<String,String> copyMap(Map<String,String> source) {
|
public static Map<String,String> copyMap(Map<String,String> source) {
|
||||||
HashMap<String, String> map = new HashMap<String, String>();
|
HashMap<String, String> map = new HashMap<String, String>();
|
||||||
Set<String> keys = map.keySet();
|
Set<String> keys = map.keySet();
|
||||||
|
@ -315,7 +314,6 @@ public class EditConfigurationUtils {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Make a copy of a Map<String,List<String>> */
|
|
||||||
public static Map<String, List<String>> copyListMap(Map<String, List<String>> source) {
|
public static Map<String, List<String>> copyListMap(Map<String, List<String>> source) {
|
||||||
HashMap<String, List<String>> map = new HashMap<String, List<String>>();
|
HashMap<String, List<String>> map = new HashMap<String, List<String>>();
|
||||||
Set<String> keys = map.keySet();
|
Set<String> keys = map.keySet();
|
||||||
|
@ -326,7 +324,6 @@ public class EditConfigurationUtils {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static EditConfigurationVTwo getEditConfiguration(HttpServletRequest request) {
|
public static EditConfigurationVTwo getEditConfiguration(HttpServletRequest request) {
|
||||||
HttpSession session = request.getSession();
|
HttpSession session = request.getSession();
|
||||||
EditConfigurationVTwo editConfiguration = EditConfigurationVTwo.getConfigFromSession(session, request);
|
EditConfigurationVTwo editConfiguration = EditConfigurationVTwo.getConfigFromSession(session, request);
|
||||||
|
|
|
@ -449,7 +449,6 @@ public class EditConfigurationVTwo {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Return a copy of the value so that the configuration is not modified by external code.
|
/** Return a copy of the value so that the configuration is not modified by external code.
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public List<String> getN3Required() {
|
public List<String> getN3Required() {
|
||||||
return EditConfigurationUtils.copy(n3Required);
|
return EditConfigurationUtils.copy(n3Required);
|
||||||
|
@ -471,7 +470,6 @@ public class EditConfigurationVTwo {
|
||||||
this.n3Required.addAll(Arrays.asList( n3RequiredStrsInput ));
|
this.n3Required.addAll(Arrays.asList( n3RequiredStrsInput ));
|
||||||
}
|
}
|
||||||
/** return a copy of the value so that the configuration is not modified by external code.
|
/** return a copy of the value so that the configuration is not modified by external code.
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public List<String> getN3Optional() {
|
public List<String> getN3Optional() {
|
||||||
return EditConfigurationUtils.copy( n3Optional );
|
return EditConfigurationUtils.copy( n3Optional );
|
||||||
|
@ -600,7 +598,6 @@ public class EditConfigurationVTwo {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Return a copy of the value so that the configuration is not modified by external code.
|
/** Return a copy of the value so that the configuration is not modified by external code.
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public Map<String, String> getSparqlForAdditionalUrisInScope() {
|
public Map<String, String> getSparqlForAdditionalUrisInScope() {
|
||||||
return copyMap(sparqlForAdditionalUrisInScope);
|
return copyMap(sparqlForAdditionalUrisInScope);
|
||||||
|
@ -611,7 +608,6 @@ public class EditConfigurationVTwo {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Return a copy of the value so that the configuration is not modified by external code.
|
/** Return a copy of the value so that the configuration is not modified by external code.
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public Map<String, String> getSparqlForAdditionalLiteralsInScope() {
|
public Map<String, String> getSparqlForAdditionalLiteralsInScope() {
|
||||||
return copyMap(sparqlForAdditionalLiteralsInScope);
|
return copyMap(sparqlForAdditionalLiteralsInScope);
|
||||||
|
@ -650,7 +646,6 @@ public class EditConfigurationVTwo {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** return a copy of the value so that the configuration is not modified by external code.
|
/** return a copy of the value so that the configuration is not modified by external code.
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public Map<String, String> getSparqlForExistingLiterals() {
|
public Map<String, String> getSparqlForExistingLiterals() {
|
||||||
return copyMap(sparqlForExistingLiterals);
|
return copyMap(sparqlForExistingLiterals);
|
||||||
|
@ -661,7 +656,6 @@ public class EditConfigurationVTwo {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** return a copy of the value so that the configuration is not modified by external code.
|
/** return a copy of the value so that the configuration is not modified by external code.
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public Map<String, String> getSparqlForExistingUris() {
|
public Map<String, String> getSparqlForExistingUris() {
|
||||||
return copyMap(sparqlForExistingUris);
|
return copyMap(sparqlForExistingUris);
|
||||||
|
|
|
@ -34,7 +34,7 @@ public class EditN3GeneratorVTwo {
|
||||||
* This takes into account multiple values that would be returned from a select list.
|
* This takes into account multiple values that would be returned from a select list.
|
||||||
* subInUris should no longer be used.
|
* subInUris should no longer be used.
|
||||||
*
|
*
|
||||||
* It's important that the map contain String to List<String> mapping.
|
* It's important that the map contain String to List<String> mapping.
|
||||||
*
|
*
|
||||||
* Before values are sent in, all of the values for a variable should be placed within an array.
|
* Before values are sent in, all of the values for a variable should be placed within an array.
|
||||||
*
|
*
|
||||||
|
|
|
@ -179,7 +179,7 @@ public class MultiValueEditSubmission {
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* need to generate something like
|
* need to generate something like
|
||||||
* "09:10:11"^^<http://www.w3.org/2001/XMLSchema#time>
|
* {@code "09:10:11"^^<http://www.w3.org/2001/XMLSchema#time>}
|
||||||
*/
|
*/
|
||||||
public Literal getTime(Map<String,String[]> queryParameters,String fieldName) {
|
public Literal getTime(Map<String,String[]> queryParameters,String fieldName) {
|
||||||
List<String> hour = Arrays.asList(queryParameters.get("hour" + fieldName));
|
List<String> hour = Arrays.asList(queryParameters.get("hour" + fieldName));
|
||||||
|
|
|
@ -247,8 +247,7 @@ public class N3EditUtils {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Strips from a string any characters that are not valid in XML 1.0
|
* Strips from a string any characters that are not valid in XML 1.0
|
||||||
* @param in
|
* @param in String to strip characters from
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public static String stripInvalidXMLChars(String in) {
|
public static String stripInvalidXMLChars(String in) {
|
||||||
if (in == null) {
|
if (in == null) {
|
||||||
|
|
|
@ -274,7 +274,7 @@ public class ProcessRdfForm {
|
||||||
/**
|
/**
|
||||||
* Parse the n3Strings to a List of RDF Model objects.
|
* Parse the n3Strings to a List of RDF Model objects.
|
||||||
*
|
*
|
||||||
* @param n3Strings
|
* @param n3Strings N3 Strings to parse
|
||||||
* @param parseType if OPTIONAL, then don't throw exceptions on errors
|
* @param parseType if OPTIONAL, then don't throw exceptions on errors
|
||||||
* If REQUIRED, then throw exceptions on errors.
|
* If REQUIRED, then throw exceptions on errors.
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
|
|
@ -23,7 +23,7 @@ import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary;
|
||||||
* RDF literal statement without including the whole literal in the parameters.
|
* RDF literal statement without including the whole literal in the parameters.
|
||||||
*
|
*
|
||||||
* ex.
|
* ex.
|
||||||
* http://fake.com/delete?sub="http://bob"&pred="http://hasNickName"&stmtHash="23443434"
|
* {@code http://fake.com/delete?sub="http://bob"&pred="http://hasNickName"&stmtHash="23443434"}
|
||||||
*
|
*
|
||||||
* This could request the deletion of a the statement for Bob's nickname where the
|
* This could request the deletion of a the statement for Bob's nickname where the
|
||||||
* literal matched the hash 23443434.
|
* literal matched the hash 23443434.
|
||||||
|
@ -39,7 +39,7 @@ public class RdfLiteralHash {
|
||||||
/**
|
/**
|
||||||
* Make a hash based on individual, property, literal and (lang or datatype).
|
* Make a hash based on individual, property, literal and (lang or datatype).
|
||||||
*
|
*
|
||||||
* @param stmt
|
* @param stmt Data statement
|
||||||
* @return a value between MIN_INTEGER and MAX_INTEGER
|
* @return a value between MIN_INTEGER and MAX_INTEGER
|
||||||
*/
|
*/
|
||||||
public static int makeRdfLiteralHash( DataPropertyStatement stmt ){
|
public static int makeRdfLiteralHash( DataPropertyStatement stmt ){
|
||||||
|
@ -72,9 +72,8 @@ public class RdfLiteralHash {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param stmt
|
* @param stmt Data statement
|
||||||
* @param hash
|
* @param hash Hash
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public static boolean doesStmtMatchHash( DataPropertyStatement stmt, int hash){
|
public static boolean doesStmtMatchHash( DataPropertyStatement stmt, int hash){
|
||||||
if( stmt == null )
|
if( stmt == null )
|
||||||
|
@ -92,9 +91,9 @@ public class RdfLiteralHash {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Forward to either getDataPropertyStmtByHash or getRdfsLabelStatementByHash, depending on the property.
|
* Forward to either getDataPropertyStmtByHash or getRdfsLabelStatementByHash, depending on the property.
|
||||||
* @param subjectUri,
|
* @param subjectUri Subject URI
|
||||||
* @param predicateUri,
|
* @param predicateUri Predicate URI
|
||||||
* @param hash
|
* @param hash Hash
|
||||||
* @param model, may not be null
|
* @param model, may not be null
|
||||||
* @return a DataPropertyStatement if found or null if not found
|
* @return a DataPropertyStatement if found or null if not found
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -20,7 +20,7 @@ public interface FieldOptions {
|
||||||
* Any object that are needed to get the options should
|
* Any object that are needed to get the options should
|
||||||
* be passed in the constructor of the implementation.
|
* be passed in the constructor of the implementation.
|
||||||
*
|
*
|
||||||
* @return return a map of value->label for the options.
|
* @return return a map of value->label for the options.
|
||||||
* Should never return null.
|
* Should never return null.
|
||||||
*
|
*
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
|
|
@ -46,7 +46,6 @@ public class PostEditCleanupController extends FreemarkerHttpServlet{
|
||||||
* Returns a redirect after an edit.
|
* Returns a redirect after an edit.
|
||||||
* @param vreq - should have an edit configuration in attributes or session
|
* @param vreq - should have an edit configuration in attributes or session
|
||||||
* @param entityToReturnTo - may be null
|
* @param entityToReturnTo - may be null
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
protected static ResponseValues doPostEditRedirect( VitroRequest vreq , String entityToReturnTo){
|
protected static ResponseValues doPostEditRedirect( VitroRequest vreq , String entityToReturnTo){
|
||||||
EditConfigurationVTwo editConfig = EditConfigurationVTwo.getConfigFromSession(vreq.getSession(), vreq);
|
EditConfigurationVTwo editConfig = EditConfigurationVTwo.getConfigFromSession(vreq.getSession(), vreq);
|
||||||
|
|
|
@ -106,7 +106,7 @@ public class FileServingHelper {
|
||||||
* replacing the file prefix with the default namespace.
|
* replacing the file prefix with the default namespace.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @return the URI, or <code>null</code> if the URL couldn't be translated.
|
* @return the URI, or {@code null} if the URL couldn't be translated.
|
||||||
*/
|
*/
|
||||||
public static String getBytestreamUri(String path, ServletContext ctx) {
|
public static String getBytestreamUri(String path, ServletContext ctx) {
|
||||||
if (path == null) {
|
if (path == null) {
|
||||||
|
|
|
@ -31,7 +31,7 @@ public class TempFileHolder implements HttpSessionBindingListener {
|
||||||
private static final Log log = LogFactory.getLog(TempFileHolder.class);
|
private static final Log log = LogFactory.getLog(TempFileHolder.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a {@link TempFileHolder} holding the given {@link FileInfo}, and
|
* Create a holding the given {@link FileInfo}, and
|
||||||
* attach it to the session with the given attribute name.
|
* attach it to the session with the given attribute name.
|
||||||
*
|
*
|
||||||
* If an attribute with this name already exists, it is replaced.
|
* If an attribute with this name already exists, it is replaced.
|
||||||
|
@ -52,11 +52,11 @@ public class TempFileHolder implements HttpSessionBindingListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the {@link TempFileHolder} which is stored as an attribute on this
|
* Get the which is stored as an attribute on this
|
||||||
* session, extract the {@link FileInfo} from it, and remove it from the
|
* session, extract the {@link FileInfo} from it, and remove it from the
|
||||||
* session.
|
* session.
|
||||||
*
|
*
|
||||||
* If there is no such attribute, of if it is not a {@link TempFileHolder},
|
* If there is no such attribute, of if it is not a ,
|
||||||
* return null.
|
* return null.
|
||||||
*/
|
*/
|
||||||
public static FileInfo remove(HttpSession session, String attributeName) {
|
public static FileInfo remove(HttpSession session, String attributeName) {
|
||||||
|
@ -92,8 +92,6 @@ public class TempFileHolder implements HttpSessionBindingListener {
|
||||||
/**
|
/**
|
||||||
* Gets the {@link FileInfo} payload, and removes it so the file won't be
|
* Gets the {@link FileInfo} payload, and removes it so the file won't be
|
||||||
* deleted when the value is unbound.
|
* deleted when the value is unbound.
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
private FileInfo extractFileInfo() {
|
private FileInfo extractFileInfo() {
|
||||||
FileInfo result = this.fileInfo;
|
FileInfo result = this.fileInfo;
|
||||||
|
@ -104,7 +102,6 @@ public class TempFileHolder implements HttpSessionBindingListener {
|
||||||
/**
|
/**
|
||||||
* When attached to the session, do nothing.
|
* When attached to the session, do nothing.
|
||||||
*
|
*
|
||||||
* @see HttpSessionBindingListener#valueBound(HttpSessionBindingEvent)
|
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void valueBound(HttpSessionBindingEvent event) {
|
public void valueBound(HttpSessionBindingEvent event) {
|
||||||
|
@ -116,7 +113,6 @@ public class TempFileHolder implements HttpSessionBindingListener {
|
||||||
* delete the file. If you had wanted this file, you should have called
|
* delete the file. If you had wanted this file, you should have called
|
||||||
* {@link #remove(HttpSession, String) remove}.
|
* {@link #remove(HttpSession, String) remove}.
|
||||||
*
|
*
|
||||||
* @see HttpSessionBindingListener#valueUnbound(HttpSessionBindingEvent)
|
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void valueUnbound(HttpSessionBindingEvent event) {
|
public void valueUnbound(HttpSessionBindingEvent event) {
|
||||||
|
|
|
@ -54,8 +54,6 @@ public class FileStorageHelper {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Encode the filename as needed to guard against illegal characters.
|
* Encode the filename as needed to guard against illegal characters.
|
||||||
*
|
|
||||||
* @see edu.cornell.mannlib.vitro.webapp.utils.filestorage
|
|
||||||
*/
|
*/
|
||||||
public static String encodeName(String filename) {
|
public static String encodeName(String filename) {
|
||||||
String hexed = addHexEncoding(filename);
|
String hexed = addHexEncoding(filename);
|
||||||
|
@ -149,8 +147,6 @@ public class FileStorageHelper {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Restore the filename to its original form, removing the encoding.
|
* Restore the filename to its original form, removing the encoding.
|
||||||
*
|
|
||||||
* @see edu.cornell.mannlib.vitro.webapp.utils.filestorage
|
|
||||||
*/
|
*/
|
||||||
public static String decodeName(String stored) {
|
public static String decodeName(String stored) {
|
||||||
String unexcluded = unexcludeWindowsReservedNames(stored);
|
String unexcluded = unexcludeWindowsReservedNames(stored);
|
||||||
|
@ -228,8 +224,6 @@ public class FileStorageHelper {
|
||||||
* namespace is translated to its prefix, and illegal characters are
|
* namespace is translated to its prefix, and illegal characters are
|
||||||
* encoded. The resulting string is broken up into 3-character directory
|
* encoded. The resulting string is broken up into 3-character directory
|
||||||
* names (or less). Windows reserved words are prefixed with tilde.
|
* names (or less). Windows reserved words are prefixed with tilde.
|
||||||
*
|
|
||||||
* @see edu.cornell.mannlib.vitro.webapp.utils.filestorage
|
|
||||||
*/
|
*/
|
||||||
public static String id2Path(String id, Map<Character, String> namespacesMap) {
|
public static String id2Path(String id, Map<Character, String> namespacesMap) {
|
||||||
char prefix = 0;
|
char prefix = 0;
|
||||||
|
@ -305,8 +299,6 @@ public class FileStorageHelper {
|
||||||
/**
|
/**
|
||||||
* Translate the object ID and the file storage root directory into a full
|
* Translate the object ID and the file storage root directory into a full
|
||||||
* path to the directory that would represent that ID.
|
* path to the directory that would represent that ID.
|
||||||
*
|
|
||||||
* @see edu.cornell.mannlib.vitro.webapp.utils.filestorage
|
|
||||||
*/
|
*/
|
||||||
public static File getPathToIdDirectory(String id,
|
public static File getPathToIdDirectory(String id,
|
||||||
Map<Character, String> namespacesMap, File rootDir) {
|
Map<Character, String> namespacesMap, File rootDir) {
|
||||||
|
@ -316,8 +308,6 @@ public class FileStorageHelper {
|
||||||
/**
|
/**
|
||||||
* Translate the object ID, the file storage root directory and the filename
|
* Translate the object ID, the file storage root directory and the filename
|
||||||
* into a full path to where the file would be stored.
|
* into a full path to where the file would be stored.
|
||||||
*
|
|
||||||
* @see edu.cornell.mannlib.vitro.webapp.utils.filestorage
|
|
||||||
*/
|
*/
|
||||||
public static File getFullPath(File rootDir, String id, String filename,
|
public static File getFullPath(File rootDir, String id, String filename,
|
||||||
Map<Character, String> namespacesMap) {
|
Map<Character, String> namespacesMap) {
|
||||||
|
|
|
@ -252,8 +252,6 @@ public class FileStorageImpl {
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
|
||||||
*
|
|
||||||
* <p>
|
* <p>
|
||||||
* Before creating the file, we may need to create one or more parent
|
* Before creating the file, we may need to create one or more parent
|
||||||
* directories to put it in.
|
* directories to put it in.
|
||||||
|
@ -302,8 +300,6 @@ public class FileStorageImpl {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
|
||||||
*
|
|
||||||
* <p>
|
* <p>
|
||||||
* If deleting this file leaves its parent directory empty, that directory
|
* If deleting this file leaves its parent directory empty, that directory
|
||||||
* will be deleted. This repeats, up to (but not including) the root
|
* will be deleted. This repeats, up to (but not including) the root
|
||||||
|
@ -409,7 +405,6 @@ public class FileStorageImpl {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
|
||||||
*/
|
*/
|
||||||
public InputStream getInputStream(String id, String filename)
|
public InputStream getInputStream(String id, String filename)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
* <h1>Relationship to PairTree</h1>
|
* <h1>Relationship to PairTree</h1>
|
||||||
* <p>
|
* <p>
|
||||||
* The system incorporates a number of ideas from the PairTree specification,
|
* The system incorporates a number of ideas from the PairTree specification,
|
||||||
|
* </p>
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>
|
* <li>
|
||||||
* The basic pairtree algorithm -
|
* The basic pairtree algorithm -
|
||||||
|
@ -45,18 +46,17 @@
|
||||||
* "shorty" directory names may be up to 3 characters long, not 2.
|
* "shorty" directory names may be up to 3 characters long, not 2.
|
||||||
* </li>
|
* </li>
|
||||||
* </ul>
|
* </ul>
|
||||||
* </p>
|
|
||||||
* <h1>Directory structure</h1>
|
* <h1>Directory structure</h1>
|
||||||
* <p>
|
* <p>
|
||||||
* A typical structure would look like this:
|
* A typical structure would look like this:
|
||||||
* <pre>
|
* {@code
|
||||||
* + basedir
|
* + basedir
|
||||||
* |
|
* |
|
||||||
* +--+ file_storage_namespaces.properties
|
* +--+ file_storage_namespaces.properties
|
||||||
* |
|
* |
|
||||||
* +--+ file_storage_root
|
* +--+ file_storage_root
|
||||||
* </pre>
|
* }
|
||||||
* The <code>file_storage_root</code> directory contains the subdirectories
|
* The {@code file_storage_root} directory contains the subdirectories
|
||||||
* that implement the encoded IDs, and the final directory for each ID will
|
* that implement the encoded IDs, and the final directory for each ID will
|
||||||
* contain a single file that corresponds to that ID.
|
* contain a single file that corresponds to that ID.
|
||||||
* </p>
|
* </p>
|
||||||
|
@ -71,23 +71,24 @@
|
||||||
* For example, the sytem might be initialized with a "namespace" of
|
* For example, the sytem might be initialized with a "namespace" of
|
||||||
* "http://vivo.mydomain.edu/file/". If that is the only namespace, it will
|
* "http://vivo.mydomain.edu/file/". If that is the only namespace, it will
|
||||||
* be internally assigned a prefix of "a", so a URI like this:
|
* be internally assigned a prefix of "a", so a URI like this:
|
||||||
|
* </p>
|
||||||
* <pre>http://vivo.mydomain.edu/file/n3424/myPhoto.jpg</pre>
|
* <pre>http://vivo.mydomain.edu/file/n3424/myPhoto.jpg</pre>
|
||||||
* would be converted to this:
|
* would be converted to this:
|
||||||
* <pre>a~n3424/myPhoto.jpg</pre>
|
* <pre>a~n3424/myPhoto.jpg</pre>
|
||||||
* </p>
|
|
||||||
* <p>
|
* <p>
|
||||||
* The namespaces and their assigned prefixes are stored in a properties file
|
* The namespaces and their assigned prefixes are stored in a properties file
|
||||||
* when the structure is initialized. When the structure is re-opened, the
|
* when the structure is initialized. When the structure is re-opened, the
|
||||||
* file is read to find the correct prefixes. The file
|
* file is read to find the correct prefixes. The file
|
||||||
* might look like this:
|
* might look like this:
|
||||||
|
* </p>
|
||||||
* <pre>
|
* <pre>
|
||||||
* a = http://the.first.namespace/
|
* a = http://the.first.namespace/
|
||||||
* b = http://the.second.namespace/
|
* b = http://the.second.namespace/
|
||||||
* </pre>
|
* </pre>
|
||||||
* </p>
|
|
||||||
* <h1>ID encoding</h1>
|
* <h1>ID encoding</h1>
|
||||||
* <p>
|
* <p>
|
||||||
* This is a multi-step process:
|
* This is a multi-step process:
|
||||||
|
* </p>
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>
|
* <li>
|
||||||
* <strong>Namespace recognition</strong> -
|
* <strong>Namespace recognition</strong> -
|
||||||
|
@ -139,17 +140,12 @@
|
||||||
* </li>
|
* </li>
|
||||||
* </ul>
|
* </ul>
|
||||||
* Examples:
|
* Examples:
|
||||||
* <br/><code>ark:/13030/xt12t3</code> becomes
|
* {@code ark:/13030/xt12t3} becomes {@code ark/+=1/303/0=x/t12/t3}
|
||||||
* <code>ark/+=1/303/0=x/t12/t3</code>
|
* {@code http://n2t.info/urn:nbn:se:kb:repos-1} becomes {@code htt/p+=/=n2/t,i/nfo/=ur/n+n/bn+/se+/kb+/rep/os-/1}
|
||||||
* <br/><code>http://n2t.info/urn:nbn:se:kb:repos-1</code> becomes
|
* {@code what-the-*@?#!^!~?} becomes {@code wha/t-t/he-/^2a/@^3/f#!/^5e/!^7/e^3/f}
|
||||||
* <code>htt/p+=/=n2/t,i/nfo/=ur/n+n/bn+/se+/kb+/rep/os-/1</code>
|
* {@code http://vivo.myDomain.edu/file/n3424} with namespace
|
||||||
* <br/><code>what-the-*@?#!^!~?</code> becomes
|
* {@code http://vivo.myDomain.edu/file/} and prefix
|
||||||
* <code>wha/t-t/he-/^2a/@^3/f#!/^5e/!^7/e^3/f</code>
|
* {@code a} becomes {@code a~n/342/4}
|
||||||
* <br/><code>http://vivo.myDomain.edu/file/n3424</code> with namespace
|
|
||||||
* <code>http://vivo.myDomain.edu/file/</code> and prefix
|
|
||||||
* <code>a</code> becomes
|
|
||||||
* <code>a~n/342/4</code>
|
|
||||||
* </p>
|
|
||||||
* <h1>Filename encoding</h1>
|
* <h1>Filename encoding</h1>
|
||||||
* <p>
|
* <p>
|
||||||
* The name of the file is encoded as needed to guard against illegal
|
* The name of the file is encoded as needed to guard against illegal
|
||||||
|
@ -161,9 +157,6 @@
|
||||||
* "common character encoding" steps used for ID encoding, except that
|
* "common character encoding" steps used for ID encoding, except that
|
||||||
* periods are not encoded.
|
* periods are not encoded.
|
||||||
* </p>
|
* </p>
|
||||||
* <hr/>
|
|
||||||
* <hr/>
|
|
||||||
* <hr/>
|
|
||||||
* <h2>
|
* <h2>
|
||||||
* This was summarized in a post to the vivo-dev-all list on 11/29/2010
|
* This was summarized in a post to the vivo-dev-all list on 11/29/2010
|
||||||
* </h2>
|
* </h2>
|
||||||
|
@ -186,19 +179,19 @@
|
||||||
* </p>
|
* </p>
|
||||||
* <p>
|
* <p>
|
||||||
* Let's consider a file with this information:
|
* Let's consider a file with this information:
|
||||||
|
* </p>
|
||||||
* <pre>
|
* <pre>
|
||||||
* URI = http://vivo.mydomain.edu/individual/n3156
|
* URI = http://vivo.mydomain.edu/individual/n3156
|
||||||
* Filename = lily1.jpg
|
* Filename = lily1.jpg
|
||||||
* </pre>
|
* </pre>
|
||||||
* </p>
|
|
||||||
* <p>
|
* <p>
|
||||||
* We want to turn the URI into the directory path, but the URI contains
|
* We want to turn the URI into the directory path, but the URI contains
|
||||||
* prohibited characters. Using a PairTree-like character substitution,
|
* prohibited characters. Using a PairTree-like character substitution,
|
||||||
* we might store it at this path:
|
* we might store it at this path:
|
||||||
|
* </p>
|
||||||
* <pre>
|
* <pre>
|
||||||
* /usr/local/vivo/uploads/file_storage_root/http+==vivo.mydomain.edu=individual=n3156/lily1.jpg
|
* /usr/local/vivo/uploads/file_storage_root/http+==vivo.mydomain.edu=individual=n3156/lily1.jpg
|
||||||
* </pre>
|
* </pre>
|
||||||
* </p>
|
|
||||||
* <p>
|
* <p>
|
||||||
* Using that scheme would mean that each file sits in its own directory
|
* Using that scheme would mean that each file sits in its own directory
|
||||||
* under the storage root. At a large institution, there might be hundreds of
|
* under the storage root. At a large institution, there might be hundreds of
|
||||||
|
@ -212,15 +205,16 @@
|
||||||
* per directory. In practice, the number will be considerably smaller.
|
* per directory. In practice, the number will be considerably smaller.
|
||||||
*
|
*
|
||||||
* So then it would look like this:
|
* So then it would look like this:
|
||||||
|
* </p>
|
||||||
* <pre>
|
* <pre>
|
||||||
* /usr/local/vivo/uploads/file_storage_root/htt/p+=/=vi/vo./myd/oma/in./edu/=in/div/idu/al=/n31/56/lily1.jpg
|
* /usr/local/vivo/uploads/file_storage_root/htt/p+=/=vi/vo./myd/oma/in./edu/=in/div/idu/al=/n31/56/lily1.jpg
|
||||||
* </pre>
|
* </pre>
|
||||||
* </p>
|
|
||||||
* <p>
|
* <p>
|
||||||
* But almost all of our URIs will start with the same namespace, so the
|
* But almost all of our URIs will start with the same namespace, so the
|
||||||
* namespace just adds unnecessary and unhelpful depth to the directory tree.
|
* namespace just adds unnecessary and unhelpful depth to the directory tree.
|
||||||
* We assign a single-character prefix to that namespace, using the
|
* We assign a single-character prefix to that namespace, using the
|
||||||
* file_storage_namespaces.properties file in the uploads directory, like this:
|
* file_storage_namespaces.properties file in the uploads directory, like this:
|
||||||
|
* </p>
|
||||||
* <pre>
|
* <pre>
|
||||||
* a = http://vivo.mydomain.edu/individual/
|
* a = http://vivo.mydomain.edu/individual/
|
||||||
* </pre>
|
* </pre>
|
||||||
|
@ -232,9 +226,9 @@
|
||||||
* <pre>
|
* <pre>
|
||||||
* /usr/local/vivo/uploads/file_storage_root/a~n/315/6/lily1.jpg
|
* /usr/local/vivo/uploads/file_storage_root/a~n/315/6/lily1.jpg
|
||||||
* </pre>
|
* </pre>
|
||||||
* </p>
|
|
||||||
* <p>
|
* <p>
|
||||||
* So what we hope we have implemented is a system where:
|
* So what we hope we have implemented is a system where:
|
||||||
|
* </p>
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>Files are stored by URI and filename.</li>
|
* <li>Files are stored by URI and filename.</li>
|
||||||
* <li>File paths are constructed to limit the maximum number of files in a directory.</li>
|
* <li>File paths are constructed to limit the maximum number of files in a directory.</li>
|
||||||
|
@ -244,9 +238,9 @@
|
||||||
* <li>Frequently-used namespaces on the URIs can be collapsed to short prefix sequences.</li>
|
* <li>Frequently-used namespaces on the URIs can be collapsed to short prefix sequences.</li>
|
||||||
* <li>URIs with unrecognized namespaces will not cause problems.</li>
|
* <li>URIs with unrecognized namespaces will not cause problems.</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
* </p>
|
|
||||||
* <p>
|
* <p>
|
||||||
* By the way, almost all of this is implemented in
|
* By the way, almost all of this is implemented in
|
||||||
|
* </p>
|
||||||
* <pre>
|
* <pre>
|
||||||
* edu.cornell.mannlib.vitro.webapp.filestorage.impl.FileStorageHelper
|
* edu.cornell.mannlib.vitro.webapp.filestorage.impl.FileStorageHelper
|
||||||
* </pre>
|
* </pre>
|
||||||
|
@ -254,6 +248,5 @@
|
||||||
* <pre>
|
* <pre>
|
||||||
* edu.cornell.mannlib.vitro.webapp.filestorage.impl.FileStorageHelperTest
|
* edu.cornell.mannlib.vitro.webapp.filestorage.impl.FileStorageHelperTest
|
||||||
* </pre>
|
* </pre>
|
||||||
* </p>
|
|
||||||
*/
|
*/
|
||||||
package edu.cornell.mannlib.vitro.webapp.filestorage.impl;
|
package edu.cornell.mannlib.vitro.webapp.filestorage.impl;
|
|
@ -32,13 +32,13 @@ import edu.cornell.mannlib.vitro.webapp.modules.fileStorage.FileStorage;
|
||||||
* <p>
|
* <p>
|
||||||
* The path of the request should be the "alias URL" of the desired file. We
|
* The path of the request should be the "alias URL" of the desired file. We
|
||||||
* need to:
|
* need to:
|
||||||
|
* </p>
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>Use the alias URL to find the URI of the file bytestream object.</li>
|
* <li>Use the alias URL to find the URI of the file bytestream object.</li>
|
||||||
* <li>Find the file surrogate object to get the MIME type of the file, and
|
* <li>Find the file surrogate object to get the MIME type of the file, and
|
||||||
* confirm the filename.</li>
|
* confirm the filename.</li>
|
||||||
* <li>Set the MIME type on the output stream and serve the bytes.</li>
|
* <li>Set the MIME type on the output stream and serve the bytes.</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
* </p>
|
|
||||||
* <p>
|
* <p>
|
||||||
* If the request is superficially correct, but no such file can be found,
|
* If the request is superficially correct, but no such file can be found,
|
||||||
* return a 404. If there is a break in the data structures within the model or
|
* return a 404. If there is a break in the data structures within the model or
|
||||||
|
|
|
@ -66,8 +66,6 @@ import edu.cornell.mannlib.vitro.webapp.utils.searchengine.SearchResultsParser;
|
||||||
*
|
*
|
||||||
* An unconditional request may mean that there is no external cache, or that
|
* An unconditional request may mean that there is no external cache, or that
|
||||||
* the cache doesn't have a copy of this particular page.
|
* the cache doesn't have a copy of this particular page.
|
||||||
*
|
|
||||||
* @see http://tools.ietf.org/pdf/rfc2616
|
|
||||||
*/
|
*/
|
||||||
public class CachingResponseFilter implements Filter {
|
public class CachingResponseFilter implements Filter {
|
||||||
private static final Log log = LogFactory
|
private static final Log log = LogFactory
|
||||||
|
|
|
@ -22,6 +22,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
|
|
||||||
* Here is what needs to go into the web.xml:
|
* Here is what needs to go into the web.xml:
|
||||||
*
|
*
|
||||||
|
* {@code
|
||||||
<filter>
|
<filter>
|
||||||
<filter-name>JSession Strip Filter</filter-name>
|
<filter-name>JSession Strip Filter</filter-name>
|
||||||
<filter-class>edu.cornell.mannlib.vitro.filters.JSessionStripFilter</filter-class>
|
<filter-class>edu.cornell.mannlib.vitro.filters.JSessionStripFilter</filter-class>
|
||||||
|
@ -32,7 +33,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
<url-pattern>/*</url-pattern>
|
<url-pattern>/*</url-pattern>
|
||||||
<dispatcher>REQUEST</dispatcher>
|
<dispatcher>REQUEST</dispatcher>
|
||||||
</filter-mapping>
|
</filter-mapping>
|
||||||
|
}
|
||||||
* some of this code is from URLRewriteFilter
|
* some of this code is from URLRewriteFilter
|
||||||
*/
|
*/
|
||||||
public class JSessionStripFilter implements Filter {
|
public class JSessionStripFilter implements Filter {
|
||||||
|
|
|
@ -156,8 +156,7 @@ class VitroURL {
|
||||||
* This seems like a huge problem. We will only correctly handle odd things
|
* This seems like a huge problem. We will only correctly handle odd things
|
||||||
* as a query parameter 'uri' in the last position.
|
* as a query parameter 'uri' in the last position.
|
||||||
*
|
*
|
||||||
* @param queryStr
|
* @param queryStr Querst string
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
protected List<String[]> parseQueryParams(String queryStr) {
|
protected List<String[]> parseQueryParams(String queryStr) {
|
||||||
List<String[]> queryParamList = new ArrayList<String[]>();
|
List<String[]> queryParamList = new ArrayList<String[]>();
|
||||||
|
|
|
@ -30,7 +30,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
* relative to the i18n directory. Again, a file in the theme will override one
|
* relative to the i18n directory. Again, a file in the theme will override one
|
||||||
* in the application.
|
* in the application.
|
||||||
*
|
*
|
||||||
* If a property has a value (after overriding) of "@@file <filepath>", the
|
* If a property has a value (after overriding) of "@@file <filepath>", the
|
||||||
* bundle looks for the file relative to the i18n directory of the theme, then
|
* bundle looks for the file relative to the i18n directory of the theme, then
|
||||||
* relative to the i18n directory of the application. If the file is not found
|
* relative to the i18n directory of the application. If the file is not found
|
||||||
* in either location, a warning is written to the log and the property will
|
* in either location, a warning is written to the log and the property will
|
||||||
|
|
|
@ -20,11 +20,11 @@ import freemarker.template.utility.DeepUnwrap;
|
||||||
* implements TemplateMethodModel, you can pass arguments to it for formatting.
|
* implements TemplateMethodModel, you can pass arguments to it for formatting.
|
||||||
*
|
*
|
||||||
* So if the string is "His name is {0}!", then these references could be used:
|
* So if the string is "His name is {0}!", then these references could be used:
|
||||||
*
|
* {@code
|
||||||
* ${string} ==> "His name is {0}!"
|
* ${string} ==> "His name is {0}!"
|
||||||
*
|
*
|
||||||
* ${string("Bozo")} ==> "His name is Bozo!"
|
* ${string("Bozo")} ==> "His name is Bozo!"
|
||||||
*
|
* }
|
||||||
* Note that the format of the message is determined by java.text.MessageFormat,
|
* Note that the format of the message is determined by java.text.MessageFormat,
|
||||||
* so argument indices start at 0 and you can escape a substring by wrapping it
|
* so argument indices start at 0 and you can escape a substring by wrapping it
|
||||||
* in apostrophes.
|
* in apostrophes.
|
||||||
|
|
|
@ -21,10 +21,11 @@ import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder;
|
||||||
import edu.cornell.mannlib.vitro.webapp.i18n.I18n;
|
import edu.cornell.mannlib.vitro.webapp.i18n.I18n;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* {@code
|
||||||
* Call this at /selectLocale&selection=[locale_string]
|
* Call this at /selectLocale&selection=[locale_string]
|
||||||
*
|
*
|
||||||
* For example: /selectLocale&selection=en_US or /selectLocale&selection=es
|
* For example: /selectLocale&selection=en_US or /selectLocale&selection=es
|
||||||
*
|
* }
|
||||||
* Write an error to the log (and to DisplayMessage) if the selection is not
|
* Write an error to the log (and to DisplayMessage) if the selection is not
|
||||||
* syntactically valid.
|
* syntactically valid.
|
||||||
*
|
*
|
||||||
|
|
|
@ -28,7 +28,7 @@ public interface FileStorage extends Application.Module {
|
||||||
* If a file exists with this ID, get its name.
|
* If a file exists with this ID, get its name.
|
||||||
*
|
*
|
||||||
* @return The name of the file (un-encoded) if it exists, or
|
* @return The name of the file (un-encoded) if it exists, or
|
||||||
* <code>null</code> if it does not.
|
* {@code null} if it does not.
|
||||||
*/
|
*/
|
||||||
String getFilename(String id) throws IOException;
|
String getFilename(String id) throws IOException;
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ public interface FileStorage extends Application.Module {
|
||||||
* If a file exists with this ID, it will be deleted, regardless of the file
|
* If a file exists with this ID, it will be deleted, regardless of the file
|
||||||
* name. If no such file exists, no action is taken, no exception is thrown.
|
* name. If no such file exists, no action is taken, no exception is thrown.
|
||||||
*
|
*
|
||||||
* @return <code>true<code> if a file existed, <code>false</code> otherwise.
|
* @return {@code true} if a file existed, {@code false} otherwise.
|
||||||
*/
|
*/
|
||||||
boolean deleteFile(String id) throws IOException;
|
boolean deleteFile(String id) throws IOException;
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,6 @@ public interface SearchResultDocumentList extends
|
||||||
* Retrieve the i'th document, starting with 0.
|
* Retrieve the i'th document, starting with 0.
|
||||||
*
|
*
|
||||||
* @throws ArrayIndexOutOfBoundsException
|
* @throws ArrayIndexOutOfBoundsException
|
||||||
* if i < 0 or i >= size()
|
|
||||||
*/
|
*/
|
||||||
SearchResultDocument get(int i);
|
SearchResultDocument get(int i);
|
||||||
|
|
||||||
|
|
|
@ -77,7 +77,7 @@ public interface SearchIndexer extends Application.Module {
|
||||||
* If called before startup or while paused, the task will be queued. If
|
* If called before startup or while paused, the task will be queued. If
|
||||||
* called after shutdown, this has no effect.
|
* called after shutdown, this has no effect.
|
||||||
*
|
*
|
||||||
* @param urls
|
* @param changes
|
||||||
* if null or empty, this call has no effect.
|
* if null or empty, this call has no effect.
|
||||||
*/
|
*/
|
||||||
void scheduleUpdatesForStatements(List<Statement> changes);
|
void scheduleUpdatesForStatements(List<Statement> changes);
|
||||||
|
|
|
@ -55,9 +55,7 @@ public class ABoxUpdater {
|
||||||
*
|
*
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param oldTboxModel - previous version of the ontology
|
* @param settings - Update settings
|
||||||
* @param newTboxModel - new version of the ontology
|
|
||||||
* @param aboxModel - the knowledge base to be updated
|
|
||||||
* @param logger - for writing to the change log
|
* @param logger - for writing to the change log
|
||||||
* and the error log.
|
* and the error log.
|
||||||
* @param record - for writing to the additions model
|
* @param record - for writing to the additions model
|
||||||
|
|
|
@ -40,7 +40,6 @@ public class AtomicOntologyChange {
|
||||||
* Contains the URI of a class or property in the previous version of
|
* Contains the URI of a class or property in the previous version of
|
||||||
* the ontology, or null if a new class or property was introduced
|
* the ontology, or null if a new class or property was introduced
|
||||||
* in the current version of the ontology.
|
* in the current version of the ontology.
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public String getSourceURI() {
|
public String getSourceURI() {
|
||||||
return this.sourceURI;
|
return this.sourceURI;
|
||||||
|
@ -54,7 +53,6 @@ public class AtomicOntologyChange {
|
||||||
* Contains the URI of a class or property in the current version of
|
* Contains the URI of a class or property in the current version of
|
||||||
* the ontology, or null if a class or property was removed from the
|
* the ontology, or null if a class or property was removed from the
|
||||||
* previous version of the ontology.
|
* previous version of the ontology.
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public String getDestinationURI() {
|
public String getDestinationURI() {
|
||||||
return this.destinationURI;
|
return this.destinationURI;
|
||||||
|
|
|
@ -145,9 +145,8 @@ public class KnowledgeBaseUpdater {
|
||||||
* data, for changes that cannot be expressed as simple property
|
* data, for changes that cannot be expressed as simple property
|
||||||
* or class additions, deletions, or renamings.
|
* or class additions, deletions, or renamings.
|
||||||
* Blank nodes created by the queries are given random URIs.
|
* Blank nodes created by the queries are given random URIs.
|
||||||
* @param sparqlConstructDir
|
* @param sparqlConstructDir Sparql CONSTRUCT
|
||||||
* @param readModel
|
* @param rdfService RDF Service to use
|
||||||
* @param writeModel
|
|
||||||
* @param add (add = true; retract = false)
|
* @param add (add = true; retract = false)
|
||||||
*/
|
*/
|
||||||
private void performSparqlConstructs(String sparqlConstructDir,
|
private void performSparqlConstructs(String sparqlConstructDir,
|
||||||
|
@ -362,7 +361,7 @@ public class KnowledgeBaseUpdater {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* loads a SPARQL ASK query from a text file
|
* loads a SPARQL ASK query from a text file
|
||||||
* @param filePath
|
* @param filePath Path of a file
|
||||||
* @return the query string or null if file not found
|
* @return the query string or null if file not found
|
||||||
*/
|
*/
|
||||||
public static String loadSparqlQuery(String filePath) throws IOException {
|
public static String loadSparqlQuery(String filePath) throws IOException {
|
||||||
|
|
|
@ -34,7 +34,7 @@ public class OntologyChangeParser {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param args
|
* @param diffPath Diff path
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -61,9 +61,7 @@ public class TBoxUpdater {
|
||||||
*
|
*
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param oldTboxAnnotationsModel - previous version of the annotations in the ontology
|
* @param settings - update settings
|
||||||
* @param newTboxAnnotationsModel - new version of the annotations in the ontology
|
|
||||||
* @param siteModel - the knowledge base to be updated
|
|
||||||
* @param logger - for writing to the change log
|
* @param logger - for writing to the change log
|
||||||
* and the error log.
|
* and the error log.
|
||||||
* @param record - for writing to the additions model
|
* @param record - for writing to the additions model
|
||||||
|
|
|
@ -33,7 +33,6 @@ public interface ChangeSet {
|
||||||
public void setPreconditionQueryType(RDFService.SPARQLQueryType queryType);
|
public void setPreconditionQueryType(RDFService.SPARQLQueryType queryType);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return List<ModelChange> - list of model changes
|
|
||||||
*/
|
*/
|
||||||
public List<ModelChange> getModelChanges();
|
public List<ModelChange> getModelChanges();
|
||||||
|
|
||||||
|
@ -104,16 +103,12 @@ public interface ChangeSet {
|
||||||
/**
|
/**
|
||||||
* Returns a list of events to pass to any change listeners in
|
* Returns a list of events to pass to any change listeners in
|
||||||
* advance of the change set additions and retractions being performed.
|
* advance of the change set additions and retractions being performed.
|
||||||
*
|
|
||||||
* @return List<Object>
|
|
||||||
*/
|
*/
|
||||||
public List<Object> getPreChangeEvents();
|
public List<Object> getPreChangeEvents();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a list of events to pass to any change listeners after
|
* Returns a list of events to pass to any change listeners after
|
||||||
* the change set additions and retractions are performed.
|
* the change set additions and retractions are performed.
|
||||||
*
|
|
||||||
* @return List<Object>
|
|
||||||
*/
|
*/
|
||||||
public List<Object> getPostChangeEvents();
|
public List<Object> getPostChangeEvents();
|
||||||
|
|
||||||
|
|
|
@ -141,7 +141,7 @@ public interface RDFService {
|
||||||
/**
|
/**
|
||||||
* Returns a list of all the graph URIs in the RDF store.
|
* Returns a list of all the graph URIs in the RDF store.
|
||||||
*
|
*
|
||||||
* @return List<String> - list of all the named graph URIs in the RDF store.
|
* @return list of all the named graph URIs in the RDF store.
|
||||||
* Return an empty list of there no named graphs in
|
* Return an empty list of there no named graphs in
|
||||||
* the store.
|
* the store.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -86,7 +86,7 @@ public abstract class ResultSetConsumer {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper method that calls the processQuerySolution on an embedded ResultSetConsumer
|
* Helper method that calls the processQuerySolution on an embedded ResultSetConsumer
|
||||||
* @param qs
|
* @param qs Query solution
|
||||||
*/
|
*/
|
||||||
protected void chainProcessQuerySolution(QuerySolution qs) {
|
protected void chainProcessQuerySolution(QuerySolution qs) {
|
||||||
if (innerConsumer != null) {
|
if (innerConsumer != null) {
|
||||||
|
@ -135,7 +135,6 @@ public abstract class ResultSetConsumer {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Were any results found
|
* Were any results found
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public boolean hasResult() {
|
public boolean hasResult() {
|
||||||
return hasResult;
|
return hasResult;
|
||||||
|
|
|
@ -295,8 +295,7 @@ public abstract class RDFServiceImpl implements RDFService {
|
||||||
/**
|
/**
|
||||||
* Returns a pair of models. The first contains any statement containing at
|
* Returns a pair of models. The first contains any statement containing at
|
||||||
* least one blank node. The second contains all remaining statements.
|
* least one blank node. The second contains all remaining statements.
|
||||||
* @param g
|
* @param gm Jena model
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
protected Model[] separateStatementsWithBlankNodes(Model gm) {
|
protected Model[] separateStatementsWithBlankNodes(Model gm) {
|
||||||
|
|
|
@ -30,7 +30,7 @@ public class RDFServiceModel extends RDFServiceJena implements RDFService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create an RDFService to access a single default graph
|
* Create an RDFService to access a single default graph
|
||||||
* @param model
|
* @param model Jena Model
|
||||||
*/
|
*/
|
||||||
public RDFServiceModel(Model model) {
|
public RDFServiceModel(Model model) {
|
||||||
this.model = model;
|
this.model = model;
|
||||||
|
@ -38,7 +38,7 @@ public class RDFServiceModel extends RDFServiceJena implements RDFService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create an RDFService to access a Jena Dataset
|
* Create an RDFService to access a Jena Dataset
|
||||||
* @param dataset
|
* @param dataset Jena Dataset
|
||||||
*/
|
*/
|
||||||
public RDFServiceModel(Dataset dataset) {
|
public RDFServiceModel(Dataset dataset) {
|
||||||
this.dataset = dataset;
|
this.dataset = dataset;
|
||||||
|
|
|
@ -92,9 +92,9 @@ public class RDFServiceSparql extends RDFServiceImpl implements RDFService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an RDFService for a remote repository
|
* Returns an RDFService for a remote repository
|
||||||
* @param String - URI of the read SPARQL endpoint for the knowledge base
|
* @param readEndpointURI - URI of the read SPARQL endpoint for the knowledge base
|
||||||
* @param String - URI of the update SPARQL endpoint for the knowledge base
|
* @param updateEndpointURI - URI of the update SPARQL endpoint for the knowledge base
|
||||||
* @param String - URI of the default write graph within the knowledge base.
|
* @param defaultWriteGraphURI - URI of the default write graph within the knowledge base.
|
||||||
* this is the graph that will be written to when a graph
|
* this is the graph that will be written to when a graph
|
||||||
* is not explicitly specified.
|
* is not explicitly specified.
|
||||||
*
|
*
|
||||||
|
@ -125,8 +125,8 @@ public class RDFServiceSparql extends RDFServiceImpl implements RDFService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an RDFService for a remote repository
|
* Returns an RDFService for a remote repository
|
||||||
* @param String - URI of the read SPARQL endpoint for the knowledge base
|
* @param readEndpointURI - URI of the read SPARQL endpoint for the knowledge base
|
||||||
* @param String - URI of the update SPARQL endpoint for the knowledge base
|
* @param updateEndpointURI - URI of the update SPARQL endpoint for the knowledge base
|
||||||
*
|
*
|
||||||
* The default read graph is the union of all graphs in the
|
* The default read graph is the union of all graphs in the
|
||||||
* knowledge base
|
* knowledge base
|
||||||
|
@ -137,7 +137,7 @@ public class RDFServiceSparql extends RDFServiceImpl implements RDFService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an RDFService for a remote repository
|
* Returns an RDFService for a remote repository
|
||||||
* @param String - URI of the read and update SPARQL endpoint for the knowledge base
|
* @param endpointURI - URI of the read and update SPARQL endpoint for the knowledge base
|
||||||
*
|
*
|
||||||
* The default read graph is the union of all graphs in the
|
* The default read graph is the union of all graphs in the
|
||||||
* knowledge base
|
* knowledge base
|
||||||
|
@ -157,7 +157,7 @@ public class RDFServiceSparql extends RDFServiceImpl implements RDFService {
|
||||||
* If the precondition query returns a non-empty result no updates
|
* If the precondition query returns a non-empty result no updates
|
||||||
* will be made.
|
* will be made.
|
||||||
*
|
*
|
||||||
* @param ChangeSet - a set of changes to be performed on the RDF store.
|
* @param changeSet - a set of changes to be performed on the RDF store.
|
||||||
*
|
*
|
||||||
* @return boolean - indicates whether the precondition was satisfied
|
* @return boolean - indicates whether the precondition was satisfied
|
||||||
*/
|
*/
|
||||||
|
@ -208,10 +208,8 @@ public class RDFServiceSparql extends RDFServiceImpl implements RDFService {
|
||||||
* Performs a SPARQL construct query against the knowledge base. The query may have
|
* Performs a SPARQL construct query against the knowledge base. The query may have
|
||||||
* an embedded graph identifier.
|
* an embedded graph identifier.
|
||||||
*
|
*
|
||||||
* @param String query - the SPARQL query to be executed against the RDF store
|
* @param queryStr - the SPARQL query to be executed against the RDF store
|
||||||
* @param RDFService.ModelSerializationFormat resultFormat - type of serialization for RDF result of the SPARQL query
|
* @param resultFormat - type of serialization for RDF result of the SPARQL query
|
||||||
* @param OutputStream outputStream - the result of the query
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public InputStream sparqlConstructQuery(String queryStr,
|
public InputStream sparqlConstructQuery(String queryStr,
|
||||||
|
@ -253,8 +251,8 @@ public class RDFServiceSparql extends RDFServiceImpl implements RDFService {
|
||||||
* Performs a SPARQL describe query against the knowledge base. The query may have
|
* Performs a SPARQL describe query against the knowledge base. The query may have
|
||||||
* an embedded graph identifier.
|
* an embedded graph identifier.
|
||||||
*
|
*
|
||||||
* @param String query - the SPARQL query to be executed against the RDF store
|
* @param queryStr - the SPARQL query to be executed against the RDF store
|
||||||
* @param RDFService.ModelSerializationFormat resultFormat - type of serialization for RDF result of the SPARQL query
|
* @param resultFormat - type of serialization for RDF result of the SPARQL query
|
||||||
*
|
*
|
||||||
* @return InputStream - the result of the query
|
* @return InputStream - the result of the query
|
||||||
*
|
*
|
||||||
|
@ -283,8 +281,8 @@ public class RDFServiceSparql extends RDFServiceImpl implements RDFService {
|
||||||
* Performs a SPARQL select query against the knowledge base. The query may have
|
* Performs a SPARQL select query against the knowledge base. The query may have
|
||||||
* an embedded graph identifier.
|
* an embedded graph identifier.
|
||||||
*
|
*
|
||||||
* @param String query - the SPARQL query to be executed against the RDF store
|
* @param queryStr - the SPARQL query to be executed against the RDF store
|
||||||
* @param RDFService.ResultFormat resultFormat - format for the result of the Select query
|
* @param resultFormat - format for the result of the Select query
|
||||||
*
|
*
|
||||||
* @return InputStream - the result of the query
|
* @return InputStream - the result of the query
|
||||||
*
|
*
|
||||||
|
@ -374,7 +372,7 @@ public class RDFServiceSparql extends RDFServiceImpl implements RDFService {
|
||||||
* Performs a SPARQL ASK query against the knowledge base. The query may have
|
* Performs a SPARQL ASK query against the knowledge base. The query may have
|
||||||
* an embedded graph identifier.
|
* an embedded graph identifier.
|
||||||
*
|
*
|
||||||
* @param String query - the SPARQL query to be executed against the RDF store
|
* @param queryStr - the SPARQL query to be executed against the RDF store
|
||||||
*
|
*
|
||||||
* @return boolean - the result of the SPARQL query
|
* @return boolean - the result of the SPARQL query
|
||||||
*/
|
*/
|
||||||
|
@ -393,8 +391,6 @@ public class RDFServiceSparql extends RDFServiceImpl implements RDFService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a list of all the graph URIs in the RDF store.
|
* Get a list of all the graph URIs in the RDF store.
|
||||||
*
|
|
||||||
* @return List<String> - list of all the graph URIs in the RDF store
|
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<String> getGraphURIs() throws RDFServiceException {
|
public List<String> getGraphURIs() throws RDFServiceException {
|
||||||
|
@ -442,8 +438,6 @@ public class RDFServiceSparql extends RDFServiceImpl implements RDFService {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO - what is the definition of this method?
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void getGraphMetadata() throws RDFServiceException {
|
public void getGraphMetadata() throws RDFServiceException {
|
||||||
|
|
|
@ -48,10 +48,8 @@ public class RDFServiceSparqlHttp extends RDFServiceSparql {
|
||||||
* Performs a SPARQL construct query against the knowledge base. The query may have
|
* Performs a SPARQL construct query against the knowledge base. The query may have
|
||||||
* an embedded graph identifier.
|
* an embedded graph identifier.
|
||||||
*
|
*
|
||||||
* @param String query - the SPARQL query to be executed against the RDF store
|
* @param queryStr - the SPARQL query to be executed against the RDF store
|
||||||
* @param RDFService.ModelSerializationFormat resultFormat - type of serialization for RDF result of the SPARQL query
|
* @param resultFormat - type of serialization for RDF result of the SPARQL query
|
||||||
* @param OutputStream outputStream - the result of the query
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public InputStream sparqlConstructQuery(String queryStr,
|
public InputStream sparqlConstructQuery(String queryStr,
|
||||||
|
@ -89,8 +87,8 @@ public class RDFServiceSparqlHttp extends RDFServiceSparql {
|
||||||
* Performs a SPARQL describe query against the knowledge base. The query may have
|
* Performs a SPARQL describe query against the knowledge base. The query may have
|
||||||
* an embedded graph identifier.
|
* an embedded graph identifier.
|
||||||
*
|
*
|
||||||
* @param String query - the SPARQL query to be executed against the RDF store
|
* @param queryStr - the SPARQL query to be executed against the RDF store
|
||||||
* @param RDFService.ModelSerializationFormat resultFormat - type of serialization for RDF result of the SPARQL query
|
* @param resultFormat - type of serialization for RDF result of the SPARQL query
|
||||||
*
|
*
|
||||||
* @return InputStream - the result of the query
|
* @return InputStream - the result of the query
|
||||||
*
|
*
|
||||||
|
@ -118,8 +116,8 @@ public class RDFServiceSparqlHttp extends RDFServiceSparql {
|
||||||
* Performs a SPARQL select query against the knowledge base. The query may have
|
* Performs a SPARQL select query against the knowledge base. The query may have
|
||||||
* an embedded graph identifier.
|
* an embedded graph identifier.
|
||||||
*
|
*
|
||||||
* @param String query - the SPARQL query to be executed against the RDF store
|
* @param queryStr - the SPARQL query to be executed against the RDF store
|
||||||
* @param RDFService.ResultFormat resultFormat - format for the result of the Select query
|
* @param resultFormat - format for the result of the Select query
|
||||||
*
|
*
|
||||||
* @return InputStream - the result of the query
|
* @return InputStream - the result of the query
|
||||||
*
|
*
|
||||||
|
@ -174,7 +172,7 @@ public class RDFServiceSparqlHttp extends RDFServiceSparql {
|
||||||
* Performs a SPARQL ASK query against the knowledge base. The query may have
|
* Performs a SPARQL ASK query against the knowledge base. The query may have
|
||||||
* an embedded graph identifier.
|
* an embedded graph identifier.
|
||||||
*
|
*
|
||||||
* @param String query - the SPARQL query to be executed against the RDF store
|
* @param queryStr - the SPARQL query to be executed against the RDF store
|
||||||
*
|
*
|
||||||
* @return boolean - the result of the SPARQL query
|
* @return boolean - the result of the SPARQL query
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -249,8 +249,8 @@ public class ABoxRecomputer {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds inferences to temporary rebuildmodel
|
* Adds inferences to temporary rebuildmodel
|
||||||
* @param individualURI
|
* @param individualURI The individual
|
||||||
* @param rebuildModel
|
* @param rebuildModel The rebuild model
|
||||||
* @return any additional inferences produced by plugins that affect other
|
* @return any additional inferences produced by plugins that affect other
|
||||||
* individuals
|
* individuals
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -82,12 +82,12 @@ public class SimpleReasoner extends StatementListener
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param tboxModel - input. This model contains both asserted and inferred TBox axioms
|
* @param tboxModel - input. This model contains both asserted and inferred TBox axioms
|
||||||
* @param aboxModel - input. This model contains asserted ABox statements
|
* @param rdfService - input. An RDF Service
|
||||||
* @param inferenceModel - output. This is the model in which inferred (materialized)
|
* @param inferenceModel - output. This is the model in which inferred (materialized)
|
||||||
* ABox statements are maintained (added or retracted).
|
* ABox statements are maintained (added or retracted).
|
||||||
* @param inferenceRebuildModel - output. This the model is temporarily used when the
|
* @param inferenceRebuildModel - output. This the model is temporarily used when the
|
||||||
* whole ABox inference model is rebuilt
|
* whole ABox inference model is rebuilt
|
||||||
* @param inferenceScratchpadModel - output. This the model is temporarily used when
|
* @param scratchpadModel - output. This the model is temporarily used when
|
||||||
* the whole ABox inference model is rebuilt
|
* the whole ABox inference model is rebuilt
|
||||||
* @param searchIndexer - output. If not null, the indexer will be paused before the
|
* @param searchIndexer - output. If not null, the indexer will be paused before the
|
||||||
* ABox inference model is rebuilt and unpaused when the rebuild is complete.
|
* ABox inference model is rebuilt and unpaused when the rebuild is complete.
|
||||||
|
|
|
@ -26,7 +26,7 @@ import edu.cornell.mannlib.vitro.webapp.reasoner.SimpleReasoner;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* handles rules of the form
|
* handles rules of the form
|
||||||
* assertedProp1(?x, ?y) ^ assertedProp2(?y, ?z) -> inferredProp(?x, ?z)
|
* assertedProp1(?x, ?y) ^ assertedProp2(?y, ?z) -> inferredProp(?x, ?z)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public abstract class SimpleBridgingRule implements ReasonerPlugin {
|
public abstract class SimpleBridgingRule implements ReasonerPlugin {
|
||||||
|
|
|
@ -18,7 +18,7 @@ import edu.cornell.mannlib.vitro.webapp.reasoner.SimpleReasoner;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* handles rules of the form
|
* handles rules of the form
|
||||||
* assertedProp(?x, ?y) ^ type(?x) -> inferredProp(?x, ?y)
|
* assertedProp(?x, ?y) ^ type(?x) -> inferredProp(?x, ?y)
|
||||||
*
|
*
|
||||||
* @author bjl23
|
* @author bjl23
|
||||||
*
|
*
|
||||||
|
|
|
@ -347,7 +347,6 @@ public class PagedSearchController extends FreemarkerHttpServlet {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the class groups represented for the individuals in the documents.
|
* Get the class groups represented for the individuals in the documents.
|
||||||
* @param qtxt
|
|
||||||
*/
|
*/
|
||||||
private List<VClassGroupSearchLink> getClassGroupsLinks(VitroRequest vreq, VClassGroupDao grpDao, SearchResultDocumentList docs, SearchResponse rsp, String qtxt) {
|
private List<VClassGroupSearchLink> getClassGroupsLinks(VitroRequest vreq, VClassGroupDao grpDao, SearchResultDocumentList docs, SearchResponse rsp, String qtxt) {
|
||||||
Map<String,Long> cgURItoCount = new HashMap<String,Long>();
|
Map<String,Long> cgURItoCount = new HashMap<String,Long>();
|
||||||
|
@ -604,8 +603,6 @@ public class PagedSearchController extends FreemarkerHttpServlet {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Makes a message to display to user for a bad search term.
|
* Makes a message to display to user for a bad search term.
|
||||||
* @param queryText
|
|
||||||
* @param exceptionMsg
|
|
||||||
*/
|
*/
|
||||||
private String makeBadSearchMessage(String querytext, String exceptionMsg, VitroRequest vreq){
|
private String makeBadSearchMessage(String querytext, String exceptionMsg, VitroRequest vreq){
|
||||||
String rv = "";
|
String rv = "";
|
||||||
|
|
|
@ -85,7 +85,7 @@ public class GetAllPrefix extends BaseEditController {
|
||||||
* Returns a map of prefixes for use in building queries. Will manufacture a
|
* Returns a map of prefixes for use in building queries. Will manufacture a
|
||||||
* prefix for any namespace that doesn't have an associated owl:Ontology resource
|
* prefix for any namespace that doesn't have an associated owl:Ontology resource
|
||||||
* with a prefix annotation
|
* with a prefix annotation
|
||||||
* @param wadf
|
* @param wadf DAO Factory
|
||||||
* @return map of prefix strings to namespace URIs
|
* @return map of prefix strings to namespace URIs
|
||||||
*/
|
*/
|
||||||
private Map<String, String> getPrefixMap(WebappDaoFactory wadf) {
|
private Map<String, String> getPrefixMap(WebappDaoFactory wadf) {
|
||||||
|
@ -135,8 +135,8 @@ public class GetAllPrefix extends BaseEditController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Makes the markup for a prefix option
|
* Makes the markup for a prefix option
|
||||||
* @param prefix
|
* @param prefix Prefix
|
||||||
* @param URI
|
* @param URI URI
|
||||||
* @return option string
|
* @return option string
|
||||||
*/
|
*/
|
||||||
private String makeOption(String prefix, String URI) {
|
private String makeOption(String prefix, String URI) {
|
||||||
|
|
|
@ -33,9 +33,6 @@ import edu.cornell.mannlib.vitro.webapp.dao.VClassDao;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This servlet gets all the properties for a given subject.
|
* This servlet gets all the properties for a given subject.
|
||||||
*
|
|
||||||
* @param vClassURI
|
|
||||||
* @author yuysun
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class GetClazzAllProperties extends BaseEditController {
|
public class GetClazzAllProperties extends BaseEditController {
|
||||||
|
|
|
@ -22,9 +22,6 @@ import edu.cornell.mannlib.vitro.webapp.dao.DataPropertyDao;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This servlet gets all the data properties for a given subject.
|
* This servlet gets all the data properties for a given subject.
|
||||||
*
|
|
||||||
* @param vClassURI
|
|
||||||
* @author yuysun
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class GetClazzDataProperties extends BaseEditController {
|
public class GetClazzDataProperties extends BaseEditController {
|
||||||
|
|
|
@ -30,9 +30,6 @@ import edu.cornell.mannlib.vitro.webapp.dao.VClassDao;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This servlet gets all the object properties for a given subject.
|
* This servlet gets all the object properties for a given subject.
|
||||||
*
|
|
||||||
* @param vClassURI
|
|
||||||
* @author yuysun
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class GetClazzObjectProperties extends BaseEditController {
|
public class GetClazzObjectProperties extends BaseEditController {
|
||||||
|
|
|
@ -24,9 +24,6 @@ import edu.cornell.mannlib.vitro.webapp.dao.VClassDao;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This servlet gets all the range classes for a given predicate.
|
* This servlet gets all the range classes for a given predicate.
|
||||||
*
|
|
||||||
* @param predicate
|
|
||||||
* @author yuysun
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class GetObjectClasses extends BaseEditController {
|
public class GetObjectClasses extends BaseEditController {
|
||||||
|
|
|
@ -52,7 +52,7 @@ public final class JsonToFmModel
|
||||||
/**
|
/**
|
||||||
* Convert JSON Object string to Freemarker-compatible data model
|
* Convert JSON Object string to Freemarker-compatible data model
|
||||||
*
|
*
|
||||||
* @param jsonString
|
* @param jsonString JSON string
|
||||||
* @return model
|
* @return model
|
||||||
* @throws JSONException
|
* @throws JSONException
|
||||||
*/
|
*/
|
||||||
|
@ -63,7 +63,7 @@ public final class JsonToFmModel
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* JSONObject is an unordered collection of name/value pairs -> convert to Map (equivalent to Freemarker "hash")
|
* JSONObject is an unordered collection of name/value pairs -> convert to Map (equivalent to Freemarker "hash")
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public static Map<String, Object> convertJSONObjectToMap(JSONObject jo) throws JSONException
|
public static Map<String, Object> convertJSONObjectToMap(JSONObject jo) throws JSONException
|
||||||
|
@ -105,7 +105,7 @@ public final class JsonToFmModel
|
||||||
/**
|
/**
|
||||||
* Convert JSON Array string to Freemarker-compatible data model
|
* Convert JSON Array string to Freemarker-compatible data model
|
||||||
*
|
*
|
||||||
* @param jsonString
|
* @param jsonString JSON String
|
||||||
* @return model
|
* @return model
|
||||||
* @throws JSONException
|
* @throws JSONException
|
||||||
*/
|
*/
|
||||||
|
@ -118,7 +118,7 @@ public final class JsonToFmModel
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* JSONArray is an ordered sequence of values -> convert to List (equivalent to Freemarker "sequence")
|
* JSONArray is an ordered sequence of values -> convert to List (equivalent to Freemarker "sequence")
|
||||||
*/
|
*/
|
||||||
public static List<Object> convertJSONArrayToList(JSONArray ja) throws JSONException
|
public static List<Object> convertJSONArrayToList(JSONArray ja) throws JSONException
|
||||||
{
|
{
|
||||||
|
|
|
@ -81,7 +81,7 @@ public class MakeTidy {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* We don't want to log a partial line, so {@link #flush()} does
|
* We don't want to log a partial line, so does
|
||||||
* nothing.
|
* nothing.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -11,24 +11,21 @@ public interface NamespaceMapper extends ModelChangedListener {
|
||||||
/**
|
/**
|
||||||
* Returns the current abbreviation to use for a given namespace,
|
* Returns the current abbreviation to use for a given namespace,
|
||||||
* or null if undefined.
|
* or null if undefined.
|
||||||
* @param namespace
|
* @param namespace Namespace
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public String getPrefixForNamespace(String namespace);
|
public String getPrefixForNamespace(String namespace);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a list of abbreviations that have been used to
|
* Returns a list of abbreviations that have been used to
|
||||||
* represent a given namespace.
|
* represent a given namespace.
|
||||||
* @param namespace
|
* @param namespace Namespace
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public List<String> getPrefixesForNamespace(String namespace);
|
public List<String> getPrefixesForNamespace(String namespace);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the full namespace URI represented by a given
|
* Returns the full namespace URI represented by a given
|
||||||
* abbreviation, or null if not found.
|
* abbreviation, or null if not found.
|
||||||
* @param namespace
|
* @param prefix Prefix
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public String getNamespaceForPrefix(String prefix);
|
public String getNamespaceForPrefix(String prefix);
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ public class SparqlQueryUtils {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A convenience method to attempt parsing a query string with various syntaxes
|
* A convenience method to attempt parsing a query string with various syntaxes
|
||||||
* @param queryString
|
* @param queryString Query String
|
||||||
* @return Query
|
* @return Query
|
||||||
*/
|
*/
|
||||||
public static Query create(String queryString) {
|
public static Query create(String queryString) {
|
||||||
|
|
|
@ -143,7 +143,9 @@ public class BrowseDataGetter extends DataGetterBase implements DataGetter {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets a list of all VClassGroups with vclasses with individual counts.
|
* Gets a list of all VClassGroups with vclasses with individual counts.
|
||||||
* @param params2
|
* @param request current VitroRequest
|
||||||
|
* @param params a parameter map
|
||||||
|
* @param context current servlet context
|
||||||
*/
|
*/
|
||||||
protected Map<String,Object> getAllClassGroupData(VitroRequest request, Map params, ServletContext context){
|
protected Map<String,Object> getAllClassGroupData(VitroRequest request, Map params, ServletContext context){
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String,Object> map = new HashMap<String,Object>();
|
||||||
|
|
|
@ -352,9 +352,6 @@ public class DataGetterUtils {
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* For the page, get the actual Data Getters to be employed.
|
* For the page, get the actual Data Getters to be employed.
|
||||||
* @throws ClassNotFoundException
|
|
||||||
* @throws IllegalAccessException
|
|
||||||
* @throws InstantiationException
|
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
public static List<PageDataGetter> DataGetterObjects(VitroRequest vreq, String pageUri) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
|
public static List<PageDataGetter> DataGetterObjects(VitroRequest vreq, String pageUri) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
|
||||||
|
|
|
@ -19,9 +19,8 @@ public class DedupAndExtract {
|
||||||
/**
|
/**
|
||||||
* Returns a model where redundant individuals that are sameAs one another are smushed
|
* Returns a model where redundant individuals that are sameAs one another are smushed
|
||||||
* using URIs in preferred namespaces where possible.
|
* using URIs in preferred namespaces where possible.
|
||||||
* @param model
|
* @param model Jena Model
|
||||||
* @param preferredIndividualNamespace
|
* @param preferredNamespace Preferred namespace
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public Model dedupAndExtract( Model model, String preferredNamespace ) {
|
public Model dedupAndExtract( Model model, String preferredNamespace ) {
|
||||||
|
|
||||||
|
|
|
@ -51,8 +51,8 @@ public class JenaIngestUtils {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a new copy of the input model with blank nodes renamed with namespaceEtc plus a random int.
|
* Returns a new copy of the input model with blank nodes renamed with namespaceEtc plus a random int.
|
||||||
* @param namespaceEtc
|
* @param inModel input Jena Model
|
||||||
* @return
|
* @param namespaceEtc Namespace
|
||||||
*/
|
*/
|
||||||
public Model renameBNodes(Model inModel, String namespaceEtc) {
|
public Model renameBNodes(Model inModel, String namespaceEtc) {
|
||||||
return renameBNodes(inModel, namespaceEtc, null);
|
return renameBNodes(inModel, namespaceEtc, null);
|
||||||
|
@ -61,8 +61,8 @@ public class JenaIngestUtils {
|
||||||
/**
|
/**
|
||||||
* Returns a new copy of the input model with blank nodes renamed with namespaceEtc plus a random int.
|
* Returns a new copy of the input model with blank nodes renamed with namespaceEtc plus a random int.
|
||||||
* Will prevent URI collisions with supplied dedupModel
|
* Will prevent URI collisions with supplied dedupModel
|
||||||
* @param namespaceEtc
|
* @param inModel input Jena Model
|
||||||
* @return
|
* @param namespaceEtc Namespace
|
||||||
*/
|
*/
|
||||||
public Model renameBNodes(Model inModel, String namespaceEtc, Model dedupModel) {
|
public Model renameBNodes(Model inModel, String namespaceEtc, Model dedupModel) {
|
||||||
Model outModel = ModelFactory.createDefaultModel();
|
Model outModel = ModelFactory.createDefaultModel();
|
||||||
|
@ -361,11 +361,11 @@ public class JenaIngestUtils {
|
||||||
* Splits values for a given data property URI on a supplied regex and
|
* Splits values for a given data property URI on a supplied regex and
|
||||||
* asserts each value using newPropertyURI. New statements returned in
|
* asserts each value using newPropertyURI. New statements returned in
|
||||||
* a Jena Model. Split values may be optionally trim()ed.
|
* a Jena Model. Split values may be optionally trim()ed.
|
||||||
* @param inModel
|
* @param inModel Input Jena model
|
||||||
* @param propertyURI
|
* @param propertyURI URI for property
|
||||||
* @param splitRegex
|
* @param splitRegex Regex for split
|
||||||
* @param newPropertyURI
|
* @param newPropertyURI URI for new property
|
||||||
* @param trim
|
* @param trim Flag to trim property
|
||||||
* @return outModel
|
* @return outModel
|
||||||
*/
|
*/
|
||||||
public Model splitPropertyValues(Model inModel, String propertyURI, String splitRegex, String newPropertyURI, boolean trim) {
|
public Model splitPropertyValues(Model inModel, String propertyURI, String splitRegex, String newPropertyURI, boolean trim) {
|
||||||
|
@ -418,9 +418,8 @@ public class JenaIngestUtils {
|
||||||
/**
|
/**
|
||||||
* A simple resource smusher based on a supplied inverse-functional property.
|
* A simple resource smusher based on a supplied inverse-functional property.
|
||||||
* A new model containing only resources about the smushed statements is returned.
|
* A new model containing only resources about the smushed statements is returned.
|
||||||
* @param inModel
|
* @param inModel Input Jena model
|
||||||
* @param prop
|
* @param prop Property
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public Model smushResources(Model inModel, Property prop) {
|
public Model smushResources(Model inModel, Property prop) {
|
||||||
Model outModel = ModelFactory.createDefaultModel();
|
Model outModel = ModelFactory.createDefaultModel();
|
||||||
|
@ -480,9 +479,8 @@ public class JenaIngestUtils {
|
||||||
/**
|
/**
|
||||||
* Returns a model where redundant individuals that are sameAs one another are smushed
|
* Returns a model where redundant individuals that are sameAs one another are smushed
|
||||||
* using URIs in preferred namespaces where possible.
|
* using URIs in preferred namespaces where possible.
|
||||||
* @param model
|
* @param model Jena Model
|
||||||
* @param preferredIndividualNamespace
|
* @param preferredNamespace Preferred Namespace
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public Model dedupAndExtract( Model model, String preferredNamespace ) {
|
public Model dedupAndExtract( Model model, String preferredNamespace ) {
|
||||||
Model extractsModel = ModelFactory.createDefaultModel();
|
Model extractsModel = ModelFactory.createDefaultModel();
|
||||||
|
@ -622,7 +620,6 @@ public class JenaIngestUtils {
|
||||||
* @param baseOntModel The model containing the relevant statements
|
* @param baseOntModel The model containing the relevant statements
|
||||||
* @param tboxOntModel The model containing class and property data
|
* @param tboxOntModel The model containing class and property data
|
||||||
* @param usePrimaryLabelOnly If true, discard rdfs:labels from uri2. Otherwise retain.
|
* @param usePrimaryLabelOnly If true, discard rdfs:labels from uri2. Otherwise retain.
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public MergeResult doMerge(String uri1, String uri2, OntModel baseOntModel,
|
public MergeResult doMerge(String uri1, String uri2, OntModel baseOntModel,
|
||||||
OntModel tboxOntModel, boolean usePrimaryLabelOnly){
|
OntModel tboxOntModel, boolean usePrimaryLabelOnly){
|
||||||
|
|
|
@ -48,7 +48,7 @@ public class StackTraceLayout extends Layout {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The StackTraceLayout does not handle the throwable contained within
|
* The StackTraceLayout does not handle the throwable contained within
|
||||||
* LoggingEvents. Thus, it returns <code>true</code>.
|
* LoggingEvents. Thus, it returns {@code true}.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean ignoresThrowable() {
|
public boolean ignoresThrowable() {
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue