public abstract class DocumentMetadata<T extends MetadataProperty> extends Metadata
Represents a collection of metadata key/value pairs.
T
: Represents MetadataProperty
.
Modifier and Type | Method and Description |
---|---|
void |
clear()
Removes all metadata values.
|
void |
clearBuiltInData()
Resets all built-in properties.
|
void |
clearCustomData()
Removes all custom metadata values.
|
boolean |
containsKey(String metadataKey)
Determines whether the specified metadata key is presented in collection.
|
MetadataPropertyCollection |
getCollection() |
int |
getCount()
Gets the number of metadata properties.
|
protected abstract T |
getInstance() |
boolean |
isBuiltIn(String key)
Determines whether metadata is built-in.
|
boolean |
isReadOnly(String key)
Determines whether metadata is read-only.
|
PropertyValue |
readPropertyValue(String propertyName)
Reads the value of the property with the specified name.
|
boolean |
remove(String key)
Removes metadata by key.
|
void |
setValueByKey(String propertyName,
PropertyValue value)
Sets the value of the property with the specified name.
|
getByType, getKeys, getMetadataType, iterator, readByStringKey
public final int getCount()
Gets the number of metadata properties.
public final PropertyValue readPropertyValue(String propertyName)
Reads the value of the property with the specified name.
propertyName
- The property name.public final void setValueByKey(String propertyName, PropertyValue value)
Sets the value of the property with the specified name.
propertyName
- The name of the property.value
- The value to set.public boolean remove(String key)
Removes metadata by key.
key
- Metadata key.public boolean containsKey(String metadataKey)
Determines whether the specified metadata key is presented in collection.
metadataKey
- Metadata key.public void clear()
Removes all metadata values.
public final void clearBuiltInData()
Resets all built-in properties.
public final void clearCustomData()
Removes all custom metadata values.
public boolean isBuiltIn(String key)
Determines whether metadata is built-in.
key
- Metadata key.public boolean isReadOnly(String key)
Determines whether metadata is read-only.
key
- Metadata key.public final MetadataPropertyCollection getCollection()
protected abstract T getInstance()
Copyright © 2019. All rights reserved.