D
- data type of the metadata. This defines the type of value that
the property can contain, which is available through getKey()
.public interface Metadata<D>
Metadata
should be done using Schema
.Modifier and Type | Interface and Description |
---|---|
static interface |
Metadata.VirtualValue
Defines a virtual value.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
generateValue(Element element,
ElementMetadata<?,?> metadata)
Generate the value of this property on the given element.
|
MetadataContext |
getContext()
Returns the metadata context that this metadata was created for, or
null if this metadata is not part of a context. |
MetadataKey<D> |
getKey()
Returns the attribute key for this metadata.
|
QName |
getName()
Returns the qualified name of the property, used during parsing and
generation.
|
ElementKey<?,?> |
getParent()
Returns the parent of this metadata instance, or
null if this
metadata does not take the parent key into account. |
Schema |
getSchema()
Returns the
Schema that this metadata is a part of. |
boolean |
isRequired()
Returns true if this property is required.
|
boolean |
isVisible()
Returns true if this property is visible.
|
void |
parseValue(Element element,
ElementMetadata<?,?> metadata,
java.lang.Object value)
Parses the value of this property into the given element.
|
MetadataKey<D> getKey()
ElementKey<?,?> getParent()
null
if this
metadata does not take the parent key into account.MetadataContext getContext()
null
if this metadata is not part of a context.QName getName()
boolean isRequired()
boolean isVisible()
java.lang.Object generateValue(Element element, ElementMetadata<?,?> metadata)
void parseValue(Element element, ElementMetadata<?,?> metadata, java.lang.Object value) throws ParseException
ParseException
- if parsing fails.