A - Defines the type of the metadata valuepublic class MetadataField<A> extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
MetadataField.JsonType |
static class |
MetadataField.Type
Possible types for the metadata field.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
CONFIG_COLLECTION_ID_KEY
Keys for the different values in the configuration file
|
static String |
CONFIG_DELIMITER_KEY |
static String |
CONFIG_INPUT_ID_KEY |
static String |
CONFIG_LABEL_KEY |
static String |
CONFIG_LIST_PROVIDER_KEY |
static String |
CONFIG_NAMESPACE_KEY |
static String |
CONFIG_ORDER_KEY |
static String |
CONFIG_OUTPUT_ID_KEY |
static String |
CONFIG_PATTERN_KEY |
static String |
CONFIG_PROPERTY_PREFIX |
static String |
CONFIG_READ_ONLY_KEY |
static String |
CONFIG_REQUIRED_KEY |
static String |
CONFIG_TYPE_KEY |
protected static String |
JSON_KEY_COLLECTION |
protected static String |
JSON_KEY_DELIMITER |
protected static String |
JSON_KEY_ID |
protected static String |
JSON_KEY_LABEL |
protected static String |
JSON_KEY_READONLY |
protected static String |
JSON_KEY_REQUIRED |
protected static String |
JSON_KEY_TRANSLATABLE |
protected static String |
JSON_KEY_TYPE |
protected static String |
JSON_KEY_VALUE |
static String |
PATTERN_DURATION |
| Constructor and Description |
|---|
MetadataField(MetadataField<A> other)
Copy constructor
|
| Modifier and Type | Method and Description |
|---|---|
static MetadataField<?> |
copyMetadataFieldWithValue(MetadataField<?> oldField,
String value)
Creates a copy of a
MetadataField and sets the value based upon a string. |
static MetadataField<Boolean> |
createBooleanMetadata(String inputID,
com.entwinemedia.fn.data.Opt<String> outputID,
String label,
boolean readOnly,
boolean required,
com.entwinemedia.fn.data.Opt<Integer> order,
com.entwinemedia.fn.data.Opt<String> namespace)
Create a metadata field based on a
Boolean. |
static MetadataField<Date> |
createDateMetadata(String inputID,
com.entwinemedia.fn.data.Opt<String> outputID,
String label,
boolean readOnly,
boolean required,
String pattern,
com.entwinemedia.fn.data.Opt<Integer> order,
com.entwinemedia.fn.data.Opt<String> namespace)
Create a metadata field based on a
Date. |
static MetadataField<String> |
createDurationMetadataField(String inputID,
com.entwinemedia.fn.data.Opt<String> outputID,
String label,
boolean readOnly,
boolean required,
com.entwinemedia.fn.data.Opt<Boolean> isTranslatable,
com.entwinemedia.fn.data.Opt<Map<String,String>> collection,
com.entwinemedia.fn.data.Opt<String> collectionId,
com.entwinemedia.fn.data.Opt<Integer> order,
com.entwinemedia.fn.data.Opt<String> namespace) |
static MetadataField<String> |
createDurationMetadataField(String inputID,
com.entwinemedia.fn.data.Opt<String> outputID,
String label,
boolean readOnly,
boolean required,
com.entwinemedia.fn.data.Opt<Integer> order,
com.entwinemedia.fn.data.Opt<String> namespace) |
static MetadataField<Iterable<String>> |
createIterableStringMetadataField(String inputID,
com.entwinemedia.fn.data.Opt<String> outputID,
String label,
boolean readOnly,
boolean required,
com.entwinemedia.fn.data.Opt<Boolean> isTranslatable,
com.entwinemedia.fn.data.Opt<Map<String,String>> collection,
com.entwinemedia.fn.data.Opt<String> collectionId,
com.entwinemedia.fn.data.Opt<String> delimiter,
com.entwinemedia.fn.data.Opt<Integer> order,
com.entwinemedia.fn.data.Opt<String> namespace)
Create a metadata field of type iterable String
|
static MetadataField<Long> |
createLongMetadataField(String inputID,
com.entwinemedia.fn.data.Opt<String> outputID,
String label,
boolean readOnly,
boolean required,
com.entwinemedia.fn.data.Opt<Boolean> isTranslatable,
com.entwinemedia.fn.data.Opt<Map<String,String>> collection,
com.entwinemedia.fn.data.Opt<String> collectionId,
com.entwinemedia.fn.data.Opt<Integer> order,
com.entwinemedia.fn.data.Opt<String> namespace) |
static MetadataField |
createMetadataField(Map<String,String> configuration) |
static MetadataField |
createMetadataField(String inputID,
com.entwinemedia.fn.data.Opt<String> outputID,
String label,
boolean readOnly,
boolean required,
com.entwinemedia.fn.data.Opt<Boolean> translatable,
MetadataField.Type type,
com.entwinemedia.fn.data.Opt<Map<String,String>> collection,
com.entwinemedia.fn.data.Opt<String> collectionID,
com.entwinemedia.fn.data.Opt<Integer> order,
com.entwinemedia.fn.data.Opt<String> namespace,
com.entwinemedia.fn.data.Opt<String> delimiter,
String pattern) |
static MetadataField<Iterable<String>> |
createMixedIterableStringMetadataField(String inputID,
com.entwinemedia.fn.data.Opt<String> outputID,
String label,
boolean readOnly,
boolean required,
com.entwinemedia.fn.data.Opt<Boolean> isTranslatable,
com.entwinemedia.fn.data.Opt<Map<String,String>> collection,
com.entwinemedia.fn.data.Opt<String> collectionId,
com.entwinemedia.fn.data.Opt<String> delimiter,
com.entwinemedia.fn.data.Opt<Integer> order,
com.entwinemedia.fn.data.Opt<String> namespace)
Create a metadata field of type mixed iterable String
|
static MetadataField<String> |
createOrderedTextMetadataField(String inputID,
com.entwinemedia.fn.data.Opt<String> outputID,
String label,
boolean readOnly,
boolean required,
com.entwinemedia.fn.data.Opt<Boolean> isTranslatable,
com.entwinemedia.fn.data.Opt<Map<String,String>> collection,
com.entwinemedia.fn.data.Opt<String> collectionId,
com.entwinemedia.fn.data.Opt<Integer> order,
com.entwinemedia.fn.data.Opt<String> namespace)
Create a metadata field of type String with a single line in the front end which can be ordered and filtered.
|
static MetadataField<String> |
createTemporalStartDateMetadata(String inputID,
com.entwinemedia.fn.data.Opt<String> outputID,
String label,
boolean readOnly,
boolean required,
String pattern,
com.entwinemedia.fn.data.Opt<Integer> order,
com.entwinemedia.fn.data.Opt<String> namespace) |
static MetadataField<String> |
createTemporalStartTimeMetadata(String inputID,
com.entwinemedia.fn.data.Opt<String> outputID,
String label,
boolean readOnly,
boolean required,
String pattern,
com.entwinemedia.fn.data.Opt<Integer> order,
com.entwinemedia.fn.data.Opt<String> namespace) |
static MetadataField<String> |
createTextLongMetadataField(String inputID,
com.entwinemedia.fn.data.Opt<String> outputID,
String label,
boolean readOnly,
boolean required,
com.entwinemedia.fn.data.Opt<Boolean> isTranslatable,
com.entwinemedia.fn.data.Opt<Map<String,String>> collection,
com.entwinemedia.fn.data.Opt<String> collectionId,
com.entwinemedia.fn.data.Opt<Integer> order,
com.entwinemedia.fn.data.Opt<String> namespace)
Create a metadata field of type String with many lines in the front end.
|
static MetadataField<String> |
createTextMetadataField(String inputID,
com.entwinemedia.fn.data.Opt<String> outputID,
String label,
boolean readOnly,
boolean required,
com.entwinemedia.fn.data.Opt<Boolean> isTranslatable,
com.entwinemedia.fn.data.Opt<Map<String,String>> collection,
com.entwinemedia.fn.data.Opt<String> collectionId,
com.entwinemedia.fn.data.Opt<Integer> order,
com.entwinemedia.fn.data.Opt<String> namespace)
Create a metadata field of type String with a single line in the front end.
|
void |
fromJSON(Object json) |
com.entwinemedia.fn.data.Opt<Map<String,String>> |
getCollection() |
com.entwinemedia.fn.data.Opt<String> |
getCollectionID() |
com.entwinemedia.fn.data.Opt<String> |
getDelimiter() |
String |
getInputID() |
com.entwinemedia.fn.Fn<Object,A> |
getJsonToValue() |
MetadataField.JsonType |
getJsonType() |
String |
getLabel() |
com.entwinemedia.fn.data.Opt<String> |
getListprovider() |
com.entwinemedia.fn.data.Opt<String> |
getNamespace() |
com.entwinemedia.fn.data.Opt<Integer> |
getOrder() |
String |
getOutputID() |
com.entwinemedia.fn.data.Opt<String> |
getPattern() |
static SimpleDateFormat |
getSimpleDateFormatter(String pattern) |
MetadataField.Type |
getType() |
com.entwinemedia.fn.data.Opt<A> |
getValue() |
com.entwinemedia.fn.Fn<com.entwinemedia.fn.data.Opt<A>,com.entwinemedia.fn.data.json.JValue> |
getValueToJSON() |
boolean |
isReadOnly() |
boolean |
isRequired() |
com.entwinemedia.fn.data.Opt<Boolean> |
isTranslatable() |
boolean |
isUpdated() |
static com.entwinemedia.fn.data.json.JObject |
mapToJSON(Map<String,String> map)
Turn a map into a
JObject object |
void |
setCollection(com.entwinemedia.fn.data.Opt<Map<String,String>> collection)
Set the option of a limited list of possible values.
|
void |
setCollectionID(com.entwinemedia.fn.data.Opt<String> collectionID) |
void |
setDelimiter(com.entwinemedia.fn.data.Opt<String> delimiter) |
void |
setInputId(String inputID) |
void |
setIsTranslatable(com.entwinemedia.fn.data.Opt<Boolean> translatable) |
void |
setJsonToValue(com.entwinemedia.fn.Fn<Object,A> jsonToValue) |
void |
setJsonType(MetadataField.JsonType jsonType) |
void |
setLabel(String label) |
void |
setListprovider(com.entwinemedia.fn.data.Opt<String> listprovider) |
void |
setNamespace(com.entwinemedia.fn.data.Opt<String> namespace) |
void |
setOrder(com.entwinemedia.fn.data.Opt<Integer> order) |
void |
setOutputID(com.entwinemedia.fn.data.Opt<String> outputID) |
void |
setPattern(com.entwinemedia.fn.data.Opt<String> pattern) |
void |
setReadOnly(boolean readOnly) |
void |
setRequired(boolean required) |
void |
setType(MetadataField.Type type) |
void |
setValue(A value) |
void |
setValueToJSON(com.entwinemedia.fn.Fn<com.entwinemedia.fn.data.Opt<A>,com.entwinemedia.fn.data.json.JValue> valueToJSON) |
com.entwinemedia.fn.data.json.JObject |
toJSON() |
public static final String PATTERN_DURATION
public static final String CONFIG_COLLECTION_ID_KEY
public static final String CONFIG_PATTERN_KEY
public static final String CONFIG_DELIMITER_KEY
public static final String CONFIG_INPUT_ID_KEY
public static final String CONFIG_LABEL_KEY
public static final String CONFIG_LIST_PROVIDER_KEY
public static final String CONFIG_NAMESPACE_KEY
public static final String CONFIG_ORDER_KEY
public static final String CONFIG_OUTPUT_ID_KEY
public static final String CONFIG_PROPERTY_PREFIX
public static final String CONFIG_READ_ONLY_KEY
public static final String CONFIG_REQUIRED_KEY
public static final String CONFIG_TYPE_KEY
protected static final String JSON_KEY_ID
protected static final String JSON_KEY_LABEL
protected static final String JSON_KEY_READONLY
protected static final String JSON_KEY_REQUIRED
protected static final String JSON_KEY_TYPE
protected static final String JSON_KEY_VALUE
protected static final String JSON_KEY_COLLECTION
protected static final String JSON_KEY_TRANSLATABLE
protected static final String JSON_KEY_DELIMITER
public MetadataField(MetadataField<A> other)
other - Other metadata fieldpublic void setCollection(com.entwinemedia.fn.data.Opt<Map<String,String>> collection)
collection - The option of a limited list of possible valuespublic com.entwinemedia.fn.data.json.JObject toJSON()
public void fromJSON(Object json)
public com.entwinemedia.fn.data.Opt<A> getValue()
public com.entwinemedia.fn.data.Opt<Boolean> isTranslatable()
public boolean isUpdated()
public void setValue(A value)
public void setIsTranslatable(com.entwinemedia.fn.data.Opt<Boolean> translatable)
public static SimpleDateFormat getSimpleDateFormatter(String pattern)
public static MetadataField<Boolean> createBooleanMetadata(String inputID, com.entwinemedia.fn.data.Opt<String> outputID, String label, boolean readOnly, boolean required, com.entwinemedia.fn.data.Opt<Integer> order, com.entwinemedia.fn.data.Opt<String> namespace)
Boolean.inputID - The identifier of the new metadata fieldlabel - The label of the new metadata fieldreadOnly - Define if the new metadata is or not a readonly fieldrequired - Define if the new metadata field is or not requiredorder - The ui order for the new field, 0 at the top and progressively down from there.public static MetadataField<?> copyMetadataFieldWithValue(MetadataField<?> oldField, String value)
MetadataField and sets the value based upon a string.oldField - The field whose other values such as ids, label etc. will be copied.value - The value that will be interpreted as being from a JSON value.MetadataField with the value setpublic static MetadataField<Date> createDateMetadata(String inputID, com.entwinemedia.fn.data.Opt<String> outputID, String label, boolean readOnly, boolean required, String pattern, com.entwinemedia.fn.data.Opt<Integer> order, com.entwinemedia.fn.data.Opt<String> namespace)
Date.inputID - The identifier of the new metadata fieldlabel - The label of the new metadata fieldreadOnly - Define if the new metadata is or not a readonly fieldrequired - Define if the new metadata field is or not requiredpattern - The date pattern for SimpleDateFormat.order - The ui order for the new field, 0 at the top and progressively down from there.public static MetadataField<String> createDurationMetadataField(String inputID, com.entwinemedia.fn.data.Opt<String> outputID, String label, boolean readOnly, boolean required, com.entwinemedia.fn.data.Opt<Integer> order, com.entwinemedia.fn.data.Opt<String> namespace)
public static MetadataField<String> createDurationMetadataField(String inputID, com.entwinemedia.fn.data.Opt<String> outputID, String label, boolean readOnly, boolean required, com.entwinemedia.fn.data.Opt<Boolean> isTranslatable, com.entwinemedia.fn.data.Opt<Map<String,String>> collection, com.entwinemedia.fn.data.Opt<String> collectionId, com.entwinemedia.fn.data.Opt<Integer> order, com.entwinemedia.fn.data.Opt<String> namespace)
public static MetadataField<Iterable<String>> createMixedIterableStringMetadataField(String inputID, com.entwinemedia.fn.data.Opt<String> outputID, String label, boolean readOnly, boolean required, com.entwinemedia.fn.data.Opt<Boolean> isTranslatable, com.entwinemedia.fn.data.Opt<Map<String,String>> collection, com.entwinemedia.fn.data.Opt<String> collectionId, com.entwinemedia.fn.data.Opt<String> delimiter, com.entwinemedia.fn.data.Opt<Integer> order, com.entwinemedia.fn.data.Opt<String> namespace)
inputID - The identifier of the new metadata fieldlabel - The label of the new metadata fieldreadOnly - Define if the new metadata field can be or not editedrequired - Define if the new metadata field is or not requiredisTranslatable - If the field value is not human readable and should be translated beforecollection - If the field has a limited list of possible value, the option should contain this one. Otherwise it should
be none.order - The ui order for the new field, 0 at the top and progressively down from there.public static MetadataField<Iterable<String>> createIterableStringMetadataField(String inputID, com.entwinemedia.fn.data.Opt<String> outputID, String label, boolean readOnly, boolean required, com.entwinemedia.fn.data.Opt<Boolean> isTranslatable, com.entwinemedia.fn.data.Opt<Map<String,String>> collection, com.entwinemedia.fn.data.Opt<String> collectionId, com.entwinemedia.fn.data.Opt<String> delimiter, com.entwinemedia.fn.data.Opt<Integer> order, com.entwinemedia.fn.data.Opt<String> namespace)
inputID - The identifier of the new metadata fieldlabel - The label of the new metadata fieldreadOnly - Define if the new metadata field can be or not editedrequired - Define if the new metadata field is or not requiredisTranslatable - If the field value is not human readable and should be translated beforecollection - If the field has a limited list of possible value, the option should contain this one. Otherwise it should
be none.order - The ui order for the new field, 0 at the top and progressively down from there.public static MetadataField<Long> createLongMetadataField(String inputID, com.entwinemedia.fn.data.Opt<String> outputID, String label, boolean readOnly, boolean required, com.entwinemedia.fn.data.Opt<Boolean> isTranslatable, com.entwinemedia.fn.data.Opt<Map<String,String>> collection, com.entwinemedia.fn.data.Opt<String> collectionId, com.entwinemedia.fn.data.Opt<Integer> order, com.entwinemedia.fn.data.Opt<String> namespace)
public static MetadataField<String> createTemporalStartDateMetadata(String inputID, com.entwinemedia.fn.data.Opt<String> outputID, String label, boolean readOnly, boolean required, String pattern, com.entwinemedia.fn.data.Opt<Integer> order, com.entwinemedia.fn.data.Opt<String> namespace)
public static MetadataField<String> createTemporalStartTimeMetadata(String inputID, com.entwinemedia.fn.data.Opt<String> outputID, String label, boolean readOnly, boolean required, String pattern, com.entwinemedia.fn.data.Opt<Integer> order, com.entwinemedia.fn.data.Opt<String> namespace)
public static MetadataField<String> createTextMetadataField(String inputID, com.entwinemedia.fn.data.Opt<String> outputID, String label, boolean readOnly, boolean required, com.entwinemedia.fn.data.Opt<Boolean> isTranslatable, com.entwinemedia.fn.data.Opt<Map<String,String>> collection, com.entwinemedia.fn.data.Opt<String> collectionId, com.entwinemedia.fn.data.Opt<Integer> order, com.entwinemedia.fn.data.Opt<String> namespace)
inputID - The identifier of the new metadata fieldlabel - The label of the new metadata fieldreadOnly - Define if the new metadata field can be or not editedrequired - Define if the new metadata field is or not requiredisTranslatable - If the field value is not human readable and should be translated beforecollection - If the field has a limited list of possible value, the option should contain this one. Otherwise it should
be none.order - The ui order for the new field, 0 at the top and progressively down from there.public static MetadataField<String> createOrderedTextMetadataField(String inputID, com.entwinemedia.fn.data.Opt<String> outputID, String label, boolean readOnly, boolean required, com.entwinemedia.fn.data.Opt<Boolean> isTranslatable, com.entwinemedia.fn.data.Opt<Map<String,String>> collection, com.entwinemedia.fn.data.Opt<String> collectionId, com.entwinemedia.fn.data.Opt<Integer> order, com.entwinemedia.fn.data.Opt<String> namespace)
inputID - The identifier of the new metadata fieldlabel - The label of the new metadata fieldreadOnly - Define if the new metadata field can be or not editedrequired - Define if the new metadata field is or not requiredisTranslatable - If the field value is not human readable and should be translated beforecollection - If the field has a limited list of possible value, the option should contain this one. Otherwise it should
be none.order - The ui order for the new field, 0 at the top and progressively down from there.public static MetadataField<String> createTextLongMetadataField(String inputID, com.entwinemedia.fn.data.Opt<String> outputID, String label, boolean readOnly, boolean required, com.entwinemedia.fn.data.Opt<Boolean> isTranslatable, com.entwinemedia.fn.data.Opt<Map<String,String>> collection, com.entwinemedia.fn.data.Opt<String> collectionId, com.entwinemedia.fn.data.Opt<Integer> order, com.entwinemedia.fn.data.Opt<String> namespace)
inputID - The identifier of the new metadata fieldlabel - The label of the new metadata fieldreadOnly - Define if the new metadata field can be or not editedrequired - Define if the new metadata field is or not requiredisTranslatable - If the field value is not human readable and should be translated beforecollection - If the field has a limited list of possible value, the option should contain this one. Otherwise it should
be none.order - The ui order for the new field, 0 at the top and progressively down from there.public static com.entwinemedia.fn.data.json.JObject mapToJSON(Map<String,String> map)
JObject objectmap - the source mapJObject generated with the map valuespublic static MetadataField createMetadataField(Map<String,String> configuration)
public static MetadataField createMetadataField(String inputID, com.entwinemedia.fn.data.Opt<String> outputID, String label, boolean readOnly, boolean required, com.entwinemedia.fn.data.Opt<Boolean> translatable, MetadataField.Type type, com.entwinemedia.fn.data.Opt<Map<String,String>> collection, com.entwinemedia.fn.data.Opt<String> collectionID, com.entwinemedia.fn.data.Opt<Integer> order, com.entwinemedia.fn.data.Opt<String> namespace, com.entwinemedia.fn.data.Opt<String> delimiter, String pattern)
public com.entwinemedia.fn.data.Opt<String> getCollectionID()
public void setCollectionID(com.entwinemedia.fn.data.Opt<String> collectionID)
public String getInputID()
public void setInputId(String inputID)
public String getLabel()
public void setLabel(String label)
public com.entwinemedia.fn.data.Opt<String> getListprovider()
public void setListprovider(com.entwinemedia.fn.data.Opt<String> listprovider)
public com.entwinemedia.fn.data.Opt<String> getNamespace()
public void setNamespace(com.entwinemedia.fn.data.Opt<String> namespace)
public com.entwinemedia.fn.data.Opt<Integer> getOrder()
public void setOrder(com.entwinemedia.fn.data.Opt<Integer> order)
public String getOutputID()
public void setOutputID(com.entwinemedia.fn.data.Opt<String> outputID)
public com.entwinemedia.fn.data.Opt<String> getPattern()
public void setPattern(com.entwinemedia.fn.data.Opt<String> pattern)
public com.entwinemedia.fn.data.Opt<String> getDelimiter()
public void setDelimiter(com.entwinemedia.fn.data.Opt<String> delimiter)
public void setReadOnly(boolean readOnly)
public boolean isReadOnly()
public boolean isRequired()
public void setRequired(boolean required)
public MetadataField.Type getType()
public void setType(MetadataField.Type type)
public MetadataField.JsonType getJsonType()
public void setJsonType(MetadataField.JsonType jsonType)
public com.entwinemedia.fn.Fn<com.entwinemedia.fn.data.Opt<A>,com.entwinemedia.fn.data.json.JValue> getValueToJSON()
public void setValueToJSON(com.entwinemedia.fn.Fn<com.entwinemedia.fn.data.Opt<A>,com.entwinemedia.fn.data.json.JValue> valueToJSON)
Copyright © 2009–2019 Opencast Project. All rights reserved.