org.deegree.commons.tom.ows
Class CodeType

java.lang.Object
  extended by org.deegree.commons.tom.ows.CodeType
All Implemented Interfaces:
TypedObjectNode

public class CodeType
extends Object
implements TypedObjectNode

Name or code with an (optional) authority. If the codeSpace attribute is present, its value shall reference a dictionary, thesaurus, or authority for the name or code, such as the organisation who assigned the value, or the dictionary from which it is taken.

Version:
$Revision: $, $Date: $
Author:
Markus Schneider, last edited by: $Author: schneider $

Constructor Summary
CodeType(String code)
          Returns a new CodeType instance without authority.
CodeType(String code, String codeSpace)
          Returns a new CodeType instance with optional authority.
 
Method Summary
 boolean equals(Object o)
           
 String getCode()
          Returns the code value.
 String getCodeSpace()
          Returns the authority of the code.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CodeType

public CodeType(String code)
         throws InvalidParameterValueException
Returns a new CodeType instance without authority.

Parameters:
code - code value, not null
Throws:
InvalidParameterValueException - if code is null

CodeType

public CodeType(String code,
                String codeSpace)
         throws InvalidParameterValueException
Returns a new CodeType instance with optional authority.

Parameters:
code - code value, not null
codeSpace - authority, may be null
Throws:
InvalidParameterValueException - if code is null
Method Detail

getCode

public String getCode()
Returns the code value.

Returns:
the code value, never null

getCodeSpace

public String getCodeSpace()
Returns the authority of the code.

Returns:
the authority of the code or null if unspecified

toString

public String toString()
Overrides:
toString in class Object
Returns:
the code (codeSpaces are ignored for now because the filter model needs #toString...)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object


Copyright © 2011. All Rights Reserved.