Class Value


  • public class Value
    extends Object
    Pojo to contain information from MetadataValue. Should be populated by each Packer implementation. Setters are used by JAXB and set to private so that only the two constructors are used depending on the workflow.
    Author:
    mikejritter
    • Constructor Detail

      • Value

        protected Value()
        Default constructor for JAXB
      • Value

        public Value​(String body,
                     String name)
        Construct a Value from a MetadataValue using only a value for the body of the xml tag and a name of the MetadataValue (equivalent the the schema name on the MetadataValue)
        Parameters:
        body - the body of the Value
        name - the name of the MetadataValue
      • Value

        public Value​(org.dspace.content.MetadataValue metadataValue)
        Construct a full qualified Value from a MetadataValue.
        Parameters:
        metadataValue - the MetadataValue to use as a source of information
    • Method Detail

      • getMetadataField

        public org.dspace.content.MetadataFieldName getMetadataField()
        Gets the MetadataFieldName for this value.
        Returns:
        the appropriate MetadataFieldName for the given field.
        Throws:
        IllegalStateException - if this value does not have a valid MetadataFieldName.
      • getName

        public String getName()
      • getSchema

        public String getSchema()
      • getElement

        public String getElement()
      • getLanguage

        public String getLanguage()
      • getQualifier

        public String getQualifier()
      • getBody

        public String getBody()