org.gedcomx.conclusion
Class Identifier

java.lang.Object
  extended by org.gedcomx.conclusion.Identifier
All Implemented Interfaces:
HasJsonKey

public final class Identifier
extends Object
implements HasJsonKey

An identifier for a resource.

Author:
Ryan Heaton

Constructor Summary
Identifier()
           
Identifier(URI value)
           
Identifier(URI value, IdentifierType knownType)
           
 
Method Summary
 String getJsonKey()
           
 IdentifierType getKnownType()
          The enum referencing a known identifier type.
 URI getType()
          The type of the id.
 URI getValue()
          The id value.
 boolean isHasUniqueKey()
           
 void setJsonKey(String jsonKey)
           
 void setKnownType(IdentifierType knownType)
          Set the value of the id type from a known identifier type.
 void setType(URI type)
          The type of the id.
 void setType(URI type, boolean unique)
          The type of the id.
 void setValue(URI value)
          The id value.
 String toString()
          Provide a simple toString() method.
 Identifier type(IdentifierType type)
          Build up this identifier with a type.
 Identifier type(URI type)
          Build up this identifier with a type.
 Identifier value(URI value)
          Build up this identifier with a value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Identifier

public Identifier()

Identifier

public Identifier(URI value)

Identifier

public Identifier(URI value,
                  IdentifierType knownType)
Method Detail

getValue

public URI getValue()
The id value.

Returns:
The id value.

setValue

public void setValue(URI value)
The id value.

Parameters:
value - The id value.

value

public Identifier value(URI value)
Build up this identifier with a value.

Parameters:
value - The value.
Returns:
this.

getType

public URI getType()
The type of the id.

Returns:
The type of the id.

setType

public void setType(URI type)
The type of the id.

Parameters:
type - The type of the id.

type

public Identifier type(URI type)
Build up this identifier with a type.

Parameters:
type - The type.
Returns:
this.

type

public Identifier type(IdentifierType type)
Build up this identifier with a type.

Parameters:
type - The type.
Returns:
this.

setType

public void setType(URI type,
                    boolean unique)
The type of the id.

Parameters:
type - The type of the id.
unique - Whether the type of this identifier implies that the value is unique among all other identifiers of the same type.

getKnownType

public IdentifierType getKnownType()
The enum referencing a known identifier type.

Returns:
The enum referencing a known identifier type, or IdentifierType.OTHER if not known.

setKnownType

public void setKnownType(IdentifierType knownType)
Set the value of the id type from a known identifier type.

Parameters:
knownType - The known identifier type.

isHasUniqueKey

public boolean isHasUniqueKey()
Specified by:
isHasUniqueKey in interface HasJsonKey

getJsonKey

public String getJsonKey()
Specified by:
getJsonKey in interface HasJsonKey

setJsonKey

public void setJsonKey(String jsonKey)
Specified by:
setJsonKey in interface HasJsonKey

toString

public String toString()
Provide a simple toString() method.

Overrides:
toString in class Object


Copyright © 2015. All rights reserved.