Package org.dspace.content
Class MetadataFieldName
java.lang.Object
org.dspace.content.MetadataFieldName
Simple immutable holder for the name of a metadata field.
- Author:
- mwood
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMetadataFieldName(String name) Initialize a tuple of (schema, element, qualifier) to name a metadata field.MetadataFieldName(String schema, String element) Initialize a tuple of (schema, element, qualifier=null) to name a metadata field.MetadataFieldName(String schema, String element, String qualifier) Initialize a tuple of (schema, element, qualifier) to name a metadata field.MetadataFieldName(MetadataSchemaEnum schema, String element) Initialize a tuple of (schema, element, qualifier=null) to name a metadata field.MetadataFieldName(MetadataSchemaEnum schema, String element, String qualifier) Initialize a tuple of (schema, element, qualifier) to name a metadata field. -
Method Summary
-
Field Details
-
schema
Name of the metadata schema which defines this field. Never null. -
element
Element name of this field. Never null. -
qualifier
Qualifier name of this field. May benull.
-
-
Constructor Details
-
MetadataFieldName
Initialize a tuple of (schema, element, qualifier) to name a metadata field.- Parameters:
schema- name (not URI) of the schema. Cannot be null.element- element name of the field. Cannot be null.qualifier- qualifier name of the field.
-
MetadataFieldName
Initialize a tuple of (schema, element, qualifier=null) to name a metadata field.- Parameters:
schema- name (not URI) of the schema. Cannot be null.element- element name of the field. Cannot be null.
-
MetadataFieldName
public MetadataFieldName(@Nonnull MetadataSchemaEnum schema, @Nonnull String element, String qualifier) Initialize a tuple of (schema, element, qualifier) to name a metadata field.- Parameters:
schema- name (not URI) of the schema. Cannot be null.element- element name of the field. Cannot be null.qualifier- qualifier name of the field.
-
MetadataFieldName
Initialize a tuple of (schema, element, qualifier=null) to name a metadata field.- Parameters:
schema- name (not URI) of the schema. Cannot be null.element- element name of the field. Cannot be null.
-
MetadataFieldName
Initialize a tuple of (schema, element, qualifier) to name a metadata field.- Parameters:
name- a dotted-tripleschema.element[.qualifier]. If the optional qualifier is omitted, it will be stored asnull.
-
-
Method Details
-
parse
Split a dotted-triple field nameschema.element[.qualifier]into its components.- Parameters:
name- the dotted-triple field name.- Returns:
- the components. Always of size 3. If the qualifier is omitted,
the third element is
null. - Throws:
IllegalArgumentException- if there are not at least two components.NullPointerException- ifnameis null.
-
toString
Format a dotted-atoms representation of this field name.
-