Package org.mycore.mods
Class MCRMODSWrapper
java.lang.Object
org.mycore.mods.MCRMODSWrapper
- Author:
- Frank Lützenkirchen, Thomas Scheffler
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddElement
(String elementName) void
addElement
(Element element) getElement
(String xPath) getElements
(String xPath) getElementValue
(String xPath) getMODS()
getServiceFlag
(String type) static boolean
isSupported
(MCRObject obj) returns true if the given MCRObject can handle MODS metadatastatic boolean
Returns true of the givenMCRObjectID
has a mods type.void
removeElements
(String xPath) void
setElement
(String elementName, String elementValue) setElement
(String elementName, String attributeName, String attributeValue, String elementValue) Sets or adds an element with target name and value.void
void
setServiceFlag
(String type, String value) static MCRObject
wrapMODSDocument
(Element modsDefinition, String projectID)
-
Field Details
-
MODS_OBJECT_TYPE
-
-
Constructor Details
-
MCRMODSWrapper
public MCRMODSWrapper() -
MCRMODSWrapper
-
-
Method Details
-
wrapMODSDocument
-
isSupported
returns true if the given MCRObject can handle MODS metadata- Parameters:
obj
- - the MCRObject- Returns:
- true, if mods is supported
-
isSupported
Returns true of the givenMCRObjectID
has a mods type. Does not look at the object.- Parameters:
id
- - theMCRObjectID
- Returns:
- true if has a mods type
-
getMODS
- Returns:
- the mods:mods Element at /metadata/def.modsContainer/modsContainer
-
getMCRObject
-
setID
-
setMODS
-
getElement
-
getElements
-
getLinkedRelatedItems
-
getElementValue
-
setElement
public Optional<Element> setElement(String elementName, String elementValue, Map<String, String> attributes) Sets or adds an element with target name and value. The element name and attributes are used as xpath expression to filter for an element. The attributes are used with and operation if present. -
setElement
-
setElement
-
addElement
-
addElement
-
removeElements
-
removeInheritedMetadata
public void removeInheritedMetadata() -
getServiceFlag
-
setServiceFlag
-
getMcrCategoryIDs
-