Interface SchemaManager
- All Known Implementing Classes:
DefaultSchemaManager
public interface SchemaManager
Convenience class to manage reasoning schemas for a database. Named graphs for the default schema are defined by the
ReasoningOptions.SCHEMA_GRAPHS option whereas the named graphs for named schemas are defined by the ReasoningOptions.SCHEMAS option.
Instead of dealing with these configuration options directly this class can be used to add, update or remove schemas.- Author:
- Evren Sirin
-
Method Summary
Modifier and TypeMethodDescriptiongetSchemaGraphs(String theSchema) Returns the named graphs associated with the given schema.Returns the names of schemas defined for the database.voidremoveSchema(String theSchema) Removes the given schema from the database.voidsetSchemaGraphs(String theSchema, Set<IRI> theSchemaGraphs) Associates a schema with a set of named graphs.
-
Method Details
-
getSchemas
Returns the names of schemas defined for the database. The returned set will always contain thedefault schema.- Returns:
- unmodifiable set of schema names
-
getSchemaGraphs
Returns the named graphs associated with the given schema.- Parameters:
theSchema- schema name- Returns:
- unmodifiable set of named graphs
-
removeSchema
Removes the given schema from the database. Thedefault schemacannot 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.- Parameters:
theSchema- scheme name
-
setSchemaGraphs
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.- Parameters:
theSchema- schema nametheSchemaGraphs- set of named graphs
-