org.gedcomx.common
Class Qualifier

java.lang.Object
  extended by org.gedcomx.common.Qualifier

public final class Qualifier
extends Object

A data qualifier. Qualifiers are used to "qualify" certain data elements to provide additional context, information, or details.

Author:
Ryan Heaton

Constructor Summary
Qualifier()
           
Qualifier(Enum name)
           
Qualifier(Enum name, String value)
           
Qualifier(URI name)
           
Qualifier(URI name, String value)
           
 
Method Summary
 URI getName()
          The name of the qualifier.
<E extends Enum>
E
getName(Class<E> vocabulary)
          Get the name as an element of a constrained vocabulary.
 String getValue()
          The value of the qualifier.
 Qualifier name(Enum name)
          Build up this qualifier with a name.
 Qualifier name(URI name)
          Build up this qualifier with a name.
 void setName(Enum element)
          Set the qualifier name as an element of a constrained vocabulary.
 void setName(URI name)
          The name of the qualifier.
 void setValue(String value)
          The value of the qualifier.
 Qualifier value(String value)
          Build up this qualifier with a value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Qualifier

public Qualifier()

Qualifier

public Qualifier(URI name,
                 String value)

Qualifier

public Qualifier(URI name)

Qualifier

public Qualifier(Enum name,
                 String value)

Qualifier

public Qualifier(Enum name)
Method Detail

getName

public URI getName()
The name of the qualifier. The name should be an element of a constrained vocabulary and is used to determine meaning of the qualifier.

Returns:
The name of the qualifier.

setName

public void setName(URI name)
The name of the qualifier. The name should be an element of a constrained vocabulary and is used to determine meaning of the qualifier.

Parameters:
name - The name of the qualifier.

name

public Qualifier name(URI name)
Build up this qualifier with a name.

Parameters:
name - the name.
Returns:
this.

getName

public <E extends Enum> E getName(Class<E> vocabulary)
Get the name as an element of a constrained vocabulary.

Parameters:
vocabulary - The enum containing the constrained vocabulary.
Returns:
The vocabulary element.

setName

public void setName(Enum element)
Set the qualifier name as an element of a constrained vocabulary.

Parameters:
element - The element.

name

public Qualifier name(Enum name)
Build up this qualifier with a name.

Parameters:
name - the name.
Returns:
this.

getValue

public String getValue()
The value of the qualifier. Some qualifiers may not have values, indicating that the qualifier is to be treated more like a "tag".

Returns:
The value of the qualifier.

setValue

public void setValue(String value)
The value of the qualifier. Some qualifiers may not have values, indicating that the qualifier is to be treated more like a "tag".

Parameters:
value - The value of the qualifier.

value

public Qualifier value(String value)
Build up this qualifier with a value.

Parameters:
value - The value of the qualifier.
Returns:
this.


Copyright © 2015. All rights reserved.