public abstract class XFTField extends XFTNode implements Identifier
Modifier and Type | Field and Description |
---|---|
static Comparator |
SequenceComparator |
Constructor and Description |
---|
XFTField() |
Modifier and Type | Method and Description |
---|---|
void |
addChildField(XFTField xf)
Inserts the XFTField into this field's collection of children.
|
static XFTField |
AddField(Node node,
String header,
XFTNode parent,
String prefix,
XFTSchema s)
Returns one created XFTField or null.
|
static XFTField |
AddField(Node node,
String header,
XFTNode parent,
String prefix,
XFTSchema s,
boolean allowMaxOccursElement)
Returns one created XFTField or null.
|
abstract XFTField |
clone(XFTElement s,
boolean accessLayers) |
String |
displayAttribute()
'Attribute:' if it is an attribute, otherwise 'Element:'
|
String |
getBaseCol()
name of the field which this field relates to.
|
String |
getBaseElement()
dot Syntax specification of the element which this field relates to.
|
Hashtable |
getChildFields() |
String |
getDescription() |
String |
getDisplayName()
Display label for this field
|
static int |
GetElementCount(Node n,
String prefix)
recursive method which counts the number of elements and attributes in this node.
|
String |
getExpose() |
static Hashtable |
GetFields(Node node,
String header,
XFTNode parent,
String prefix,
XFTSchema s)
Searches the XML DOM Node for elements and attributes to turn into XFTFields.
|
String |
getFinalSqlName() |
String |
getFixed() |
String |
getFullName()
If this field is the child of another XFTField, then that parent's xml name
will be joined to this field's xml name to create a 'full' name.
|
String |
getMaxOccurs() |
String |
getMinOccurs() |
abstract String |
getName() |
boolean |
getPreventLoop() |
static String |
GetRefName(Node n,
String prefix,
XFTSchema s)
recursive method which gets the name of the first referenced element.
|
XFTRelation |
getRelation() |
String |
getRequired() |
XFTRule |
getRule()
(never null)
|
int |
getSequence()
sequence in relation to other fields at this level in this element.
|
String |
getSize() |
ArrayList |
getSortedFields()
ArrayList of XFTField children ordered by sequence
|
XFTSqlField |
getSqlField()
(never null)
|
String |
getUnique() |
String |
getUniqueComposite() |
String |
getUse() |
XFTWebAppField |
getWebAppField()
(never null)
|
String |
getXmlDisplay()
'always','never' or 'root' (only displayed when parent element is root element)
|
String |
getXmlOnly()
if this field is displayed in XML only (not in SQL)
|
abstract XMLType |
getXMLType() |
static Hashtable |
HandleComplexType(Node node,
String header,
XFTNode parent,
String prefix,
XFTSchema s)
Returns a hashtable of XFTFields (key=XFTField.getName(),value=XFTField)
Checks for child nodes of type complexType, element, attribute, sequence, choice, all, group, simpleContent, attributeGroup. |
boolean |
hasAttributes()
If field has children which ARE attributes, then true, else false.
|
boolean |
hasBase() |
boolean |
hasChildren()
If field has children which ARE NOT attributes, then true, else false.
|
boolean |
isAttribute()
whether or not this field is an XML attribute.
|
boolean |
isExtension()
if field is an extension of the parent element which was a created child.
|
boolean |
isFilter() |
boolean |
isLocalMap() |
boolean |
isOnlyRoot() |
boolean |
isPossibleLoop() |
static boolean |
IsRefOnly(Node n,
String prefix,
XFTSchema s)
recursive method which checks to see if this Node is more than a single reference to another node.
|
void |
setAttribute(boolean b) |
void |
setBaseCol(String string)
name of the field which this field relates to.
|
void |
setBaseElement(String string)
dot Syntax specification of the element which this field relates to.
|
void |
setChildFields(Hashtable hashtable)
key = XFTField.getName(),value = XFTField
|
void |
setDescription(String string) |
void |
setDisplayName(String string) |
void |
setExpose(String string) |
void |
setExtension(boolean b)
if field is an extension of the parent element which was a created child.
|
void |
setFilter(boolean filter) |
void |
setFinalSqlName(String sqlName) |
void |
setFixed(String string) |
void |
setFullName(String string)
removes the first character if it is '_'
|
void |
setLocalMap(boolean localMap) |
void |
setMaxOccurs(String i) |
void |
setMinOccurs(String i) |
abstract void |
setName(String string) |
void |
setOnDelete(String s) |
void |
setOnlyRoot(boolean onlyRoot) |
void |
setPossibleLoop(boolean possibleLoop) |
void |
setPreventLoop(boolean preventLoop) |
void |
setPrimaryKey(String s) |
void |
setRelation(XFTRelation relation) |
void |
setRequired(String string) |
void |
setRule(XFTRule rule) |
void |
setSequence(int i)
sequence in relation to other fields at this level in this element.
|
void |
setSize(String i) |
void |
setSqlField(XFTSqlField field) |
void |
setUnique(String string) |
void |
setUniqueComposite(String string) |
void |
setUse(String string) |
void |
setWebAppField(XFTWebAppField field) |
void |
setXmlDisplay(String string)
'always','never' or 'root' (only displayed when parent element is root element)
|
void |
setXmlOnly(String string)
if this field is displayed in XML only (not in SQL)
|
abstract void |
setXMLType(XMLType type) |
abstract String |
toString(String header) |
abstract Node |
toXML(Document doc) |
getAbsoluteParent, getParent, getParentElement, hasParent, setParent
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getId
public static final Comparator SequenceComparator
public boolean isOnlyRoot()
public void setOnlyRoot(boolean onlyRoot)
public boolean isLocalMap()
public void setLocalMap(boolean localMap)
localMap
- The localMap to set.public String getDescription()
public String getDisplayName()
public String getFixed()
public String getMaxOccurs()
public String getMinOccurs()
public String getSize()
public String getUse()
public void setDescription(String string)
string
- public void setDisplayName(String string)
string
- public void setFixed(String string)
string
- public void setMaxOccurs(String i)
i
- public void setMinOccurs(String i)
i
- public void setSize(String i)
i
- public void setUse(String string)
string
- public XFTRule getRule()
public XFTSqlField getSqlField()
public XFTWebAppField getWebAppField()
public void setRule(XFTRule rule)
rule
- public void setSqlField(XFTSqlField field)
field
- public void setWebAppField(XFTWebAppField field)
field
- public int getSequence()
public void setSequence(int i)
i
- public void setOnDelete(String s)
public abstract String getName()
public boolean isAttribute()
public void setAttribute(boolean b)
b
- public static Hashtable GetFields(Node node, String header, XFTNode parent, String prefix, XFTSchema s)
node
- Node to searchheader
- Used to add parent field names to child full names.parent
- XFTField or XFTElementprefix
- XMLNS prefixs
- owner Schemapublic Hashtable getChildFields()
public void addChildField(XFTField xf)
xf
- public void setChildFields(Hashtable hashtable)
hashtable
- public String displayAttribute()
public String getFullName()
public void setFullName(String string)
string
- public void setPrimaryKey(String s)
public XFTRelation getRelation()
public void setRelation(XFTRelation relation)
relation
- public ArrayList getSortedFields()
public String getExpose()
public String getRequired()
public String getUnique()
public String getUniqueComposite()
public void setExpose(String string)
string
- public void setRequired(String string)
string
- public void setUnique(String string)
string
- public void setUniqueComposite(String string)
string
- public boolean hasChildren()
public boolean hasAttributes()
public String getXmlOnly()
public void setXmlOnly(String string)
string
- public String getBaseCol()
public String getBaseElement()
public void setBaseCol(String string)
string
- public void setBaseElement(String string)
string
- public boolean hasBase()
public static int GetElementCount(Node n, String prefix)
n
- Node to searchprefix
- XMLNS prefixpublic static boolean IsRefOnly(Node n, String prefix, XFTSchema s)
n
- Node to searchprefix
- XMLNSs
- parent schemapublic static String GetRefName(Node n, String prefix, XFTSchema s)
n
- Node to searchprefix
- XMLNSs
- parent schemapublic static Hashtable HandleComplexType(Node node, String header, XFTNode parent, String prefix, XFTSchema s)
node
- Node to searchheader
- from parent fieldsparent
- XFTField or XFTElementprefix
- XMLNSs
- parent schemapublic static XFTField AddField(Node node, String header, XFTNode parent, String prefix, XFTSchema s)
node
- Node to addheader
- header of parent fieldsparent
- XFTField or XFTElementprefix
- XMLNSs
- parent schemapublic static XFTField AddField(Node node, String header, XFTNode parent, String prefix, XFTSchema s, boolean allowMaxOccursElement)
node
- Node to addheader
- header of parent fieldsparent
- XFTField or XFTElementprefix
- XMLNSs
- parent schemapublic abstract XMLType getXMLType()
public abstract void setXMLType(XMLType type)
type
- public abstract void setName(String string)
string
- public boolean isExtension()
public void setExtension(boolean b)
b
- public String getXmlDisplay()
public void setXmlDisplay(String string)
string
- public boolean isFilter()
public void setFilter(boolean filter)
filter
- The filter to set.public String getFinalSqlName()
public void setFinalSqlName(String sqlName)
sqlName
- The _finalSqlName to set.public abstract XFTField clone(XFTElement s, boolean accessLayers)
public boolean getPreventLoop()
public void setPreventLoop(boolean preventLoop)
preventLoop
- the preventLoop to setpublic boolean isPossibleLoop()
public void setPossibleLoop(boolean possibleLoop)
possibleLoop
- the possibleLoop to setCopyright © 2015 Neuroinformatics Research Group. All rights reserved.