|
Style Intelligence v12.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectinetsoft.uql.XNode
inetsoft.uql.schema.XTypeNode
public class XTypeNode
A XTypeNode is a type definition. It can be one of the primitive types as defined in the XSchema class. Or it can be a complex type that is composed of children of other types.
| Field Summary | |
|---|---|
static int |
STAR
Specify '*' in the maxOccurs. |
| Fields inherited from class inetsoft.uql.XNode |
|---|
value |
| Constructor Summary | |
|---|---|
XTypeNode()
Create a type node. |
|
XTypeNode(String name)
Create a type node. |
|
| Method Summary | |
|---|---|
void |
addAttribute(XTypeNode attr)
Add an attribute to the type. |
void |
addChild(XNode child,
boolean sorted)
Add a child to this node. |
Object |
clone()
Clone the object. |
XTypeNode |
clone(String type)
Create a primitive type node. |
XTypeNode |
cloneType()
Clone a an output (XTypeNode) node of a datasource. |
int |
compareTo(Object obj)
Compare to another object. |
boolean |
equals(Object obj)
Check if two types are identical. |
XTypeNode |
getAttribute(int idx)
Get the specified attribute. |
int |
getAttributeCount()
Get the number of attributes in this type. |
int |
getAttributeIndex(XTypeNode attr)
Get the index of an attribute. |
protected String |
getAttributeString()
Get additional attributes string. |
XTypeNode |
getAttributeType(String name)
Get the attribute type node with specified name. |
String |
getFormat()
Get the format string of this data type. |
int |
getMaxOccurs()
Get the maximum number of instances allowed for this element. |
int |
getMinOccurs()
Get the minimum number of instances allowed for this element. |
String |
getType()
Get the type of this node. |
XTypeNode |
getTypeNode(String path)
Find the type node specified by the node path. |
XMetaInfo |
getXMetaInfo()
Get the meta info. |
boolean |
isCompatible(XTypeNode type)
Check if two types are compatible. |
boolean |
isDate()
Check if this type is a date or time. |
boolean |
isNumber()
Check if this type is a numeric type. |
boolean |
isPrimitive()
Return true if this is a primitive type. |
boolean |
isTypeNodeExists(XTypeNode tp)
Check if typenode tp is a child node of this type node. |
XNode |
newInstance()
Create a value tree corresponding to the data type defined by this type. |
XNode |
newInstance(boolean children)
Create a value tree corresponding to the data type defined by this type. |
void |
parseXML(Element root)
Parse the XML element that contains information on this data source. |
void |
setAttribute(int index,
XTypeNode attr)
Set an attribute at an index. |
void |
setFormat(String fmt)
Set the format string for the type. |
void |
setMaxOccurs(int max)
Set the maximum number of instances allowed for this element. |
void |
setMinOccurs(int min)
Set the minimum number of instances allowed for this element. |
void |
setXMetaInfo(XMetaInfo minfo)
Set the meta info. |
String |
toString()
Get the string representation. |
protected void |
writeAttributes(PrintWriter writer)
Write the min/max occurs attributes. |
void |
writeTreeXML(PrintWriter writer)
Write this type and all types referenced by this type to XML. |
void |
writeTypeXML(PrintWriter writer)
Write the XML schema specification. |
void |
writeXML(PrintWriter writer)
Write the XML schema specification. |
| Methods inherited from class inetsoft.uql.XNode |
|---|
addChild, addChild, addr, checkDuplicate, cloneValue, eq, getAttribute, getAttributeNames, getChild, getChild, getChildCount, getChildIndex, getDefaultFormat, getName, getNode, getParent, getPath, getPath, getValue, getValue, hashCode, insertChild, isAncestor, removeAllChildren, removeChild, removeChild, removeChild, removeChild, setAttribute, setChild, setDefaultFormat, setName, setValue, sort, sort |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int STAR
| Constructor Detail |
|---|
public XTypeNode()
public XTypeNode(String name)
| Method Detail |
|---|
public XTypeNode getTypeNode(String path)
public void addAttribute(XTypeNode attr)
public void setAttribute(int index,
XTypeNode attr)
index - the specified indexattr - the specified attributepublic int getAttributeCount()
public XTypeNode getAttribute(int idx)
public int getAttributeIndex(XTypeNode attr)
attr - the specified attribute
public XMetaInfo getXMetaInfo()
public void setXMetaInfo(XMetaInfo minfo)
public XTypeNode getAttributeType(String name)
public void setMinOccurs(int min)
public int getMinOccurs()
public void setMaxOccurs(int max)
public int getMaxOccurs()
public void addChild(XNode child,
boolean sorted)
addChild in class XNodechild - child node.sorted - true to add child in sorted order.public XNode newInstance()
public XNode newInstance(boolean children)
children - true if tree should be created with childrenpublic boolean isPrimitive()
public boolean isNumber()
public boolean isDate()
public boolean isCompatible(XTypeNode type)
public void writeTreeXML(PrintWriter writer)
public boolean isTypeNodeExists(XTypeNode tp)
public void parseXML(Element root)
parseXML in interface inetsoft.util.XMLSerializablepublic void writeTypeXML(PrintWriter writer)
public void writeXML(PrintWriter writer)
writeXML in interface inetsoft.util.XMLSerializablewriteXML in class XNodeprotected void writeAttributes(PrintWriter writer)
protected String getAttributeString()
public String getType()
public void setFormat(String fmt)
public String getFormat()
public String toString()
toString in class XNodepublic int compareTo(Object obj)
compareTo in interface ComparablecompareTo in class XNodeobj - the object with which to compare.
public XTypeNode cloneType()
throws Exception
Exceptionpublic Object clone()
clone in class XNodepublic XTypeNode clone(String type)
type - one of the primitive types defined in XSchema.public boolean equals(Object obj)
equals in class XNode
|
Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||