Ejemplo n.º 1
0
	def __init__(self, xmlElement):
		'Set defaults.'
		self.addLayerTemplate = evaluate.getEvaluatedBoolean(False, 'addLayerTemplate', xmlElement)
		self.fileName = evaluate.getEvaluatedString('', 'file', xmlElement)
		self.folderName = evaluate.getEvaluatedString('', 'folder', xmlElement)
		self.suffix = evaluate.getEvaluatedString('', 'suffix', xmlElement)
		self.targets = evaluate.getXMLElementsByKey('target', xmlElement)
		self.writeMatrix = evaluate.getEvaluatedBoolean(True, 'writeMatrix', xmlElement)
		self.xmlElement = xmlElement
Ejemplo n.º 2
0
def processXMLElement(xmlElement):
	"Process the xml element."
	targets = evaluate.getXMLElementsByKey('target', xmlElement )
	if len(targets) < 1:
		print('Warning, processXMLElement in write could not get targets for:')
		print(xmlElement)
		return
	fileNames = []
	for target in targets:
		writeXMLElement(fileNames, target, xmlElement)
Ejemplo n.º 3
0
def processXMLElement(xmlElement):
    "Process the xml element."
    targets = evaluate.getXMLElementsByKey('target', xmlElement)
    if len(targets) < 1:
        print('Warning, processXMLElement in write could not get targets for:')
        print(xmlElement)
        return
    fileNames = []
    for target in targets:
        writeXMLElement(fileNames, target, xmlElement)
Ejemplo n.º 4
0
	def __init__(self, xmlElement):
		"""Set defaults."""
		self.closed = evaluate.getEvaluatedBoolean(True, 'closed', xmlElement)
		self.paths = evaluate.getTransformedPathsByKey([], 'paths', xmlElement)
		vertexTargets = evaluate.getXMLElementsByKey('vertexes', xmlElement)
		for vertexTarget in vertexTargets:
			self.paths.append(vertexTarget.getVertexes())
		self.target = evaluate.getXMLElementByKey('target', xmlElement)
		self.track = evaluate.getEvaluatedBoolean(True, 'track', xmlElement)
		self.visible = evaluate.getEvaluatedBoolean(True, 'visible', xmlElement)
		self.xmlElement = xmlElement
Ejemplo n.º 5
0
def processXMLElementByDerivation(derivation, xmlElement):
	"""Process the xml element by derivation."""
	if derivation is None:
		derivation = BottomDerivation('', xmlElement)
	targets = evaluate.getXMLElementsByKey('target', xmlElement)
	if len(targets) < 1:
		print('Warning, processXMLElement in bottom could not get targets for:')
		print(xmlElement)
		return
	for target in targets:
		bottomXMLElement(derivation, target)
Ejemplo n.º 6
0
	def __init__(self, xmlElement):
		'Set defaults.'
		self.closed = evaluate.getEvaluatedBoolean(True, 'closed', xmlElement)
		self.paths = evaluate.getTransformedPathsByKey([], 'paths', xmlElement)
		vertexTargets = evaluate.getXMLElementsByKey('vertexes', xmlElement)
		for vertexTarget in vertexTargets:
			self.paths.append(vertexTarget.getVertexes())
		self.target = evaluate.getXMLElementByKey('target', xmlElement)
		self.track = evaluate.getEvaluatedBoolean(True, 'track', xmlElement)
		self.visible = evaluate.getEvaluatedBoolean(True, 'visible', xmlElement)
		self.xmlElement = xmlElement
Ejemplo n.º 7
0
def processXMLElementByDerivation(derivation, xmlElement):
    'Process the xml element by derivation.'
    if derivation == None:
        derivation = BottomDerivation('', xmlElement)
    targets = evaluate.getXMLElementsByKey('target', xmlElement)
    if len(targets) < 1:
        print(
            'Warning, processXMLElement in bottom could not get targets for:')
        print(xmlElement)
        return
    for target in targets:
        bottomXMLElement(derivation, target)
Ejemplo n.º 8
0
def processXMLElementByFunctions(geometryFunction, pathFunction, xmlElement):
	'Process the xml element by the appropriate manipulationFunction.'
	targets = evaluate.getXMLElementsByKey('target', xmlElement)
	for target in targets:
		processTargetByFunctions(geometryFunction, pathFunction, target)
Ejemplo n.º 9
0
def processXMLElementByFunction(manipulationFunction, xmlElement):
	'Process the xml element by the manipulationFunction.'
	targets = evaluate.getXMLElementsByKey('target', xmlElement)
	for target in targets:
		processTargetByFunction(manipulationFunction, target)
Ejemplo n.º 10
0
def processXMLElementByFunction(manipulationFunction, xmlElement):
    'Process the xml element by the manipulationFunction.'
    targets = evaluate.getXMLElementsByKey('target', xmlElement)
    for target in targets:
        processTargetByFunction(manipulationFunction, target)