|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectau.org.intersect.exsite9.service.SchemaService
public final class SchemaService
Handles working with Metadata Schemas.
Constructor Summary | |
---|---|
SchemaService(java.io.File defaultSchemaDirectory,
java.io.File defaultSchema,
java.io.File metadataSchemaSchema,
javax.persistence.EntityManagerFactory emf,
SchemaDAOFactory schemaDAOFactory,
MetadataCategoryDAOFactory metadataCategoryDAOFactory,
MetadataAttributeDAOFactory metadataAttributeDAOFactory)
|
Method Summary | |
---|---|
void |
addMetadataCategoryToSchema(Schema schema,
MetadataCategory metadataCategory)
Adds a metadata category to a schema. |
void |
createImportedSchema(Schema schema)
Persists an Imported Schema |
Schema |
createLocalSchema(java.lang.String schemaName,
java.lang.String schemaDescription,
java.lang.String schemaNamespaceURL)
Creates a new Local Schema |
java.io.File |
getDefaultSchema()
Obtains the default Schema. |
java.io.File |
getDefaultSchemaDirectory()
Obtains the default directory on the file system that contains the pre-defined Schemas. |
Schema |
parseSchema(java.io.File xmlFile)
Parses the provides schema XML file to a schema object. |
void |
removeMetadataCategoryFromSchema(Schema schema,
MetadataCategory metadataCategory)
Removes a metadata category from a schema. |
void |
removeSchema(Schema schema)
Removes a schema, its association to a project, and its association to files/groups. |
void |
updateSchema(Schema schema,
java.lang.String schemaName,
java.lang.String schemaDescription,
java.lang.String schemaNamespaceURL)
Updates the details of the provided schema. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SchemaService(java.io.File defaultSchemaDirectory, java.io.File defaultSchema, java.io.File metadataSchemaSchema, javax.persistence.EntityManagerFactory emf, SchemaDAOFactory schemaDAOFactory, MetadataCategoryDAOFactory metadataCategoryDAOFactory, MetadataAttributeDAOFactory metadataAttributeDAOFactory)
defaultSchemaDirectory
- The default directory that metadata schema's will lie in.defaultSchema
- The default metadata schema - loaded by default for new projects.metadataSchemaSchema
- The RELAX-NG format schema, used to validate metadata schemas.emf
- schemaDAOFactory
- Method Detail |
---|
public Schema createLocalSchema(java.lang.String schemaName, java.lang.String schemaDescription, java.lang.String schemaNamespaceURL)
createLocalSchema
in interface ISchemaService
schemaName
- The name of the schema.schemaDescription
- The description of the schema.schemaNamespaceURL
- The namespace URL of the schema.
public void createImportedSchema(Schema schema)
createImportedSchema
in interface ISchemaService
schema
- The schema to persist.public void updateSchema(Schema schema, java.lang.String schemaName, java.lang.String schemaDescription, java.lang.String schemaNamespaceURL)
ISchemaService
updateSchema
in interface ISchemaService
schema
- The schema to update.schemaName
- The new name of the schema.schemaDescription
- The new description of the schema.schemaNamespaceURL
- The new namespace URL of the schema.public void removeSchema(Schema schema)
ISchemaService
removeSchema
in interface ISchemaService
schema
- The schema to delete.public void addMetadataCategoryToSchema(Schema schema, MetadataCategory metadataCategory)
ISchemaService
addMetadataCategoryToSchema
in interface ISchemaService
schema
- The schema.metadataCategory
- The metadata category to add.public void removeMetadataCategoryFromSchema(Schema schema, MetadataCategory metadataCategory)
ISchemaService
removeMetadataCategoryFromSchema
in interface ISchemaService
schema
- The schema.metadataCategory
- The metadata category to remove.public java.io.File getDefaultSchemaDirectory()
ISchemaService
getDefaultSchemaDirectory
in interface ISchemaService
null
if there is no default schema directory.public java.io.File getDefaultSchema()
getDefaultSchema
in interface ISchemaService
public Schema parseSchema(java.io.File xmlFile) throws org.xml.sax.SAXException, java.io.IOException, javax.xml.parsers.ParserConfigurationException, InvalidSchemaException
ISchemaService
parseSchema
in interface ISchemaService
xmlFile
- The XML File to import.
org.xml.sax.SAXException
java.io.IOException
javax.xml.parsers.ParserConfigurationException
InvalidSchemaException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |