How to use the pdb2pqr.contrib.ZSI-21-a1.ZSI.wstools.XMLSchema.Annotation function in pdb2pqr

To help you get started, we’ve selected a few pdb2pqr examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Electrostatics / apbs-pdb2pqr / pdb2pqr / contrib / ZSI-2.1-a1 / ZSI / wstools / XMLSchema.py View on Github external
def fromDom(self, node):
        self.setAttributes(node)
        contents = self.getContents(node)
      
        indx = 0
        num = len(contents)
        if not num:
            return

        component = SplitQName(contents[indx].getTagName())[1]
        if component == 'annotation':
            self.annotation = Annotation(self)
            self.annotation.fromDom(contents[indx])
            indx += 1
            component = SplitQName(contents[indx].getTagName())[1]

        self.content = None
        if component == 'simpleContent':
            self.content = self.__class__.SimpleContent(self)
            self.content.fromDom(contents[indx])
        elif component == 'complexContent':
            self.content = self.__class__.ComplexContent(self)
            self.content.fromDom(contents[indx])
        else:
            if component == 'all':
                self.content = All(self)
            elif component == 'choice':
                self.content = Choice(self)
github Electrostatics / apbs-pdb2pqr / pdb2pqr / contrib / ZSI-2.1-a1 / ZSI / wstools / XMLSchema.py View on Github external
def fromDom(self, node):
        self.annotation = None
        self.setAttributes(node)
        for i in self.getContents(node):
            component = SplitQName(i.getTagName())[1]
            if component in self.__class__.contents['xsd']:
                if component == 'annotation' and not self.annotation:
                    self.annotation = Annotation(self)
                    self.annotation.fromDom(i)
                else:
                    raise SchemaError, 'Unknown component (%s)' %(i.getTagName())
github Electrostatics / apbs-pdb2pqr / pdb2pqr / contrib / ZSI-2.1-a1 / ZSI / wstools / XMLSchema.py View on Github external
def fromDom(self, node):
            self.setAttributes(node)
            contents = self.getContents(node)

            for i in contents:
                component = SplitQName(i.getTagName())[1]
                if component in self.__class__.contents['xsd']:
                    if component == 'annotation' and not self.annotation:
                        self.annotation = Annotation(self)
                        self.annotation.fromDom(i)
                    else:
                        raise SchemaError, 'Unknown component (%s)' %(i.getTagName())
                else:
                    raise SchemaError, 'Unknown component (%s)' %(i.getTagName())
github Electrostatics / apbs-pdb2pqr / pdb2pqr / contrib / ZSI-2.1-a1 / ZSI / wstools / XMLSchema.py View on Github external
def fromDom(self, node):
                self.setAttributes(node)
                contents = self.getContents(node)

                indx = 0
                num = len(contents)

                if num:
                    component = SplitQName(contents[indx].getTagName())[1]
                    if component == 'annotation':
                        self.annotation = Annotation(self)
                        self.annotation.fromDom(contents[indx])
                        indx += 1
                        component = SplitQName(contents[indx].getTagName())[1]
    
                content = []
                while indx < num:
                    component = SplitQName(contents[indx].getTagName())[1]
                    if component == 'attribute':
                        if contents[indx].hasattr('ref'):
                            content.append(AttributeReference(self))
                        else:
                            content.append(LocalAttributeDeclaration(self))
                    elif component == 'attributeGroup':
                        content.append(AttributeGroupReference(self))
                    elif component == 'anyAttribute':
                        content.append(AttributeWildCard(self))
github Electrostatics / apbs-pdb2pqr / pdb2pqr / contrib / ZSI-2.1-a1 / ZSI / wstools / XMLSchema.py View on Github external
def fromDom(self, node):
        """ No list or union support
        """
        self.setAttributes(node)
        contents = self.getContents(node)

        for i in contents:
            component = SplitQName(i.getTagName())[1]
            if component == 'annotation' and not self.annotation:
                self.annotation = Annotation(self)
                self.annotation.fromDom(i)
            elif component == 'simpleType':
                self.content = AnonymousSimpleType(self)
                self.content.fromDom(i)
            else:
                raise SchemaError, 'Unknown component (%s)' %(i.getTagName())
