Class ContainerHandler

java.lang.Object
cz.cvut.kbss.ontodriver.rdf4j.container.ContainerHandler

public class ContainerHandler extends Object
Handles RDF container access operations.
  • Constructor Details

    • ContainerHandler

      public ContainerHandler(RepoConnection connector, org.eclipse.rdf4j.model.ValueFactory vf)
  • Method Details

    • loadContainer

      public List<Axiom<?>> loadContainer(ContainerDescriptor descriptor) throws Rdf4jDriverException
      Loads the content of a container corresponding to the specified description.

      The container values are returned as a list of axioms where the owner of the container points to the individual values.

      Parameters:
      descriptor - Container description
      Returns:
      List of axioms representing the container's content
      Throws:
      Rdf4jDriverException - If an error accessing the container occurs
    • persistContainer

      public <T> void persistContainer(ContainerValueDescriptor<T> descriptor) throws Rdf4jDriverException
      Creates a new container and fills it with the specified values.
      Type Parameters:
      T - Type of container values
      Parameters:
      descriptor - Container value descriptor
      Throws:
      Rdf4jDriverException - If an error accessing the container occurs
    • updateContainer

      public <T> void updateContainer(ContainerValueDescriptor<T> descriptor) throws Rdf4jDriverException
      Updates the content of an existing container corresponding to the specified descriptor.

      If the descriptor has no value, the container is removed completely.

      Type Parameters:
      T - Value type
      Parameters:
      descriptor - Descriptor with new container values
      Throws:
      Rdf4jDriverException - If an error accessing the container occurs