Class MetadataFieldConfig

java.lang.Object
org.dspace.importer.external.metadatamapping.MetadataFieldConfig

public class MetadataFieldConfig extends Object
A generalised configuration for metadata fields. This is used to make the link between values and the actual MetadatumDTO object.
Author:
Roeland Dillen (roeland at atmire dot com)
  • Constructor Details

    • MetadataFieldConfig

      public MetadataFieldConfig(MetadatumDTO value)
      Create a MetadataFieldConfig based on a given MetadatumDTO This MetadatumDTO object contains the schema, element and qualifier needed to initialize the MetadataFieldConfig
      Parameters:
      value - the DTO.
    • MetadataFieldConfig

      public MetadataFieldConfig()
      An empty initialization of MetadataFieldConfig
    • MetadataFieldConfig

      public MetadataFieldConfig(String schema, String element, String qualifier)
      Create a MetadataFieldConfig using a schema,element and qualifier
      Parameters:
      schema - The schema to set to this object
      element - The element to set to this object
      qualifier - The qualifier to set to this object
    • MetadataFieldConfig

      public MetadataFieldConfig(String full)
      Create a MetadataFieldConfig using a single value. This value is split up into schema, element and qualifier, based on a dot(.)
      Parameters:
      full - A string representing the schema.element.qualifier triplet
    • MetadataFieldConfig

      public MetadataFieldConfig(String schema, String element)
      Create a MetadataFieldConfig using a schema and element qualifier will be set to null
      Parameters:
      schema - The schema to set to this object
      element - The element to set to this object
  • Method Details

    • equals

      public boolean equals(Object o)
      Indicates whether some other object is "equal to" this one.
      Overrides:
      equals in class Object
      Parameters:
      o - the reference object with which to compare.
      Returns:
      true if this object is the same as the obj argument; false otherwise.
    • toString

      public String toString()
      Create the String representation of the MetadataFieldConfig
      Overrides:
      toString in class Object
      Returns:
      a string representation of the MetadataFieldConfig
    • hashCode

      public int hashCode()
      Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by HashMap.
      Overrides:
      hashCode in class Object
      Returns:
      a hash code value for this object.
    • setSchema

      public void setSchema(String schema)
      Set the schema to this MetadataFieldConfig
      Parameters:
      schema - The schema to set to this object
    • getSchema

      public String getSchema()
      Return the schema set to this object. null if nothing is set
      Returns:
      The schema of this object
    • getField

      public String getField()
      Return a string representing the field of this object
      Returns:
      The field that is set to this object, in the form of schema.element.qualifier
    • getElement

      public String getElement()
      Return the qualifier set to this object. null if nothing is set
      Returns:
      The qualifier of this object
    • setElement

      public void setElement(String element)
      Set the element to this MetadataFieldConfig
      Parameters:
      element - The element to set to this object
    • getQualifier

      public String getQualifier()
      Return the qualifier set to this object. null if nothing is set
      Returns:
      The qualifier of this object
    • setQualifier

      public void setQualifier(String qualifier)
      Set the qualifier to this MetadataFieldConfig
      Parameters:
      qualifier - The qualifier to set to this object