org.apache.oodt.profile
Class EnumeratedProfileElement

java.lang.Object
  extended by org.apache.oodt.profile.ProfileElement
      extended by org.apache.oodt.profile.EnumeratedProfileElement
All Implemented Interfaces:
Serializable, Cloneable, Comparable, Documentable
Direct Known Subclasses:
SearchableEnumeratedProfileElement

public class EnumeratedProfileElement
extends ProfileElement

Enumerated profile element. Objects of this class are elements of a profile that have several enumerated values.

Author:
Kelly
See Also:
Serialized Form

Field Summary
protected  List values
          Valid values.
 
Fields inherited from class org.apache.oodt.profile.ProfileElement
comments, desc, id, maxOccurrence, name, obligation, profile, synonyms, type, unit
 
Constructor Summary
EnumeratedProfileElement(Profile profile)
          Create blank profile element belonging to the given profile.
EnumeratedProfileElement(Profile profile, String name, String id, String desc, String type, String unit, List synonyms, boolean obligation, int maxOccurrence, String comment, List values)
          Create a profile element from constituent attributes.
 
Method Summary
protected  void addElementSpecificProperties(com.hp.hpl.jena.rdf.model.Model model, com.hp.hpl.jena.rdf.model.Resource element, ProfileAttributes profAttr, URI uri)
          Add the statements specific to this kind of profile element to an RDF model.
protected  void addValues(Node node)
          Add the values of this element to the given node.
 String getMaxValue()
          Get my maximum value.
 String getMinValue()
          Get my minimum value.
 List getValues()
          Get legal values.
protected  boolean isEnumerated()
          Tell if this element is of the enumerated kind.
 
Methods inherited from class org.apache.oodt.profile.ProfileElement
clone, compareTo, createProfElementDocument, createProfileElement, elements, equals, getComments, getDescription, getID, getMaxOccurrence, getName, getProfile, getSynonyms, getType, getUnit, hashCode, isObligatory, profiles, setComments, setDescription, setID, setMaxOccurrence, setName, setObligation, setProfile, setType, setUnit, toString, toXML, toXMLWithoutValues
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

values

protected List values
Valid values.

Constructor Detail

EnumeratedProfileElement

public EnumeratedProfileElement(Profile profile)
Create blank profile element belonging to the given profile.


EnumeratedProfileElement

public EnumeratedProfileElement(Profile profile,
                                String name,
                                String id,
                                String desc,
                                String type,
                                String unit,
                                List synonyms,
                                boolean obligation,
                                int maxOccurrence,
                                String comment,
                                List values)
Create a profile element from constituent attributes.

Parameters:
profile - Profile to which this element belongs.
name - Required name of the element.
id - ID of the element.
desc - Long description of the element.
type - Data type of the element.
unit - Units.
synonyms - Collection of element IDs (String) that are synonyms for this element.
obligation - True if this is a required element
maxOccurrence - Maximum number of occurrences of this element.
comment - Any comments about this element.
values - Valid values.
Method Detail

isEnumerated

protected boolean isEnumerated()
Description copied from class: ProfileElement
Tell if this element is of the enumerated kind.

Specified by:
isEnumerated in class ProfileElement
Returns:
a boolean value.

addValues

protected void addValues(Node node)
                  throws DOMException
Description copied from class: ProfileElement
Add the values of this element to the given node.

Specified by:
addValues in class ProfileElement
Parameters:
node - The node to add to.
Throws:
DOMException - If an error occurs creating the XML nodes.

getMinValue

public String getMinValue()
Description copied from class: ProfileElement
Get my minimum value.

Specified by:
getMinValue in class ProfileElement
Returns:
My minimum value.

getMaxValue

public String getMaxValue()
Description copied from class: ProfileElement
Get my maximum value.

Specified by:
getMaxValue in class ProfileElement
Returns:
My maximum value.

getValues

public List getValues()
Description copied from class: ProfileElement
Get legal values.

Specified by:
getValues in class ProfileElement
Returns:
List of legal values (as Strings).

addElementSpecificProperties

protected void addElementSpecificProperties(com.hp.hpl.jena.rdf.model.Model model,
                                            com.hp.hpl.jena.rdf.model.Resource element,
                                            ProfileAttributes profAttr,
                                            URI uri)
Description copied from class: ProfileElement
Add the statements specific to this kind of profile element to an RDF model.

Specified by:
addElementSpecificProperties in class ProfileElement
Parameters:
model - The model.
element - This element, as an RDF resource.
profAttr - The attributes of the element's profile.


Copyright © 1999-2011 Apache OODT. All Rights Reserved.