Package org.mycore.datamodel.metadata
Class MCRObjectDerivate
java.lang.Object
org.mycore.datamodel.metadata.MCRObjectDerivate
This class implements all methode for handling one derivate data.
- Version:
- $Revision$ $Date: 2008-02-06 18:27:24 +0100 (Mi, 06. Feb 2008) $
- Author:
- Jens Kupferschmidt
-
Constructor Summary
ConstructorDescriptionMCRObjectDerivate
(MCRObjectID derivateID) This is the constructor of the MCRObjectDerivate class.MCRObjectDerivate
(MCRObjectID derivateID, Element derivate) -
Method Summary
Modifier and TypeMethodDescriptionfinal Element
This methode create a XML stream for all derivate data.boolean
deleteFileMetaData
(String path) Deletes file metadata of file idendified by absolute path.final MCRMetaLink
getExternal
(int index) This method get a single link from the external list as a MCRMetaLink.final int
This method return the size of the external array.final MCRMetaIFS
This method get a single data from the internal list as a MCRMetaIFS.returns link to the MCRObject.final MCRFileMetadata
getOrCreateFileMetadata
(MCRPath file, String urn) getOrCreateFileMetadata
(MCRPath file, String urn, String handle) final MCRMetaLangText
getTitle
(int index) This method get a single text from the titles list as a MCRMetaLangText.final int
This method return the size of the title array.getURN()
final boolean
isValid()
This method check the validation of the content of this class.void
Removes file metadata (urn information) from theMCRObjectDerivate
final void
setInternals
(MCRMetaIFS ifs) This method set the metadata internals (the IFS data)final void
setLinkMeta
(MCRMetaLinkID link) This method set the metadata linkvoid
void
validate()
Validates this MCRObjectDerivate.
-
Constructor Details
-
MCRObjectDerivate
This is the constructor of the MCRObjectDerivate class. All data are set to null. -
MCRObjectDerivate
-
-
Method Details
-
getMetaLink
returns link to the MCRObject.- Returns:
- a metadata link as MCRMetaLinkID
-
setLinkMeta
This method set the metadata link- Parameters:
link
- the MCRMetaLinkID object
-
getExternalSize
public final int getExternalSize()This method return the size of the external array. -
getExternal
This method get a single link from the external list as a MCRMetaLink.- Returns:
- a external link as MCRMetaLink
- Throws:
IndexOutOfBoundsException
- throw this exception, if the index is false
-
getTitleSize
public final int getTitleSize()This method return the size of the title array. -
getTitle
This method get a single text from the titles list as a MCRMetaLangText.- Returns:
- a title text as MCRMetaLangText
- Throws:
IndexOutOfBoundsException
- throw this exception, if the index is false
-
getInternals
This method get a single data from the internal list as a MCRMetaIFS.- Returns:
- a internal data as MCRMetaIFS
-
getOrCreateFileMetadata
- Parameters:
file
- the file to addurn
- the urn of the file, if already known, if not provide null- Throws:
NullPointerException
- if first argument is null
-
getOrCreateFileMetadata
-
getOrCreateFileMetadata
-
getOrCreateFileMetadata
-
getFileMetadata
-
removeFileMetadata
public void removeFileMetadata()Removes file metadata (urn information) from theMCRObjectDerivate
-
deleteFileMetaData
Deletes file metadata of file idendified by absolute path.- Parameters:
path
- absolute path of this node starting with a '/'- Returns:
- true if metadata was deleted and false if file has no metadata.
-
setInternals
This method set the metadata internals (the IFS data)- Parameters:
ifs
- the MCRMetaIFS object
-
createXML
This methode create a XML stream for all derivate data.- Returns:
- a JDOM Element with the XML data of the structure data part
- Throws:
MCRException
- if the content of this class is not valid
-
isValid
public final boolean isValid()This method check the validation of the content of this class. The method returns true if
- the linkmeta exist and the XLink type of linkmeta is not "arc"
- no information in the external AND internal tags
- Returns:
- a boolean value
-
validate
Validates this MCRObjectDerivate. This method throws an exception if:- the linkmeta is null
- the linkmeta xlink:type is not 'locator'
- the internals and the externals are empty
- Throws:
MCRException
- the MCRObjectDerivate is invalid
-
setURN
-
getURN
-
getClassifications
-
getTitles
-