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 keys.
|
protected abstract T |
getInstance() |
String[] |
getKeys()
Gets array of available metadata keys.
|
boolean |
isBuiltIn(String key)
Determines whether metadata is built-in.
|
boolean |
isReadOnly(String key)
Determines whether metadata is read-only.
|
PropertyValue |
readPropertyValue(String metadataKey) |
boolean |
remove(String key)
Removes metadata by key.
|
void |
setValueByKey(String metadataKey,
PropertyValue value) |
getByType, getMetadataType, readByStringKey
public final int getCount()
Gets the number of metadata keys.
public String[] getKeys()
Gets array of available metadata keys. Keys related to null values are skipped.
public final PropertyValue readPropertyValue(String metadataKey)
public final void setValueByKey(String metadataKey, PropertyValue value)
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 void clearBuiltInData()
Resets all built-in properties.
public 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 © 2018. All rights reserved.