Interface OntPersonality

All Known Implementing Classes:
OntPersonalityImpl

public interface OntPersonality
A Ontology RDF Model configuration object that serves for the following purposes:
  • Defines a set of permitted mappings from [interface] Class objects to OWL Ontology Object factory that can generate instances of the facet represented by the Class.
  • Defines a set of builtin OWL entities
  • Defines a set of OWL punnings
  • Defines a set of reserved Resources and Propertys, that cannot be used as OWL Entities
NOTE: The instance of this interface must also extend Jena Personality with a generic type RDFNode.

Instances of this class must be unmodifiable and the builder should be used to create instances with different settings.

  • Method Details

    • asJenaPersonality

      static org.apache.jena.enhanced.Personality<org.apache.jena.rdf.model.RDFNode> asJenaPersonality(OntPersonality p) throws OntJenaException
      Represents the given OntPersonality configuration as a Jena Personality with a generic type RDFNode.
      Parameters:
      p - OntPersonality
      Returns:
      Personality
      Throws:
      OntJenaException - in case the conversion is not possible
      See Also:
    • types

      Stream<Class<? extends org.apache.jena.rdf.model.RDFNode>> types()
      Lists all object-types, which are supported by this personality configuration. Each of the class-types are associated with either EnhNodeFactory (if it is OntObject type) or with Implementation (if it is a standard jena resource object).
      Returns:
      Stream of Classes, subclasses of RDFNode.
    • getObjectFactory

      EnhNodeFactory getObjectFactory(Class<? extends org.apache.jena.rdf.model.RDFNode> type)
      Gets the implementation-factory for the specified object type, returning null if there isn't one available.
      Parameters:
      type - a class-type of OntObject
      Returns:
      EnhNodeFactory a factory to create an instance of the given type, not null
    • supports

      boolean supports(Class<? extends org.apache.jena.rdf.model.RDFNode> type)
      Answers if a type is supported.
      Parameters:
      type - Class
      Returns:
      boolean
    • copy

      Makes a full copy of this configuration.
      Returns:
      OntPersonality a new instance identical to this
    • getName

      String getName()
      Returns personality name, language profile.
      Returns:
      String
    • getConfig

      OntConfig getConfig()
      Returns the config. Config holds various settings to control model behaviour.
      Returns:
      OntConfig
    • getPunnings

      Returns a punnings' vocabulary.
      Returns:
      OntPersonality.Punnings
    • getBuiltins

      Returns a builtins vocabulary.
      Returns:
      OntPersonality.Builtins
    • getReserved

      Returns a reserved vocabulary.
      Returns:
      OntPersonality.Reserved
    • forbidden

      Set<String> forbidden(Class<? extends OntObject> type)
      Gets system resources for the specified type. An entity of the given type cannot be created with any of the URIs, which this method returns.
      Parameters:
      type - OntObject
      Returns:
      Set of URIs
    • types

      default <T extends OntObject> Stream<Class<? extends T>> types(Class<T> type)
      Lists all object-types encapsulated by this config, that extend the specified object-type.
      Type Parameters:
      T - any subtype of OntObject
      Parameters:
      type - Class-type of OntObject
      Returns:
      Stream of all types where each element extends T inclusive