Beispiel #1
0
    def generateChildElements (self) :
        elements = self.element.elements.sub_nodes

        for element in elements:
            elementType = element._name
            self.generated.initFunction += "\n"

            if elementType == "action" :
                action = aw.Action(self.generated, element, (self.parentObjectPath + self.objectPathSuffix), self.languageSetName)
                action.generate()
            elif elementType == "container" :
                container = Container(self.generated, element, (self.parentObjectPath + self.objectPathSuffix), self.languageSetName)
                container.generate()
            elif elementType == "scalarProperty" or elementType == "stringProperty" or elementType == "booleanProperty" :
                propertyW = pw.Property(self.generated, element, (self.parentObjectPath + self.objectPathSuffix), self.languageSetName)
                propertyW.generate()
            elif elementType == "dateProperty" or elementType == "timeProperty" :
                propertyW = pw.Property(self.generated, element, (self.parentObjectPath + self.objectPathSuffix), self.languageSetName)
                propertyW.generate()
            elif elementType == "labelProperty" :
                label = lw.Label(self.generated, element, (self.parentObjectPath + self.objectPathSuffix), self.languageSetName)
                label.generate()
            else :
                print >> sys.stderr, "ERROR - This type is not supported. Exiting " + elementType
                sys.exit(3)
    def generateChildElements (self) :
        containerChild = self.element.recordContainer
        containerName = containerChild.name
        recordNameChild = self.element.recordName

        propertyW = pw.Property(self.generated, recordNameChild, (self.parentObjectPath + self.objectPathSuffix + "/" + containerName), self.languageSetName)
        propertyW.generate()

        container = cw.Container(self.generated, containerChild, (self.parentObjectPath + self.objectPathSuffix), self.languageSetName)
        container.generate()