Data elements compose the Data Modle. This is the base class for
String, Number, Block, Template, etc.
When iterating over the Peach DOM if an element isinstance(obj,
DataElement) it is part of a data model.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getFullnameInDataModel(self)
This will get fully qualified name of this element starting with the
root node of the data model. |
source code
|
|
|
|
|
|
DataElement
|
|
|
|
_findArrayByName(self,
node,
name)
A generator that returns each instance of name in a data model. |
source code
|
|
|
DataElement
|
|
|
DataElement
|
|
|
|
_findAllBlocksGoingUp(self)
Generator that locates all blocks by walking up our tree. |
source code
|
|
|
|
_findDataElementByName(self,
node,
name)
A generator that returns each instance of name in a data model. |
source code
|
|
|
|
_checkDottedName(self,
node,
names)
Internal helper method, not for use! |
source code
|
|
|
|
getRelationOfThisElement(self)
Locate and return a relation of this element. |
source code
|
|
|
|
_genRelationsInDataModelFromHere(self,
node=None)
Instead of returning all relations starting with root we will walk up
looking for relations. |
source code
|
|
|
|
_getAllRelationsInDataModel(self,
node=None,
history=None)
Generator that gets all relations in data model. |
source code
|
|
|
|
isArray(self)
Check if this data element is part of an array. |
source code
|
|
|
|
getArrayCount(self)
Return number of elements in array. |
source code
|
|
|
|
getArrayElementAt(self,
num)
Return array element at position num. |
source code
|
|
|
|
|
|
|
|
|
string or number
|
|
|
|
getRawValue(self)
Get the value of this data element pre-transformers. |
source code
|
|
|
|
getValue(self)
Get the value of this data element. |
source code
|
|
|
|
setDefaultValue(self,
value)
Set the default value for this data element. |
source code
|
|
|
|
setValue(self,
value)
Set the current value for this data element |
source code
|
|
|
|
reset(self)
Reset the value of this data element back to the default. |
source code
|
|
|
|
resetDataModel(self,
node=None)
Reset the entire data model. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
Inherited from ElementWithChildren:
__contains__,
__delitem__,
__getitem__,
__iter__,
__len__,
__setitem__,
append,
firstChild,
genElementsByType,
has_key,
index,
insert,
lastChild,
printDomMap,
setDefaults,
toXmlDom,
updateFromXmlDom,
verifyDomMap
Inherited from Element:
copy,
getFullDataName,
getFullname,
getRoot,
hasChildNode,
nextSibling,
previousSibling
|
|
|
onArrayNext
Event that occurs prior to parsing the next array element.
|
|
|
transformer
Transformers to apply
|
|
|
fixup
Fixup if any
|
|
|
relations
Relations this element has
|
|
|
_minOccurs
Minimum occurences
|
|
|
_maxOccurs
Maximum occurences
|
|
|
defaultValue
Default value to use
|
|
|
currentValue
Override default value
|
|
|
value
Current value
|
|
|
when
Expression used by data cracker to determin if element should be
included in cracking.
|
|
|
_inInternalValue
Used to prevent recursion
|
|
|
array
Name of array.
|
|
|
arrayPosition
Our position in the array.
|
|
|
arrayMinOccurs
The min occurences in the array
|
|
|
arrayMaxOccurs
The max occurences in the array
|
|
|
pos
Position in data stream item was parsed at
|
|
|
rating
Parse rating for element
|
|
|
isStatic
Is this element a static token?
|
|
|
relationStringBuffer
A StringBuffer used to determin offset relations
|
|
Inherited from ElementWithChildren:
children
Inherited from Element:
elementType,
hasChildren,
name,
node,
parent,
ref
|