Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.io.codelist.xml.reader
Class XmlCodeList

java.lang.Object
  extended by eu.esdihumboldt.hale.io.codelist.xml.reader.XmlCodeList
All Implemented Interfaces:
CodeList

public class XmlCodeList
extends Object
implements CodeList

Reads an XML based code list

Author:
Simon Templer
Partner:
01 / Fraunhofer Institute for Computer Graphics Research

Nested Class Summary
 
Nested classes/interfaces inherited from interface eu.esdihumboldt.hale.common.codelist.CodeList
CodeList.CodeEntry
 
Constructor Summary
XmlCodeList(InputStream in, URI location)
          Create a code list from an XML document
 
Method Summary
 boolean equals(Object obj)
           
 String getDescription()
          Get the description
 Collection<CodeList.CodeEntry> getEntries()
          Get the code list entries
 CodeList.CodeEntry getEntryByIdentifier(String identifier)
          Get the entry with the given identifier
 CodeList.CodeEntry getEntryByName(String name)
          Get the entry with the given name
 String getIdentifier()
          Get the identifier
 URI getLocation()
          Get the code list location
 String getNamespace()
          Get the namespace
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlCodeList

public XmlCodeList(InputStream in,
                   URI location)
            throws Exception
Create a code list from an XML document

Parameters:
in - the input stream of the XML document
location - the code list location
Throws:
Exception - if creating the code list fails
Method Detail

getEntries

public Collection<CodeList.CodeEntry> getEntries()
Description copied from interface: CodeList
Get the code list entries

Specified by:
getEntries in interface CodeList
Returns:
the code list entries, changes to the returned collection will not be reflected in the code list
See Also:
CodeList.getEntries()

getDescription

public String getDescription()
Description copied from interface: CodeList
Get the description

Specified by:
getDescription in interface CodeList
Returns:
the description
See Also:
CodeList.getDescription()

getIdentifier

public String getIdentifier()
Description copied from interface: CodeList
Get the identifier

Specified by:
getIdentifier in interface CodeList
Returns:
the identifier
See Also:
CodeList.getIdentifier()

getNamespace

public String getNamespace()
Description copied from interface: CodeList
Get the namespace

Specified by:
getNamespace in interface CodeList
Returns:
the namespace
See Also:
CodeList.getNamespace()

getEntryByName

public CodeList.CodeEntry getEntryByName(String name)
Description copied from interface: CodeList
Get the entry with the given name

Specified by:
getEntryByName in interface CodeList
Parameters:
name - the entry name
Returns:
the entry or null
See Also:
CodeList.getEntryByName(String)

getEntryByIdentifier

public CodeList.CodeEntry getEntryByIdentifier(String identifier)
Description copied from interface: CodeList
Get the entry with the given identifier

Specified by:
getEntryByIdentifier in interface CodeList
Parameters:
identifier - the entry identifier
Returns:
the entry or null
See Also:
CodeList.getEntryByIdentifier(String)

getLocation

public URI getLocation()
Description copied from interface: CodeList
Get the code list location

Specified by:
getLocation in interface CodeList
Returns:
the code list location
See Also:
CodeList.getLocation()

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

equals

public boolean equals(Object obj)
Overrides:
equals in class Object
See Also:
Object.equals(Object)

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d