github Electrostatics / apbs-pdb2pqr / pdb2pqr / contrib / ZSI-2.1-a1 / ZSI / wstools / XMLSchema.py View on Github external
def fromDom(self, node):
        self.setAttributes(node)
        contents = self.getContents(node)
        content = []

        for i in contents:
            component = SplitQName(i.getTagName())[1]
            if component in self.__class__.contents['xsd']:
                if component == 'annotation' and not self.annotation:
                    self.annotation = Annotation(self)
                    self.annotation.fromDom(i)
                    continue
                elif component == 'element':
                    if i.hasattr('ref'):
                        content.append(ElementReference(self))
                    else:
                        content.append(LocalElementDeclaration(self))
                elif component == 'group':
                    content.append(ModelGroupReference(self))
                elif component == 'choice':
                    content.append(Choice(self))
                elif component == 'sequence':
                    content.append(Sequence(self))
                elif component == 'any':
                    content.append(ElementWildCard(self))
                else:
github Electrostatics / apbs-pdb2pqr / pdb2pqr / contrib / ZSI-2.1-a1 / ZSI / wstools / XMLSchema.py View on Github external
def fromDom(self, node):
            self.setAttributes(node)
            contents = self.getContents(node)

            if self.attributes['namespace'] == self.getTargetNamespace():
                raise SchemaError, 'namespace of schema and import match'

            for i in contents:
                component = SplitQName(i.getTagName())[1]
                if component == 'annotation' and not self.annotation:
                    self.annotation = Annotation(self)
                    self.annotation.fromDom(i)
                else:
                    raise SchemaError, 'Unknown component (%s)' %(i.getTagName())
github Electrostatics / apbs-pdb2pqr / pdb2pqr / contrib / ZSI-2.1-a1 / ZSI / wstools / XMLSchema.py View on Github external
def fromDom(self, node):
        self.setAttributes(node)
        contents = self.getContents(node)
        content = []

        for i in contents:
            component = SplitQName(i.getTagName())[1]
            if component in self.__class__.contents['xsd']:
                if component == 'annotation' and not self.annotation:
                    self.annotation = Annotation(self)
                    self.annotation.fromDom(i)
                    continue
                elif component == 'element':
                    if i.hasattr('ref'):
                        content.append(ElementReference(self))
                    else:
                        content.append(LocalElementDeclaration(self))
                else:
                    raise SchemaError, 'Unknown component (%s)' %(i.getTagName())
                content[-1].fromDom(i)
            else:
                raise SchemaError, 'Unknown component (%s)' %(i.getTagName())
        self.content = tuple(content)
github Electrostatics / apbs-pdb2pqr / pdb2pqr / contrib / ZSI-2.1-a1 / ZSI / wstools / XMLSchema.py View on Github external
def fromDom(self, node):
        self.setAttributes(node)
        contents = self.getContents(node)

        for i in contents:
            component = SplitQName(i.getTagName())[1]
            if component == 'annotation' and not self.annotation:
                self.annotation = Annotation(self)
                self.annotation.fromDom(i)
            else:
                raise SchemaError, 'Unknown component (%s)' %(i.getTagName())
github Electrostatics / apbs-pdb2pqr / pdb2pqr / contrib / ZSI-2.1-a1 / ZSI / wstools / XMLSchema.py View on Github external
def fromDom(self, node):
            self.annotation = None
            self.content = None
            self.setAttributes(node)
            contents = self.getContents(node)
            for indx in range(len(contents)):
                component = SplitQName(contents[indx].getTagName())[1]
                if (component == 'annotation') and (not indx):
                    self.annotation = Annotation(self)
                    self.annotation.fromDom(contents[indx])
                elif (component == 'simpleType'):
                    self.content = AnonymousSimpleType(self)
                    self.content.fromDom(contents[indx])
                    break
                else:
                    raise SchemaError, 'Unknown component (%s)' %(i.getTagName())