project.biota.digir
Class RecordConcept

java.lang.Object
  extended byproject.biota.digir.RecordConcept

public class RecordConcept
extends Object

RecordConcept reprsents a record concept used in DiGIR response to a search request. A record concept can be a simple schema concept, or a complex concept that contains a sequence of simple/complex concept. For example, if a DiGIR request specify the "structure" element as follows:

<structure>
  <xsd:element name="record">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element ref="darwin:InstitutionCode"/>
        <xsd:element ref="darwin:CollectionCode"/>
        <xsd:element ref="darwin:CatalogNumber"/>
        <xsd:element ref="darwin:ScientificName"/>
        <xsd:element name="coordinates">
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element ref="darwin:Latitude"/>
              <xsd:element ref="darwin:Longitude"/>
            </xsd:sequence>
          </xsd:complexType>
        </xsd:element>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
</structure>

The record concept "coordinates" is complex, while "InstitutionCode", "CollectionCode" and the rest are simple record concept that represents a simple schema concept.

Author:
Kimmy Lin

Constructor Summary
RecordConcept(String name, boolean isComplex)
          Concstructs a RecordConcept object.
 
Method Summary
 void addChild(RecordConcept concept)
          Adds a child concept to a complex record concept.
 List getChildren()
          Gets the children concept of a record concept.
 String getName()
          Returns the name of the record concept.
 boolean isComplex()
          Checks whether this record concept is a complex concept.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecordConcept

public RecordConcept(String name,
                     boolean isComplex)
Concstructs a RecordConcept object.

Parameters:
name - the name of the record concept
isComplex - if true, the record concpet is a complex concept
Method Detail

getName

public String getName()
Returns the name of the record concept.

Returns:
the name of the record concept

addChild

public void addChild(RecordConcept concept)
Adds a child concept to a complex record concept.

Parameters:
concept - the child RecordConcept object to be added

getChildren

public List getChildren()
Gets the children concept of a record concept. This method returns null when this concept is a simple schema concept.

Returns:
a java.util.List of RecordConcept objects

isComplex

public boolean isComplex()
Checks whether this record concept is a complex concept.

Returns:
true if this record concept is complex, false otherwise


Copyright © 2004 University of Massachusetts at Boston. All Rights Reserved.