Class DefaultSchemaManager
- java.lang.Object
-
- com.complexible.stardog.api.reasoning.DefaultSchemaManager
-
- All Implemented Interfaces:
SchemaManager
public class DefaultSchemaManager extends java.lang.Object implements SchemaManager
- Author:
- Evren Sirin
-
-
Constructor Summary
Constructors Constructor Description DefaultSchemaManager(Connection theConnection)
-
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.
-
-
-
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 thedefault schema
.- Specified by:
getSchemas
in interfaceSchemaManager
- 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 interfaceSchemaManager
- 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. Thedefault 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 interfaceSchemaManager
- 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 interfaceSchemaManager
- Parameters:
theSchema
- schema nametheSchemaGraphs
- set of named graphs
-
-