|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.ibm.di.connector.maximo.parsing.SchemaElement
public final class SchemaElement
This class represents the structural elements that compose a schema object and contains all the metadata.
Schema,
SchemaConfiguration| Method Summary | |
|---|---|
void |
addChild(SchemaElement child)
Adds a child schema element. |
static SchemaElement |
buildElement(SchemaElement parent,
java.lang.String name,
boolean attribute,
boolean uniqueKey)
Builds a schema element object. |
static SchemaElement |
buildRootElement(java.lang.String name)
Builds a root schema element object. |
boolean |
containsChild(java.lang.String name)
Returns true if this schema element contains a child element for the specified name. |
java.lang.StringBuilder |
dumpElements(java.lang.StringBuilder b)
Dumps all the structure in a StringBuilder object. |
java.lang.StringBuilder |
dumpElements(java.lang.StringBuilder b,
java.lang.String tabs,
boolean inclAttributes)
Dumps all the structure in a StringBuilder object (not including
attributes) |
SchemaElement |
getChild(java.lang.String name)
Returns the child schema element for the specified name. |
java.util.List<SchemaElement> |
getChildren()
Returns a list of all schema element children. |
java.lang.String |
getClassName()
Returns this schema element's class name. |
java.lang.String |
getEntryPathRelativeTo(SchemaElement e)
Returns a String object representing the path to this schema
element in the context of hierarchical entry. |
SchemaElement |
getFirstChild()
Returns the first child schema element. |
java.lang.String |
getName()
Returns this schema element's name. |
SchemaElement |
getParent()
Returns the parent element. |
java.lang.String |
getPath()
Returns a String object representing the path to this schema
element starting from the root element. |
java.lang.String |
getPathRelativeTo(SchemaElement e)
Returns a String object representing the path to this schema
element in the hierarchical structure. |
java.lang.Integer |
getSize()
Returns this schema element's maximum size. |
java.util.List<SchemaElement> |
getUniqueKeyList()
Returns a list of elements defined as unique key. |
boolean |
isAttribute()
Indicates if this schema element represents an XML attribute. |
boolean |
isMboDefinition()
Indicates if this element represents a MBO definition (i.e if at least one child is not an attribute). |
boolean |
isUniqueKey()
Indicates if this element represents an unique key. |
void |
setClassName(java.lang.String className)
Defines this schema element's class name. |
void |
setSize(java.lang.Integer size)
Defines this schema element's maximum size. |
java.lang.String |
toString()
|
java.lang.String |
toString(java.lang.Object value)
Returns a String object representing the specified value
, according to this schema element's class name. |
java.lang.Object |
valueOf(java.lang.String value)
Converts the specified String value, according to this
schema element's class name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static SchemaElement buildElement(SchemaElement parent,
java.lang.String name,
boolean attribute,
boolean uniqueKey)
parent - parent schema elementname - schema element's nameattribute - true if this schema element represents an XSD
attribute, otherwise falseuniqueKey - true if this element represents an unique key,
otherwise false
public static SchemaElement buildRootElement(java.lang.String name)
name - schema element's name
public void addChild(SchemaElement child)
child - child schema elementpublic boolean containsChild(java.lang.String name)
name - name whose presence in this schema element is to be tested
public java.lang.StringBuilder dumpElements(java.lang.StringBuilder b)
StringBuilder object.
b - StringBuilder where the structure will be dumped
StringBuilder with the dumped structure
public java.lang.StringBuilder dumpElements(java.lang.StringBuilder b,
java.lang.String tabs,
boolean inclAttributes)
StringBuilder object (not including
attributes)
b - StringBuilder where the structure will be dumped
StringBuilder with the dumped structurepublic SchemaElement getChild(java.lang.String name)
DocRoot@com.ibm.maximo@UpdateMXASSET@MXASSETSet@ASSET#relationship
, where relationship is an attribute name and the rest is
the path.
name - name whose associated child is to be returned
containsChild(String)public java.util.List<SchemaElement> getChildren()
public java.lang.String getClassName()
public SchemaElement getFirstChild()
public java.lang.String getName()
public SchemaElement getParent()
public java.lang.String getPath()
String object representing the path to this schema
element starting from the root element.
String object representing the path to this schema
elementgetPathRelativeTo(SchemaElement),
getEntryPathRelativeTo(SchemaElement)public java.lang.String getPathRelativeTo(SchemaElement e)
String object representing the path to this schema
element in the hierarchical structure.
Below is a sample structure of schema elements.
root (root) | +--child_A (root@child_A) | | | +--child_A1 (root@child_A@child_A1) | +--child_B (root@child_B)
Between parentheses is the resulting path to the respective schema element starting from the root.
e - element from which the path representation will be built
String object representing the path to this schema
elementpublic java.lang.String getEntryPathRelativeTo(SchemaElement e)
String object representing the path to this schema
element in the context of hierarchical entry.
Below is a sample structure of schema elements.
root (root) | +--child1 (root.child1) | | | +--child11 (root.child1.child11) | +--child2 (root.child2)
Between parentheses is the resulting path to the respective element starting from the root.
e - element from which the path representation will be built
String object representing the path to this schema
elementpublic java.lang.Integer getSize()
public java.util.List<SchemaElement> getUniqueKeyList()
public boolean isAttribute()
true if this schema element represents an XSD
attribute, otherwise falsepublic boolean isMboDefinition()
true if this element represents a MBO definition,
otherwise falsepublic boolean isUniqueKey()
true if this element represents an unique key,
otherwise falsepublic void setClassName(java.lang.String className)
Any class name is acceptable, but only these can be used in type conversion and validation:
If the class name is different than those, it will be treated as
java.lang.String.
className - this schema element's class namevalueOf(String),
#toString(Object, boolean)public void setSize(java.lang.Integer size)
size - this schema element's maximum sizepublic java.lang.String toString()
toString in class java.lang.Object
public java.lang.String toString(java.lang.Object value)
throws MxConnTypeConvertionException
String object representing the specified value
, according to this schema element's class name.
value - value to be converted
String object representing the specified value,
or null if value is null
MxConnTypeConvertionException - if the specified value can not be converted
public java.lang.Object valueOf(java.lang.String value)
throws MxConnTypeConvertionException
String value, according to this
schema element's class name.
value - value to be converted
MxConnTypeConvertionException - if the specified value can not be converted
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||