Class 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
      void addedStatement​(org.apache.jena.rdf.model.Statement s)  
      String getNamespaceForPrefix​(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.
      String getPrefixForNamespace​(String namespace)
      Returns the current abbreviation to use for a given namespace, or null if undefined.
      void removedStatement​(org.apache.jena.rdf.model.Statement s)  
      String toString()  
      • Methods inherited from class org.apache.jena.rdf.listeners.StatementListener

        addedStatements, addedStatements, addedStatements, addedStatements, notifyEvent, removedStatements, removedStatements, removedStatements, removedStatements
      • Methods inherited from interface org.apache.jena.rdf.model.ModelChangedListener

        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:
        addedStatement in interface org.apache.jena.rdf.model.ModelChangedListener
        Overrides:
        addedStatement in class org.apache.jena.rdf.listeners.StatementListener
      • removedStatement

        public void removedStatement​(org.apache.jena.rdf.model.Statement s)
        Specified by:
        removedStatement in interface org.apache.jena.rdf.model.ModelChangedListener
        Overrides:
        removedStatement in class org.apache.jena.rdf.listeners.StatementListener
      • getNamespaceForPrefix

        public String getNamespaceForPrefix​(String prefix)
        Description copied from interface: NamespaceMapper
        Returns the full namespace URI represented by a given abbreviation, or null if not found.
        Specified by:
        getNamespaceForPrefix in interface NamespaceMapper
        Parameters:
        prefix - Prefix
      • getPrefixForNamespace

        public String getPrefixForNamespace​(String namespace)
        Description copied from interface: NamespaceMapper
        Returns the current abbreviation to use for a given namespace, or null if undefined.
        Specified by:
        getPrefixForNamespace in interface NamespaceMapper
        Parameters:
        namespace - Namespace