Class DefaultSchemaManager

  • All Implemented Interfaces:
    SchemaManager

    public class DefaultSchemaManager
    extends java.lang.Object
    implements SchemaManager
    Author:
    Evren Sirin
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Set<IRI> getSchemaGraphs​(java.lang.String theSchema)
      Returns the named graphs associated with the given schema.
      java.util.Set<java.lang.String> getSchemas()
      Returns the names of schemas defined for the database.
      void removeSchema​(java.lang.String theSchema)
      Removes the given schema from the database.
      void setSchemaGraphs​(java.lang.String theSchema, java.util.Set<IRI> theSchemaGraphs)
      Associates a schema with a set of named graphs.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultSchemaManager

        public DefaultSchemaManager​(Connection theConnection)
    • Method Detail

      • getSchemas

        public java.util.Set<java.lang.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 java.util.Set<IRI> getSchemaGraphs​(java.lang.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​(java.lang.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​(java.lang.String theSchema,
                                    java.util.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