Class MetaData
- java.lang.Object
-
- de.ipk_gatersleben.bit.bi.edal.primary_data.metadata.MetaData
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
- Direct Known Subclasses:
MetaDataImplementation
public class MetaData extends java.lang.Object implements java.lang.Cloneable, java.io.Serializable
Basic meta data comprising at least dublin core administrative meta data. Objects of this class can only be instantiated by callingImplementationProvider.createMetaDataInstance()
m which is implemented by the particular eDAL implementation e.g. Instance MetaData or an extended subclass is not supported- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static UntypedData
DIRECTORY
constant for directory meta data valuesstatic java.util.EnumMap<EnumDublinCoreElements,java.util.List<java.lang.Class<? extends UntypedData>>>
ELEMENT_TYPE_MAP
static UntypedData
EMPTY
constant for empty meta data valuesprotected java.util.EnumMap<? super EnumDublinCoreElements,UntypedData>
metaDataValues
the store of all supported dublin core meta datastatic UntypedData
UNKNOWN
constant for unknown meta data valuesprotected static java.lang.String
UNKNOWN_STRING
-
Constructor Summary
Constructors Modifier Constructor Description protected
MetaData()
Construct empty MetaDataValues and initialize with default MetaDataTypes
-
Method Summary
Modifier and Type Method Description MetaData
clone()
Clone theMetaData
object.boolean
equals(java.lang.Object object)
<T extends UntypedData>
TgetElementValue(java.lang.Enum<? extends EnumDublinCoreElements> element)
Getter for a value of an element of theMetaData
object.int
hashCode()
void
setElementValue(EnumDublinCoreElements key, UntypedData value)
Modify the value of a meta data elementjava.lang.String
toString()
-
-
-
Field Detail
-
UNKNOWN_STRING
protected static final java.lang.String UNKNOWN_STRING
- See Also:
- Constant Field Values
-
ELEMENT_TYPE_MAP
public static final java.util.EnumMap<EnumDublinCoreElements,java.util.List<java.lang.Class<? extends UntypedData>>> ELEMENT_TYPE_MAP
-
EMPTY
public static final UntypedData EMPTY
constant for empty meta data values
-
UNKNOWN
public static final UntypedData UNKNOWN
constant for unknown meta data values
-
DIRECTORY
public static final UntypedData DIRECTORY
constant for directory meta data values
-
metaDataValues
protected java.util.EnumMap<? super EnumDublinCoreElements,UntypedData> metaDataValues
the store of all supported dublin core meta data
-
-
Method Detail
-
clone
public MetaData clone() throws java.lang.CloneNotSupportedException
Clone theMetaData
object.- Overrides:
clone
in classjava.lang.Object
- Returns:
- the cloned
MetaData
object. - Throws:
java.lang.CloneNotSupportedException
- if unable to clone.
-
equals
public boolean equals(java.lang.Object object)
- Overrides:
equals
in classjava.lang.Object
-
getElementValue
public <T extends UntypedData> T getElementValue(java.lang.Enum<? extends EnumDublinCoreElements> element) throws MetaDataException
Getter for a value of an element of theMetaData
object.- Type Parameters:
T
- theUntypedData
type- Parameters:
element
- the element asEnumDublinCoreElements
enum.- Returns:
- the value of a meta data element.
- Throws:
MetaDataException
- if unable to load a value.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
setElementValue
public void setElementValue(EnumDublinCoreElements key, UntypedData value) throws MetaDataException
Modify the value of a meta data element- Parameters:
key
- the element to set.value
- the new value for the element.- Throws:
MetaDataException
- if unable to set meta data element.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-