Class Vocabulary

    • Constructor Detail

      • Vocabulary

        public Vocabulary​(String namespace)
        Overloaded Constructor.
        Parameters:
        namespace - the namespace IRI prefix.
    • Method Detail

      • getNamespace

        public org.eclipse.rdf4j.model.IRI getNamespace()
        Returns:
        the namespace associated to this vocabulary.
      • getClass

        public org.eclipse.rdf4j.model.IRI getClass​(String name)
        Returns a class defined within this vocabulary.
        Parameters:
        name - class name.
        Returns:
        the IRI associated to such resource.
      • getProperty

        public org.eclipse.rdf4j.model.IRI getProperty​(String name)
        Returns a property defined within this vocabulary.
        Parameters:
        name - property name.
        Returns:
        the IRI associated to such property.
      • getProperty

        public org.eclipse.rdf4j.model.IRI getProperty​(String name,
                                                       org.eclipse.rdf4j.model.IRI defaultValue)
        Returns a property defined within this vocabulary, if not found the defaultValue will be returned.
        Parameters:
        name - property name.
        defaultValue - the default value if property name not found.
        Returns:
        the IRI associated to such property.
      • getPropertyCamelCase

        public org.eclipse.rdf4j.model.IRI getPropertyCamelCase​(String property)
        Returns the property IRI for the specified property string. If the string contains a list of words separated by blank chars, such words are merged and camel case separated.
        Parameters:
        property - property name.
        Returns:
        property IRI.
      • getClasses

        public org.eclipse.rdf4j.model.IRI[] getClasses()
        Returns:
        the list of all defined classes.
      • getProperties

        public org.eclipse.rdf4j.model.IRI[] getProperties()
        Returns:
        the list of all defined properties.
      • getComments

        public Map<org.eclipse.rdf4j.model.IRI,​String> getComments()
        Returns all the defined comments for resources.
        Returns:
        unmodifiable list of comments.
      • getCommentFor

        public String getCommentFor​(org.eclipse.rdf4j.model.IRI resource)
        Returns the comment for the given resource.
        Parameters:
        resource - input resource to have a comment.
        Returns:
        the human readable comment associated to the given resource.
      • createIRI

        protected org.eclipse.rdf4j.model.IRI createIRI​(String iriStr)
        Creates a IRI.
        Parameters:
        iriStr - the IRI string
        Returns:
        the IRI instance.
      • createClass

        protected org.eclipse.rdf4j.model.IRI createClass​(String namespace,
                                                          String resource)
        Creates a resource and register it to the classes map.
        Parameters:
        namespace - vocabulary namespace.
        resource - name of the resource.
        Returns:
        the created resource IRI.
      • createProperty

        protected org.eclipse.rdf4j.model.IRI createProperty​(String namespace,
                                                             String property)
        Creates a property and register it to the properties map.
        Parameters:
        namespace - vocabulary namespace.
        property - name of the property.
        Returns:
        the created property IRI.