Class DefaultSchemaManager

java.lang.Object
com.complexible.stardog.api.reasoning.DefaultSchemaManager
All Implemented Interfaces:
SchemaManager

public class DefaultSchemaManager extends Object implements SchemaManager
Author:
Evren Sirin
  • Constructor Details

    • DefaultSchemaManager

      public DefaultSchemaManager(Connection theConnection)
    • DefaultSchemaManager

      public DefaultSchemaManager(AdminConnection theAdminConnection, String theDb)
  • Method Details

    • getSchemas

      public Set<String> getSchemas()
      Description copied from interface: SchemaManager
      Returns the names of schemas defined for the database. The returned set will always contain the default schema.
      Specified by:
      getSchemas in interface SchemaManager
      Returns:
      unmodifiable set of schema names
    • getSchemaGraphs

      public Set<IRI> getSchemaGraphs(String theSchema)
      Description copied from interface: SchemaManager
      Returns the named graphs associated with the given schema.
      Specified by:
      getSchemaGraphs in interface SchemaManager
      Parameters:
      theSchema - schema name
      Returns:
      unmodifiable set of named graphs
    • removeSchema

      public void removeSchema(String theSchema)
      Description copied from interface: SchemaManager
      Removes the given schema from the database. The default schema cannot be removed but calling this function will cause it to be associated with an empty set of named graphs so the default schema will become empty. If the schema does not exist no error will be raised.
      Specified by:
      removeSchema in interface SchemaManager
      Parameters:
      theSchema - scheme name
    • setSchemaGraphs

      public void setSchemaGraphs(String theSchema, Set<IRI> theSchemaGraphs)
      Description copied from interface: SchemaManager
      Associates a schema with a set of named graphs. If the set is empty then the schema will be removed except for the default schema that will always exist even with empty set of named graph association. If the schema already existed associated graphs will be replaced with the given graphs. New schemas will be added with the given graphs.
      Specified by:
      setSchemaGraphs in interface SchemaManager
      Parameters:
      theSchema - schema name
      theSchemaGraphs - set of named graphs