|
|||||||||
| Home >> All >> org >> acs >> damsel >> srvr >> [ schema overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.acs.damsel.srvr.schema
Class SchemaMgr

java.lang.Objectorg.acs.damsel.srvr.schema.SchemaMgr
- All Implemented Interfaces:
- java.io.Serializable
- public class SchemaMgr
- extends java.lang.Object
- implements java.io.Serializable
- extends java.lang.Object
Title: SchemaMgr
Description: The SchemaMgr class provides access to metadata Schemas, which in turn contain MetaDataTags and their associated information (i.e., controlled vocabulary lists). Aside from adding, removing, and getting handles on Schemas, SchemaMgr also provides easy access to a Vector of Strings containing the names of the available Schemas (i.e., for display purposes). SchemaMgr (as well as Schema and MetaDataTag) supports serialization and the current state of all Schemas can easily be stored and loaded using the save() and newSchemaMgrFromFile() methods. Note that newSchemaMgrFromFile should be used instead of the constructor, unless the schema file does not exist yet.
- Version:
- 1.0
| Field Summary | |
private org.acs.damsel.srvr.db.AssetDB |
assetDB
|
private static org.apache.log4j.Logger |
log
|
| Constructor Summary | |
SchemaMgr()
Default constructor. |
|
| Method Summary | |
int |
addSchema(Schema sch)
Method adds a Schema to the schema list. |
int |
addSchemaTag(MetaDataTag tag,
java.lang.String schemaName)
Method adds a metadata tag to the schema specified by the schema name String. |
void |
deleteSchema(java.lang.String schName)
Method removes the Schema with the given name from the schema list. |
int |
deleteSchemaTag(MetaDataTag tag,
java.lang.String schemaName)
Method deletes the metadata tag from the schema specified by the schema name. |
java.util.Vector |
getAllMetadataTags()
Obtain all the metadata tags used in the schematagstable |
java.util.Vector |
getCollectionsWithSchema(java.lang.String schemaName)
Method returns a vector of strings containing all of the collections with schemas called schemaName. |
java.util.Vector |
getEditableSchemas(org.acs.damsel.srvr.user.User user)
Returns a vector of strings containing the names of the schemas that can be edited by the user. |
Schema |
getSchema(java.lang.String schName)
Method returns the Schema with the given name. |
Schema |
getSchemaOfCollection(java.lang.String collName)
Method returns the schema corresponding to the specified collection. |
java.util.Vector |
schemaNames()
Returns list of schema names found in database. |
int |
updateSchema(Schema s)
Updates the entry for the specified schema in the SchemaTable of the database. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
log
private static org.apache.log4j.Logger log
assetDB
private org.acs.damsel.srvr.db.AssetDB assetDB
| Constructor Detail |
SchemaMgr
public SchemaMgr()
- Default constructor. Initializes an empty schema list.
| Method Detail |
addSchema
public int addSchema(Schema sch) throws java.sql.SQLException
- Method adds a Schema to the schema list.
getAllMetadataTags
public java.util.Vector getAllMetadataTags()
- Obtain all the metadata tags used in the schematagstable
addSchemaTag
public int addSchemaTag(MetaDataTag tag, java.lang.String schemaName) throws java.sql.SQLException
- Method adds a metadata tag to the schema specified by the schema name
String.
deleteSchemaTag
public int deleteSchemaTag(MetaDataTag tag, java.lang.String schemaName) throws java.sql.SQLException
- Method deletes the metadata tag from the schema specified by the schema name.
deleteSchema
public void deleteSchema(java.lang.String schName) throws SchemaMgrException
- Method removes the Schema with the given name from the schema list.
A SchemaMgrException is thrown if no such Schema is in the schema list.
getSchema
public Schema getSchema(java.lang.String schName) throws SchemaMgrException
- Method returns the Schema with the given name. A SchemaMgrException is
thrown if no such Schema is in the schema list.
getSchemaOfCollection
public Schema getSchemaOfCollection(java.lang.String collName) throws SchemaMgrException
- Method returns the schema corresponding to the specified collection.
getCollectionsWithSchema
public java.util.Vector getCollectionsWithSchema(java.lang.String schemaName) throws java.sql.SQLException
- Method returns a vector of strings containing all of the collections
with schemas called schemaName.
schemaNames
public java.util.Vector schemaNames()
- Returns list of schema names found in database.
getEditableSchemas
public java.util.Vector getEditableSchemas(org.acs.damsel.srvr.user.User user)
- Returns a vector of strings containing the names of the schemas that can
be edited by the user.
updateSchema
public int updateSchema(Schema s)
- Updates the entry for the specified schema in the SchemaTable of the
database.
|
|||||||||
| Home >> All >> org >> acs >> damsel >> srvr >> [ schema overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.acs.damsel.srvr.schema.SchemaMgr