Class NamespaceMapperJena
- java.lang.Object
-
- org.apache.jena.rdf.listeners.StatementListener
-
- edu.cornell.mannlib.vitro.webapp.utils.jena.NamespaceMapperJena
-
- All Implemented Interfaces:
NamespaceMapper,org.apache.jena.rdf.model.ModelChangedListener
public class NamespaceMapperJena extends org.apache.jena.rdf.listeners.StatementListener implements NamespaceMapper
-
-
Constructor Summary
Constructors Constructor Description NamespaceMapperJena(org.apache.jena.ontology.OntModel dataModel, org.apache.jena.ontology.OntModel metadataModel, String namespaceForNamespaceObjects)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddedStatement(org.apache.jena.rdf.model.Statement s)StringgetNamespaceForPrefix(String prefix)Returns the full namespace URI represented by a given abbreviation, or null if not found.List<String>getPrefixesForNamespace(String namespace)Returns a list of abbreviations that have been used to represent a given namespace.StringgetPrefixForNamespace(String namespace)Returns the current abbreviation to use for a given namespace, or null if undefined.voidremovedStatement(org.apache.jena.rdf.model.Statement s)StringtoString()-
Methods inherited from class org.apache.jena.rdf.listeners.StatementListener
addedStatements, addedStatements, addedStatements, addedStatements, notifyEvent, removedStatements, removedStatements, removedStatements, removedStatements
-
-
-
-
Constructor Detail
-
NamespaceMapperJena
public NamespaceMapperJena(org.apache.jena.ontology.OntModel dataModel, org.apache.jena.ontology.OntModel metadataModel, String namespaceForNamespaceObjects)
-
-
Method Detail
-
addedStatement
public void addedStatement(org.apache.jena.rdf.model.Statement s)
- Specified by:
addedStatementin interfaceorg.apache.jena.rdf.model.ModelChangedListener- Overrides:
addedStatementin classorg.apache.jena.rdf.listeners.StatementListener
-
removedStatement
public void removedStatement(org.apache.jena.rdf.model.Statement s)
- Specified by:
removedStatementin interfaceorg.apache.jena.rdf.model.ModelChangedListener- Overrides:
removedStatementin classorg.apache.jena.rdf.listeners.StatementListener
-
getNamespaceForPrefix
public String getNamespaceForPrefix(String prefix)
Description copied from interface:NamespaceMapperReturns the full namespace URI represented by a given abbreviation, or null if not found.- Specified by:
getNamespaceForPrefixin interfaceNamespaceMapper- Parameters:
prefix- Prefix
-
getPrefixForNamespace
public String getPrefixForNamespace(String namespace)
Description copied from interface:NamespaceMapperReturns the current abbreviation to use for a given namespace, or null if undefined.- Specified by:
getPrefixForNamespacein interfaceNamespaceMapper- Parameters:
namespace- Namespace
-
getPrefixesForNamespace
public List<String> getPrefixesForNamespace(String namespace)
Description copied from interface:NamespaceMapperReturns a list of abbreviations that have been used to represent a given namespace.- Specified by:
getPrefixesForNamespacein interfaceNamespaceMapper- Parameters:
namespace- Namespace
-
-