def __init__(self, doc, uri, ptr=None): ## The SWIGPython-libSBOLc object wrapped by this DNAComponent self.ptr = None if not ptr: # create the C object if it doesn't exist already self.ptr = libsbol.createDNAComponent(doc.ptr, uri) else: # wrap a C object if it already exists, necessary for input from file self.ptr = ptr if self.ptr == None: raise URIError("Duplicate URI '%s'" % uri) # register the Python proxy ## the Document to which this component belongs self.doc = doc self.doc._components.append(self) # finish the Python proxy fns = (libsbol.getSequenceAnnotationURI, libsbol.addSequenceAnnotation, libsbol.removeSequenceAnnotationFromDNAComponent, libsbol.getNumSequenceAnnotationsFor, libsbol.getNthSequenceAnnotationFor) ## Zero or more values of type SequenceAnnotation. This property links # to SequenceAnnotation instances, each of which specifies the position # and strand orientation of a DnaComponent that describes a subComponent # of this DNA component. self.annotations = ExtendableSBOLObjectArray(self, *fns) ## Zero or more values of type SequenceAnnotation.
def __init__(self, doc, uri, ptr=None): ## The SWIGPython-libSBOLc object wrapped by this DNAComponent self.ptr = None if not ptr: # create the C object if it doesn't exist already self.ptr = libsbol.createDNAComponent(doc.ptr, uri) else: # wrap a C object if it already exists, necessary for input from file self.ptr = ptr if self.ptr == None: raise URIError("Duplicate URI '%s'" % uri) # register the Python proxy ## the Document to which this component belongs self.doc = doc self.doc._components.append(self) # finish the Python proxy fns = (libsbol.getSequenceAnnotationURI, libsbol.addSequenceAnnotation, libsbol.removeSequenceAnnotationFromDNAComponent, libsbol.getNumSequenceAnnotationsFor, libsbol.getNthSequenceAnnotationFor) ## Zero or more values of type SequenceAnnotation. This property links # to SequenceAnnotation instances, each of which specifies the position # and strand orientation of a DnaComponent that describes a subComponent # of this DNA component. self.annotations = ExtendableSBOLObjectArray( self, *fns) ## Zero or more values of type SequenceAnnotation.
def __init__(self, doc, uri): # create the C object self.ptr = libsbol.createDNAComponent(doc.ptr, uri) if self.ptr == None: raise URIError("Duplicate URI '%s'" % uri) # register the Python proxy self.doc = doc self.doc._components.append(self) # finish the Python proxy fns = (libsbol.addSequenceAnnotation, libsbol.getNumSequenceAnnotationsFor, libsbol.getNthSequenceAnnotationFor) self.annotations = ExtendableSBOLObjectArray(self, *fns)