Package org.mycore.datamodel.metadata
Interface MCRMetaInterface
- All Superinterfaces:
Cloneable
- All Known Implementing Classes:
MCREditableMetaEnrichedLinkID
,MCRMetaAccessRule
,MCRMetaAddress
,MCRMetaBoolean
,MCRMetaClassification
,MCRMetaDateLangText
,MCRMetaDefault
,MCRMetaDerivateLink
,MCRMetaEnrichedLinkID
,MCRMetaHistoryDate
,MCRMetaIFS
,MCRMetaInstitutionName
,MCRMetaISO8601Date
,MCRMetaLangText
,MCRMetaLink
,MCRMetaLinkID
,MCRMetaNumber
,MCRMetaPersonName
,MCRMetaSpatial
,MCRMetaXML
This interface is designed to to have a general description of the common
method set of all metadata classes.
- Version:
- $Revision$ $Date$
- Author:
- Jens Kupferschmidt
-
Method Summary
Modifier and TypeMethodDescriptionclone()
This method make a clone of this class.com.google.gson.JsonObject
This method creates a JSON representation of the metadata part.This method create a XML stream for a metadata part.void
debug()
This method put debug data to the logger (for the debug mode).void
This method decrements the inherited value with 1.int
This method get the inherited element.getLang()
This method get the language element.This method get the subtag element.getType()
This method get the type element.void
This method increments the inherited value with 1.boolean
isValid()
This method check the validation of the content of this class.void
setFromDOM
(Element element) This method read the XML input stream part from a DOM part for the metadata of the document.void
setInherited
(int value) This method set the inherited level.void
This methode set the default language to the class.void
This method set the subtag element.void
This method set the type element.void
validate()
Validates the content of this class.
-
Method Details
-
getInherited
int getInherited()This method get the inherited element.- Returns:
- the inherited flag as int
-
getLang
String getLang()This method get the language element.- Returns:
- the language
-
getSubTag
String getSubTag()This method get the subtag element.- Returns:
- the subtag
-
getType
String getType()This method get the type element.- Returns:
- the type
-
setInherited
void setInherited(int value) This method set the inherited level. This can be 0 or an integer higher 0.- Parameters:
value
- the inherited level value, if it is < 0, 0 is set
-
incrementInherited
void incrementInherited()This method increments the inherited value with 1. -
decrementInherited
void decrementInherited()This method decrements the inherited value with 1. -
setLang
This methode set the default language to the class.- Parameters:
lang
- the language
-
setSubTag
This method set the subtag element. If the value of subtag is null or empty an exception is throwed.- Parameters:
subtag
- the subtag- Throws:
MCRException
- if the subtag value is null or empty
-
setType
This method set the type element. If the value of type is null or empty nothing was changed.- Parameters:
type
- the optional type
-
setFromDOM
This method read the XML input stream part from a DOM part for the metadata of the document.- Parameters:
element
- a relevant JDOM element for the metadata
-
createXML
This method create a XML stream for a metadata part.- Returns:
- a JDOM Element with the XML data of the metadata part
- Throws:
MCRException
- if the content of this class is not valid
-
createJSON
com.google.gson.JsonObject createJSON()This method creates a JSON representation of the metadata part.- Returns:
- a GSON object containing the json data of the metadata part
-
isValid
boolean isValid()This method check the validation of the content of this class.- Returns:
- a boolean value
-
validate
Validates the content of this class.- Throws:
MCRException
- the content is invalid
-
clone
MCRMetaInterface clone()This method make a clone of this class. -
debug
void debug()This method put debug data to the logger (for the debug mode).
-