Class MetaDataHolder
- java.lang.Object
-
- de.unirostock.sems.cbarchive.meta.MetaDataHolder
-
- Direct Known Subclasses:
ArchiveEntry,CombineArchive,MetaDataFile
public abstract class MetaDataHolder extends Object
The Class MetaDataHolder representing objects that may contain meta data.- Author:
- Martin Scharm
-
-
Field Summary
Fields Modifier and Type Field Description protected List<MetaDataObject>descriptionsThe descriptions about the entity.
-
Constructor Summary
Constructors Constructor Description MetaDataHolder()Instantiates a new MetaDataHolder.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddDescription(MetaDataObject description)Adds another meta object describing this entry.voidaddDescription(String fragmentIdentifier, MetaDataObject description)Adds another meta object describing this entry.List<MetaDataObject>getDescriptions()Gets theMetaDataObjectsdescribing this entity.abstract StringgetEntityPath()Gets the path to this entity.booleanremoveDescription(MetaDataObject toDelete)Removes a certain description of this entity.
-
-
-
Field Detail
-
descriptions
protected List<MetaDataObject> descriptions
The descriptions about the entity.
-
-
Method Detail
-
getEntityPath
public abstract String getEntityPath()
Gets the path to this entity.- Returns:
- the file path
-
getDescriptions
public List<MetaDataObject> getDescriptions()
Gets theMetaDataObjectsdescribing this entity.The returned list can contain any number of
MetaDataObjects, but might as well be empty.- Returns:
- the descriptions
-
removeDescription
public boolean removeDescription(MetaDataObject toDelete)
Removes a certain description of this entity.- Parameters:
toDelete- the meta data object to delete- Returns:
- true, if successful
-
addDescription
public void addDescription(String fragmentIdentifier, MetaDataObject description)
Adds another meta object describing this entry.- Parameters:
fragmentIdentifier- the fragment identifier pointing into this entrydescription- the new description
-
addDescription
public void addDescription(MetaDataObject description)
Adds another meta object describing this entry.- Parameters:
description- the new description
-
-