Package org.dspace.content.dto
Class MetadataValueDTO
java.lang.Object
org.dspace.content.dto.MetadataValueDTO
This class acts as Data transfer object in which we can store data like in a regular MetadataValue object, but this
one isn't saved in the DB. This can freely be used to represent Metadata without it being saved in the database,
this will typically be used when transferring data
- Author:
- kevinvandevelde at atmire.com
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor for the MetadataValueDTO classMetadataValueDTO(String schema, String element, String qualifier, String language, String value, String authority, int confidence) Constructor for the MetadataValueDTO classMetadataValueDTO(MetadataValue metadataValue) -
Method Summary
Modifier and TypeMethodDescriptionstatic Comparator<MetadataValueDTO>Build a comparator to support proper sorting of MetadataValueDTO objects.booleanintgetValue()inthashCode()voidsetAuthority(String authority) voidsetConfidence(int confidence) voidsetElement(String element) voidsetLanguage(String language) voidsetQualifier(String qualifier) voidvoidtoString()
-
Constructor Details
-
MetadataValueDTO
-
MetadataValueDTO
public MetadataValueDTO() -
MetadataValueDTO
public MetadataValueDTO(String schema, String element, String qualifier, String language, String value, String authority, int confidence) Constructor for the MetadataValueDTO class- Parameters:
schema- The schema to be assigned to this MetadataValueDTO objectelement- The element to be assigned to this MetadataValueDTO objectqualifier- The qualifier to be assigned to this MetadataValueDTO objectlanguage- The language to be assigned to this MetadataValueDTO objectvalue- The value to be assigned to this MetadataValueDTO objectauthority- The authority to be assigned to this MetadataValueDTO objectconfidence- The confidence to be assigned to this MetadataValueDTO object
-
MetadataValueDTO
public MetadataValueDTO(String schema, String element, String qualifier, String language, String value) Constructor for the MetadataValueDTO class- Parameters:
schema- The schema to be assigned to this MetadataValueDTO objectelement- The element to be assigned to this MetadataValueDTO objectqualifier- The qualifier to be assigned to this MetadataValueDTO objectlanguage- The language to be assigned to this MetadataValueDTO objectvalue- The value to be assigned to this MetadataValueDTO object
-
-
Method Details
-
getSchema
-
getElement
-
getQualifier
-
getValue
-
setSchema
-
setElement
-
setQualifier
-
setValue
-
getLanguage
-
setLanguage
-
getAuthority
-
setAuthority
-
getConfidence
public int getConfidence() -
setConfidence
public void setConfidence(int confidence) -
toString
-
equals
-
hashCode
public int hashCode() -
comparator
Build a comparator to support proper sorting of MetadataValueDTO objects. Order of sorting is based on how these things are normally sorted in human-readable formats, with field name -> value -> lang/auth/etc being the usual order we use. In all these individual tests, nulls are sorted first (eg. dc.title before dc.title.alternative)- Returns:
- comparator
- See Also:
-