Class MetadataField

java.lang.Object
org.opencastproject.metadata.dublincore.MetadataField

public class MetadataField extends Object
This is a generic and very abstract view of a certain field/property in a metadata catalog. The main purpose of this class is to have a generic access to the variety of information stored in metadata catalogs.
  • Field Details

  • Constructor Details

    • MetadataField

      public MetadataField(MetadataField other)
      Copy constructor
      Parameters:
      other - Other metadata field
    • MetadataField

      public MetadataField(String inputID, String outputID, String label, boolean readOnly, boolean required, Object value, Boolean translatable, MetadataField.Type type, Map<String,String> collection, String collectionID, Integer order, String namespace, String listprovider, String pattern, String delimiter) throws IllegalArgumentException
      Metadata field constructor
      Parameters:
      inputID - The identifier of the new metadata field
      label - the label of the field. The string displayed next to the field value on the frontend. This is usually be a translation key
      readOnly - Define if the new metadata field can be or not edited
      required - Define if the new metadata field is or not required
      value - The metadata field value
      type - The metadata field type @ EventMetadata.Type}
      collection - If the field has a limited list of possible value, the option should contain this one. Otherwise it should be none. This is also possible to use the collectionId parameter for that.
      collectionID - The id of the limit list of possible value that should be get through the resource endpoint.
      listprovider - An optional list provider ID
      pattern - Pattern for time/date fields
      delimiter - Delimiter
      Throws:
      IllegalArgumentException - if the id, label, type parameters is/are null
  • Method Details

    • setCollection

      public void setCollection(Map<String,String> collection)
      Set the option of a limited list of possible values.
      Parameters:
      collection - The option of a limited list of possible values
    • getCollection

      public Map<String,String> getCollection()
    • getValue

      public Object getValue()
    • isTranslatable

      public Boolean isTranslatable()
    • isUpdated

      public boolean isUpdated()
    • setValue

      public void setValue(Object value)
    • setValue

      public void setValue(Object value, boolean setUpdated)
    • setIsTranslatable

      public void setIsTranslatable(Boolean translatable)
    • getSimpleDateFormatter

      public static SimpleDateFormat getSimpleDateFormatter(String pattern)
    • createMetadataField

      public static MetadataField createMetadataField(Map<String,String> configuration)
    • getCollectionID

      public String getCollectionID()
    • setCollectionID

      public void setCollectionID(String collectionID)
    • getInputID

      public String getInputID()
    • getLabel

      public String getLabel()
    • getListprovider

      public String getListprovider()
    • getNamespace

      public String getNamespace()
    • getOrder

      public Integer getOrder()
    • getOutputID

      public String getOutputID()
      Returns:
      The outputID if available, inputID if it is missing.
    • getPattern

      public String getPattern()
    • setPattern

      public void setPattern(String pattern)
    • getDelimiter

      public String getDelimiter()
    • setDelimiter

      public void setDelimiter(String delimiter)
    • setReadOnly

      public void setReadOnly(boolean readOnly)
    • isReadOnly

      public boolean isReadOnly()
    • isRequired

      public boolean isRequired()
    • setUpdated

      public void setUpdated(boolean updated)
    • getType

      public MetadataField.Type getType()
    • setType

      public void setType(MetadataField.Type type)
    • setDifferentValues

      public void setDifferentValues()
    • hasDifferentValues

      public Boolean hasDifferentValues()
    • readOnlyCopy

      public MetadataField readOnlyCopy()