Class MetaDataObject
- java.lang.Object
-
- de.unirostock.sems.cbarchive.meta.MetaDataObject
-
- Direct Known Subclasses:
DefaultMetaDataObject
,OmexMetaDataObject
public abstract class MetaDataObject extends Object
The abstract Class MetaDataObject representing some meta data.- Author:
- Martin Scharm
-
-
Field Summary
Fields Modifier and Type Field Description protected MetaDataHolder
about
The entry this is all about.protected org.jdom2.Element
description
The description.protected String
fragmentIdentifier
The fragment identifier.
-
Constructor Summary
Constructors Constructor Description MetaDataObject(org.jdom2.Element describingElement)
Instantiates a new meta data object.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract MetaDataObject
clone()
boolean
equals(Object obj)
boolean
equalsPathNoMatter(MetaDataObject otherMeta)
Checks if two meta data objects are equal, but it neglects the paths to the meta data holder.String
getAbout()
Gets the about.org.jdom2.Element
getXmlDescription()
Get the XML description ofgetAbout()
.abstract void
injectDescription(org.jdom2.Element parent)
Inject the description intoparent
.void
setAbout(MetaDataHolder about)
Sets the about.void
setAbout(MetaDataHolder about, String fragmentIdentifier)
Sets the about.
-
-
-
Field Detail
-
about
protected MetaDataHolder about
The entry this is all about.
-
fragmentIdentifier
protected String fragmentIdentifier
The fragment identifier.
-
description
protected org.jdom2.Element description
The description.
-
-
Method Detail
-
setAbout
public void setAbout(MetaDataHolder about)
Sets the about.- Parameters:
about
- the path to the entity described by this object
-
setAbout
public void setAbout(MetaDataHolder about, String fragmentIdentifier)
Sets the about.- Parameters:
about
- the path to the entity described by this objectfragmentIdentifier
- the fragment identifier pointing intoabout
-
getAbout
public String getAbout()
Gets the about.- Returns:
- the path to the entity described by this object
-
injectDescription
public abstract void injectDescription(org.jdom2.Element parent)
Inject the description intoparent
.- Parameters:
parent
- the parent element that will host the description
-
getXmlDescription
public org.jdom2.Element getXmlDescription()
Get the XML description ofgetAbout()
.- Returns:
- the XML subtree rooting the description
-
equalsPathNoMatter
public boolean equalsPathNoMatter(MetaDataObject otherMeta)
Checks if two meta data objects are equal, but it neglects the paths to the meta data holder. Thus, it just checks the fragment identifier and the actual meta data- Parameters:
otherMeta
- the other meta data object- Returns:
- true, if both objects are equal w/o respect to the path
-
clone
public abstract MetaDataObject clone()
-
-