Class MetadataField

  • All Implemented Interfaces:
    Serializable

    public class MetadataField
    extends Object
    implements Serializable
    The Class MetadataField.
    Author:
    Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it Jun 20, 2022
    See Also:
    Serialized Form
    • Constructor Detail

      • MetadataField

        public MetadataField()
        Instantiates a new metadata field.
      • MetadataField

        public MetadataField​(String fieldName,
                             Boolean mandatory)
        Instantiates a new metadata field.
        Parameters:
        fieldName - the field name
        mandatory - the mandatory
      • MetadataField

        public MetadataField​(String fieldName,
                             Boolean mandatory,
                             String categoryID)
        Instantiates a new metadata field.
        Parameters:
        fieldName - the field name
        mandatory - the mandatory
        categoryID - the category id
    • Method Detail

      • getCategoryRef

        public String getCategoryRef()
        Gets the category ref. If exists its value is a Category-ID
        Returns:
        the categoryRef
      • setCategoryRefToCategoryId

        public void setCategoryRefToCategoryId​(String categoryID)
        Sets the category ref to category id.
        Parameters:
        categoryID - the new category ref to category id
      • getCategoryFieldQName

        public String getCategoryFieldQName()
        Gets the category field qualified name. If the Metadata Field belongs to a category, returns the qualified name: categoryRef Namespace.Separator} fieldName; Otherwise returns the fieldName
        Returns:
        the category q name
      • getFieldId

        public String getFieldId()
        Gets the field id.
        Returns:
        the field id
      • setFieldId

        public void setFieldId​(String fieldId)
        Sets the field id. Optional Field used as fieldName in the (result) Document. (e.g. JSON Document { fieldId: [data entry value]} If it absent, the mandatory fieldName is used
        Parameters:
        fieldId - the new field id
      • getFieldName

        public String getFieldName()
        Gets the field name.
        Returns:
        the fieldName
      • getMandatory

        public Boolean getMandatory()
        Gets the mandatory.
        Returns:
        the mandatory
      • getDataType

        public DataType getDataType()
        Gets the data type.
        Returns:
        the dataType
      • getMaxOccurs

        public String getMaxOccurs()
        Gets the max occurs.
        Returns:
        the maxOccurs
      • setMaxOccurs

        public void setMaxOccurs​(String maxOccurs)
        Sets the max occurs.
        Parameters:
        maxOccurs - the maxOccurs to set
      • getDefaultValue

        public String getDefaultValue()
        Gets the default value.
        Returns:
        the defaultValue
      • getNote

        public String getNote()
        Gets the note.
        Returns:
        the note
      • getVocabulary

        public MetadataVocabulary getVocabulary()
        Gets the vocabulary.
        Returns:
        the vocabulary
      • getValidator

        public MetadataValidator getValidator()
        Gets the validator.
        Returns:
        the validator
      • getTagging

        public MetadataTagging getTagging()
        Gets the tagging.
        Returns:
        the tagging
      • getGrouping

        public MetadataGrouping getGrouping()
        Gets the grouping.
        Returns:
        the grouping
      • setFieldName

        public void setFieldName​(String fieldName)
        Sets the field name.
        Parameters:
        fieldName - the fieldName to set
      • setMandatory

        public void setMandatory​(Boolean mandatory)
        Sets the mandatory.
        Parameters:
        mandatory - the mandatory to set
      • setDataType

        public void setDataType​(DataType dataType)
        Sets the data type.
        Parameters:
        dataType - the dataType to set
      • setDefaultValue

        public void setDefaultValue​(String defaultValue)
        Sets the default value.
        Parameters:
        defaultValue - the defaultValue to set
      • setNote

        public void setNote​(String note)
        Sets the note.
        Parameters:
        note - the note to set
      • setVocabulary

        public void setVocabulary​(MetadataVocabulary vocabulary)
        Sets the vocabulary.
        Parameters:
        vocabulary - the vocabulary to set
      • setValidator

        public void setValidator​(MetadataValidator validator)
        Sets the validator.
        Parameters:
        validator - the validator to set
      • setTagging

        public void setTagging​(MetadataTagging tagging)
        Sets the tagging.
        Parameters:
        tagging - the tagging to set
      • setGrouping

        public void setGrouping​(MetadataGrouping grouping)
        Sets the grouping.
        Parameters:
        grouping - the grouping to set
      • toString

        public String toString()
        To string.
        Overrides:
        toString in class Object
        Returns:
        the string