Interface Metamodel

All Known Implementing Classes:
MetamodelImpl

public interface Metamodel
Provides access to the metamodel of persistent entities in the persistence unit.
  • Method Details

    • entity

      <X> EntityType<X> entity(Class<X> cls)
      Return the metamodel entity type representing the entity.
      Parameters:
      cls - the type of the represented entity
      Returns:
      the metamodel entity type
      Throws:
      IllegalArgumentException - if not an entity
    • getMappedEntities

      Set<EntityType<?>> getMappedEntities(String classIri)
      Returns the metamodel entity types representing the specified ontological class.

      Note that since multiple entity types can be mapped to the same ontological class, this method returns a set of entity types instead of just one.

      Parameters:
      classIri - Identifier of the ontological class
      Returns:
      A set of entity types mapped to the specified class IRI, possibly empty
    • getManagedTypes

      Set<ManagedType<?>> getManagedTypes()
      Return the metamodel managed types.
      Returns:
      the metamodel managed types
    • getEntities

      Set<EntityType<?>> getEntities()
      Return the metamodel entity types.
      Returns:
      the metamodel entity types
    • getInferredClasses

      Set<Class<?>> getInferredClasses()
      Get the set of classes that contain inferred attributes. These classes are handled specially since inferred attributes can be influenced by changes to any other attributes in any other entity.
      Returns:
      The set of classes with inferred attributes.
    • getModuleExtractionExtraSignature

      Set<URI> getModuleExtractionExtraSignature()
      Gets a set of URIs that should be added to module extraction signature.

      The returned collection is not modifiable.

      Returns:
      A set of URIs
    • addUriToModuleExtractionSignature

      void addUriToModuleExtractionSignature(URI uri)
      Adds the specified URI to the module extraction signature.

      Note that a module including the specified URI will be created when a new resource level transaction is started. When that will be is implementation dependent. However it must be guaranteed that all subsequent connections provided by OntoDriver will include the URI in extracted modules.

      Parameters:
      uri - The URI to add
      Throws:
      NullPointerException - If uri is null