public interface MetadataManager
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
METADATA_NAMESPACE |
Modifier and Type | Method and Description |
---|---|
void |
addDefinition(DynClass definition)
Adds a new definition in the metadata manager.
|
DynStruct |
addDefinition(java.lang.String name,
java.io.InputStream stream,
java.lang.ClassLoader loader)
Adds a new definition in the metadata manager.
|
DynStruct |
addDefinition(java.lang.String name,
java.lang.String description)
Adds a new definition in the metadata manager.
|
MetadataContainer |
createMetadataContainer(java.lang.String name)
This is a utility interface to implement classes that implement the
interface Metadata.
|
DynStruct |
getDefinition(Metadata metadata)
If a Metadata definition (
DynStruct ) with a given metadata that
has been previously registered in this manager, then this method returns
that definition. |
DynStruct |
getDefinition(java.lang.String definitionName)
If a Metadata definition (
DynStruct ) with the given definition
name has been previously registered in this manager, then this method
returns that definition. |
java.util.Iterator |
getDefinitions()
Retrieves all the current definitions in the form of an Iterator
interface.
|
Metadata |
getMetadata(DynStruct dynStruct)
|
Metadata |
getMetadata(java.lang.String metadataID)
Retrieves a metadata object based on its metadata ID.
|
java.io.File |
getMetadataHomeRepository()
Returns the main Metadata extension root repository.
|
boolean |
getValidationBeforeExporting()
Added options properties getter for validating before the exporting
function.
|
boolean |
getValidationBeforeSaving()
Added options properties getter for validating before the saving
function.
|
void |
loadMetadata(Metadata metadata)
This function populates the given Metadata object with the current values
that the system contains.
|
void |
removeDefinition(DynStruct dynStruct)
If the current dynStruct has been previously registered, it is removed
from both the dynObjectManager and the metadataManager lists.
|
void |
setMetadataHomeRepository(java.io.File metadataHomeRepository)
Sets the main Metadata root repository for this manager.
|
void |
setValidationBeforeExporting(boolean doValidation)
Added options properties setter for validating before the exporting
function.
|
void |
setValidationBeforeSaving(boolean doValidation)
Added options properties setter for validating before the saving
function.
|
void |
storeMetadata(Metadata metadata)
This function stores the given Metadata object to an output resource, be
it a database or a file containing its information.
|
static final java.lang.String METADATA_NAMESPACE
DynStruct addDefinition(java.lang.String name, java.lang.String description) throws MetadataException
name
- the definition Namedescription
- the definition DescriptionMetadataException
void addDefinition(DynClass definition) throws MetadataException
dynClass
- the new definitionMetadataException
DynStruct addDefinition(java.lang.String name, java.io.InputStream stream, java.lang.ClassLoader loader) throws MetadataException
name
- the definition Namestream
- the input stream to be parsed.loader
- the Class loader that can parse this input streamMetadataException
DynStruct getDefinition(java.lang.String definitionName)
If a Metadata definition ( DynStruct
) with the given definition
name has been previously registered in this manager, then this method
returns that definition. Otherwise, it returns null.
definitionName
- the name whose corresponding attribute definition is to be
retrieved.java.util.Iterator getDefinitions()
Retrieves all the current definitions in the form of an Iterator interface.
DynStruct getDefinition(Metadata metadata) throws MetadataException
If a Metadata definition ( DynStruct
) with a given metadata that
has been previously registered in this manager, then this method returns
that definition. Otherwise, it returns null.
metadata
- the given metadata.MetadataException
void removeDefinition(DynStruct dynStruct)
dynStruct
- the dynStruct to be removed.Metadata getMetadata(DynStruct dynStruct) throws InvalidMetadataNamespaceException
Metadata
instance based on a given
DynStruct
, if it has not been previously registered, and adds
this Metadata to the system.dynStruct
- the given dynStruct object.InvalidMetadataNamespaceException
void loadMetadata(Metadata metadata) throws MetadataException
metadata
- the metadata that needs to be populated.MetadataException
- Exception caused by any access violation.void storeMetadata(Metadata metadata) throws MetadataException
metadata
- the metadata that needs to be stored.MetadataException
- Exception caused by any access violation.MetadataContainer createMetadataContainer(java.lang.String name)
name
- the DynStruct name.java.io.File getMetadataHomeRepository()
void setMetadataHomeRepository(java.io.File metadataHomeRepository)
metadataHomeRepository
- the main Repository folder.Metadata getMetadata(java.lang.String metadataID) throws InvalidMetadataNamespaceException
metadataID
- the metadata ID of the metadata object.InvalidMetadataNamespaceException
- if the metadataID was not previously registered as Metadata.void setValidationBeforeSaving(boolean doValidation)
doValidation
- if the validation must be performed or not before saving metadata objects.boolean getValidationBeforeSaving()
void setValidationBeforeExporting(boolean doValidation)
doValidation
- if the validation must be performed or not before saving metadata objects.boolean getValidationBeforeExporting()