|
|||||||||||
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,
String name,
boolean attribute,
boolean uniqueKey)
Builds a schema element object. |
static SchemaElement |
buildRootElement(String name)
Builds a root schema element object. |
boolean |
containsChild(String name)
Returns true if this schema element contains a child element for the specified name. |
StringBuilder |
dumpElements(StringBuilder b)
Dumps all the structure in a StringBuilder object. |
StringBuilder |
dumpElements(StringBuilder b,
String tabs,
boolean inclAttributes)
Dumps all the structure in a StringBuilder object (not including
attributes) |
SchemaElement |
getChild(String name)
Returns the child schema element for the specified name. |
List<SchemaElement> |
getChildren()
Returns a list of all schema element children. |
String |
getClassName()
Returns this schema element's class name. |
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. |
String |
getName()
Returns this schema element's name. |
SchemaElement |
getParent()
Returns the parent element. |
String |
getPath()
Returns a String object representing the path to this schema
element starting from the root element. |
String |
getPathRelativeTo(SchemaElement e)
Returns a String object representing the path to this schema
element in the hierarchical structure. |
Integer |
getSize()
Returns this schema element's maximum size. |
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(String className)
Defines this schema element's class name. |
void |
setSize(Integer size)
Defines this schema element's maximum size. |
String |
toString()
|
String |
toString(Object value)
Returns a String object representing the specified value
, according to this schema element's class name. |
Object |
valueOf(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, String name, boolean attribute, boolean uniqueKey)
parent
- parent schema elementname
- schema element's nameattribute
- true
if this schema element represents an XSD
attribute, otherwise false
uniqueKey
- true
if this element represents an unique key,
otherwise false
public static SchemaElement buildRootElement(String name)
name
- schema element's name
public void addChild(SchemaElement child)
child
- child schema elementpublic boolean containsChild(String name)
name
- name whose presence in this schema element is to be tested
public StringBuilder dumpElements(StringBuilder b)
StringBuilder
object.
b
- StringBuilder
where the structure will be dumped
StringBuilder
with the dumped structurepublic StringBuilder dumpElements(StringBuilder b, String tabs, boolean inclAttributes)
StringBuilder
object (not including
attributes)
b
- StringBuilder
where the structure will be dumped
StringBuilder
with the dumped structurepublic SchemaElement getChild(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 List<SchemaElement> getChildren()
public String getClassName()
public SchemaElement getFirstChild()
public String getName()
public SchemaElement getParent()
public 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 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 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 Integer getSize()
public List<SchemaElement> getUniqueKeyList()
public boolean isAttribute()
true
if this schema element represents an XSD
attribute, otherwise false
public boolean isMboDefinition()
true
if this element represents a MBO definition,
otherwise false
public boolean isUniqueKey()
true
if this element represents an unique key,
otherwise false
public void setClassName(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(Integer size)
size
- this schema element's maximum sizepublic String toString()
toString
in class Object
public String toString(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 convertedpublic Object valueOf(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 |