Interface OntVocabulary

All Known Implementing Classes:
OntVocabulary.Impls.BaseImpl

public interface OntVocabulary
An Ontology Vocabulary. This is a generic interface that simply maps an uri-key to a Set of RDF Resources or RDF Properties, that are defined in vocabulary schemas and represent some family determined by that key. A schema is a java class containing public static final constants. Schemas are usually located inside the packages org.apache.jena.vocabulary and org.apache.jena.vocabulary. There are two kinds of property/resources described by this vocabulary: system and builtin. A system resource/property is simply a URI defined in any scheme. A builtin resource/property is a URI with a known type that does not require explicit declaration. Note that all methods of this interface return unmodifiable Sets.
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
    A factory-helper to work with OntVocabulary instances, that wrap constant-holders from the packages org.apache.jena.vocabulary and org.apache.jena.vocabulary (such as OWL2).
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final OntVocabulary
     
    static final OntVocabulary
     
    static final OntVocabulary
     
    static final OntVocabulary
     
    static final OntVocabulary
     
    static final OntVocabulary
     
    static final OntVocabulary
     
    static final OntVocabulary
     
    static final OntVocabulary
     
    static final OntVocabulary
     
    static final OntVocabulary
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates a new instance of OntVocabulary, combining this and the given vocabularies.
    Set<? extends org.apache.jena.rdf.model.Resource>
    get(String key)
    Answers a Set of system/builtin Resources for the specified URI-key.
    default <X extends org.apache.jena.rdf.model.Resource>
    Set<X>
    get(org.apache.jena.rdf.model.Resource uri)
    Answers a Set of system/builtin Resources for the specified URI-key.
    default Set<org.apache.jena.rdf.model.Property>
    Returns a collection of all built-in properties with implicit rdf:type equal to owl:AnnotationProperty.
    default Set<org.apache.jena.rdf.model.Resource>
    Returns a collection of all built-in uri resources with implicit rdf:type equal to owl:Class.
    default Set<org.apache.jena.rdf.model.Property>
    Returns a collection of all built-in properties with implicit rdf:type equal to owl:DatatypeProperty.
    default Set<org.apache.jena.rdf.model.Resource>
    Returns a collection of all built-in uri-resources with implicit rdf:type equal to rdfs:Datatype.
    default Set<org.apache.jena.rdf.model.Property>
    Returns a collection of all built-in properties with implicit rdf:type equal to owl:ObjectProperty.
    default Set<org.apache.jena.rdf.model.Resource>
    Returns a collection of all built-in uri resources with implicit rdf:type equal to swrl:Builtin.
    default Set<org.apache.jena.rdf.model.Property>
    Returns all reserved properties: OWL2 ontology cannot contain assertion with predicate belonging to the return collection.
    default Set<org.apache.jena.rdf.model.Resource>
    Returns all reserved resources: OWL entities cannot have an uri belonging to the return collection.
  • Field Details

  • Method Details

    • get

      Set<? extends org.apache.jena.rdf.model.Resource> get(String key)
      Answers a Set of system/builtin Resources for the specified URI-key. A URI-key - is a schema URI that determines a family of desired resources. For example, to get all resources a key rdfs:Resource should be used, because it is a supertype of everything.
      Parameters:
      key - String, not null
      Returns:
      a Set of Resources (possibly empty)
    • get

      default <X extends org.apache.jena.rdf.model.Resource> Set<X> get(org.apache.jena.rdf.model.Resource uri)
      Answers a Set of system/builtin Resources for the specified URI-key.
      Type Parameters:
      X - either Resource or Property
      Parameters:
      uri - a URI-Resource, not null
      Returns:
      a Set of Xs, not null but possibly empty
    • getBuiltinAnnotationProperties

      default Set<org.apache.jena.rdf.model.Property> getBuiltinAnnotationProperties()
      Returns a collection of all built-in properties with implicit rdf:type equal to owl:AnnotationProperty.
      Returns:
      Set of Properties
    • getBuiltinDatatypeProperties

      default Set<org.apache.jena.rdf.model.Property> getBuiltinDatatypeProperties()
      Returns a collection of all built-in properties with implicit rdf:type equal to owl:DatatypeProperty.
      Returns:
      Set of Properties
    • getBuiltinObjectProperties

      default Set<org.apache.jena.rdf.model.Property> getBuiltinObjectProperties()
      Returns a collection of all built-in properties with implicit rdf:type equal to owl:ObjectProperty.
      Returns:
      Set of Properties
    • getBuiltinDatatypes

      default Set<org.apache.jena.rdf.model.Resource> getBuiltinDatatypes()
      Returns a collection of all built-in uri-resources with implicit rdf:type equal to rdfs:Datatype.
      Returns:
      Set of Resources
    • getBuiltinClasses

      default Set<org.apache.jena.rdf.model.Resource> getBuiltinClasses()
      Returns a collection of all built-in uri resources with implicit rdf:type equal to owl:Class.
      Returns:
      Set of Resources
    • getBuiltinSWRLs

      default Set<org.apache.jena.rdf.model.Resource> getBuiltinSWRLs()
      Returns a collection of all built-in uri resources with implicit rdf:type equal to swrl:Builtin.
      Returns:
      Set of Resources
    • getSystemResources

      default Set<org.apache.jena.rdf.model.Resource> getSystemResources()
      Returns all reserved resources: OWL entities cannot have an uri belonging to the return collection.
      Returns:
      Set of Resources
    • getSystemProperties

      default Set<org.apache.jena.rdf.model.Property> getSystemProperties()
      Returns all reserved properties: OWL2 ontology cannot contain assertion with predicate belonging to the return collection.
      Returns:
      Set of Properties
    • and

      default OntVocabulary and(OntVocabulary other)
      Creates a new instance of OntVocabulary, combining this and the given vocabularies.
      Parameters:
      other - OntVocabulary, not null
      Returns:
      OntVocabulary