public abstract class ProfileElement extends Object implements Serializable, Cloneable, Comparable, Documentable
Modifier and Type | Field and Description |
---|---|
protected String |
comments
My optional comments.
|
protected String |
desc
My optional description.
|
protected String |
id
My optional id.
|
protected int |
maxOccurrence
My maxOccurrence.
|
protected String |
name
My required name.
|
protected boolean |
obligation
My obligation.
|
protected Profile |
profile
My profile.
|
protected List |
synonyms
My synonyms.
|
protected String |
type
My optional type.
|
protected String |
unit
My optional unit.
|
Modifier | Constructor and Description |
---|---|
protected |
ProfileElement(Profile profile)
Create blank profile attributes belonging to the given profile.
|
protected |
ProfileElement(Profile profile,
String name,
String id,
String desc,
String type,
String unit,
List synonyms,
boolean obligation,
int maxOccurrence,
String comments)
Create a profile element from constituent attributes.
|
Modifier and Type | Method and Description |
---|---|
protected abstract 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 abstract void |
addValues(Node node)
Add the values of this element to the given node.
|
Object |
clone() |
int |
compareTo(Object rhs) |
static Document |
createProfElementDocument()
Create a <profElement> document using the profiles DTD.
|
static ProfileElement |
createProfileElement(Element root,
Profile profile,
ObjectFactory factory)
Create a profile element from the given XML node.
|
static Set |
elements(Set profiles,
Set elements)
Given a set of profiles and of profile elements, return those elements that
are owned by any of the given profiles.
|
boolean |
equals(Object rhs) |
String |
getComments()
Get any comments about me.
|
String |
getDescription()
Get my long description.
|
String |
getID()
Get my element ID.
|
int |
getMaxOccurrence()
Get how many times I can occur.
|
abstract String |
getMaxValue()
Get my maximum value.
|
abstract String |
getMinValue()
Get my minimum value.
|
String |
getName()
Get my name.
|
Profile |
getProfile()
Get the profile to whom I belong.
|
List |
getSynonyms()
Get my synonyms.
|
String |
getType()
Get my type.
|
String |
getUnit()
Get my unit.
|
abstract List |
getValues()
Get legal values.
|
int |
hashCode() |
protected abstract boolean |
isEnumerated()
Tell if this element is of the enumerated kind.
|
boolean |
isObligatory()
Am I obligatory?
|
static Set |
profiles(Set elements)
Given a set of profile elements, return a set of profiles that own those elements.
|
void |
setComments(String comments)
Set any comments about me.
|
void |
setDescription(String desc)
Set my long description.
|
void |
setID(String id)
Set my element ID.
|
void |
setMaxOccurrence(int occurrence)
Set how many times I can occur.
|
void |
setName(String name)
Set my name.
|
void |
setObligation(boolean obligatory)
Set whether I'm obligatory.
|
void |
setProfile(Profile profile)
Set the profile to whom I belong.
|
void |
setType(String type)
Set my type.
|
void |
setUnit(String unit)
Set my unit.
|
String |
toString() |
Node |
toXML(Document doc)
Serialize this element as an XML node.
|
Node |
toXMLWithoutValues(Document doc)
Serialize this element as an XML node without any values.
|
protected Profile profile
protected String name
protected String id
protected String desc
protected String type
protected String unit
protected List synonyms
protected boolean obligation
protected int maxOccurrence
protected String comments
protected ProfileElement(Profile profile)
protected ProfileElement(Profile profile, String name, String id, String desc, String type, String unit, List synonyms, boolean obligation, int maxOccurrence, String comments)
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 elementmaxOccurrence
- Maximum number of occurrences of this element.comments
- Any comments about this element.public static ProfileElement createProfileElement(Element root, Profile profile, ObjectFactory factory)
root
- The <profElement> node.profile
- To what profile the element belongs.public int compareTo(Object rhs)
compareTo
in interface Comparable
public Profile getProfile()
public String getName()
public String getID()
public String getDescription()
public String getType()
public String getUnit()
public List getSynonyms()
public boolean isObligatory()
public int getMaxOccurrence()
public String getComments()
public void setProfile(Profile profile)
profile
- The owning profile.public void setName(String name)
name
- My name.public void setID(String id)
id
- My ID.public void setDescription(String desc)
desc
- My long description.public void setType(String type)
type
- My type.public void setUnit(String unit)
unit
- My unit.public void setObligation(boolean obligatory)
obligatory
- True if I am, false otherwise.public void setMaxOccurrence(int occurrence)
occurrence
- How many times I can occur.public void setComments(String comments)
comments
- Any comments.public abstract String getMinValue()
public abstract String getMaxValue()
public abstract List getValues()
String
s).public Node toXML(Document doc) throws DOMException
toXML
in interface Documentable
doc
- The document that will own this node.DOMException
- If an error occurs creating the XML nodes.public Node toXMLWithoutValues(Document doc) throws DOMException
doc
- The document that will own this node.DOMException
- If an error occurs creating the XML nodes.protected abstract boolean isEnumerated()
boolean
value.protected abstract void addValues(Node node) throws DOMException
node
- The node to add to.DOMException
- If an error occurs creating the XML nodes.protected abstract void addElementSpecificProperties(com.hp.hpl.jena.rdf.model.Model model, com.hp.hpl.jena.rdf.model.Resource element, ProfileAttributes profAttr, URI uri)
model
- The model.element
- This element, as an RDF resource.profAttr
- The attributes of the element's profile.public static Document createProfElementDocument()
public static Set profiles(Set elements)
elements
- Profile elements.public static Set elements(Set profiles, Set elements)
profiles
- Profiles.elements
- Profile elements.Copyright © 1999-2014 Apache OODT. All Rights Reserved.