Ejemplo n.º 1
0
    def get_xml_element(self, root="plugin"):
        """
        Return XML Element node representation of the Plugin
        """
        xml_root = AbstractArtifact.get_xml_element(self, root)

        if self.dependencies:
            dep_root = Element("dependencies")
            for d in self.dependencies:
                dep_root.insert(len(dep_root), d.get_xml_element())
            xml_root.insert(len(root), dep_root)

        return xml_root
Ejemplo n.º 2
0
    def get_xml_element(self, root="plugin"):
        """
        Return XML Element node representation of the Plugin
        """
        xml_root = AbstractArtifact.get_xml_element(self, root)

        if self.dependencies:
            dep_root = Element("dependencies")
            for d in self.dependencies:
                dep_root.insert(len(dep_root), d.get_xml_element())
            xml_root.insert(len(root), dep_root)

        return xml_root
Ejemplo n.º 3
0
    def get_xml_element(self, root="dependency"):
        """Return XML Element node representation of this dependency."""
        xml_root = AbstractArtifact.get_xml_element(self, root)

        if not self._default_scope:
            item = SubElement(xml_root, "scope")
            item.text = self.scope

        if not self._default_optional:
            item = SubElement(xml_root, "optional")
            item.text = self.optional

        if self.exclusions:
            exc_root = Element("exclusions")
            for exc in self.exclusions:
                exc_root.insert(len(exc_root), exc.get_xml_element())
            xml_root.insert(len(root), exc_root)

        return xml_root
Ejemplo n.º 4
0
    def get_xml_element(self, root="dependency"):
        """Return XML Element node representation of this dependency."""
        xml_root = AbstractArtifact.get_xml_element(self, root)

        if not self._default_scope:
            item = SubElement(xml_root, "scope")
            item.text = self.scope

        if not self._default_optional:
            item = SubElement(xml_root, "optional")
            item.text = self.optional

        if self.exclusions:
            exc_root = Element("exclusions")
            for exc in self.exclusions:
                exc_root.insert(len(exc_root), exc.get_xml_element())
            xml_root.insert(len(root), exc_root)

        return xml_root
Ejemplo n.º 5
0
    def get_xml_element(self, root="dependency"):
        """
        Return XML Element node representation of the Artifact
        """
        root = AbstractArtifact.get_xml_element(self, root)

        if self.scope:
            item = SubElement(root, "scope")
            item.text = self.scope

        if self.optional:
            item = SubElement(root, "optional")
            item.text = self.optional

        if self.exclusions:
            exc_root = Element("exclusions")
            for e in self.exclusions:
                exc_root.insert(len(exc_root), e.get_xml_element())
            root.insert(len(root), exc_root)

        return root