# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.10
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from __future__ import absolute_import
from sys import version_info as _swig_python_version_info
if _swig_python_version_info >= (2, 7, 0):
def swig_import_helper():
import importlib
pkg = __name__.rpartition('.')[0]
mname = '.'.join((pkg, '_libsbol')).lstrip('.')
try:
return importlib.import_module(mname)
except ImportError:
return importlib.import_module('_libsbol')
_libsbol = swig_import_helper()
del swig_import_helper
elif _swig_python_version_info >= (2, 6, 0):
def swig_import_helper():
from os.path import dirname
import imp
fp = None
try:
fp, pathname, description = imp.find_module('_libsbol', [dirname(__file__)])
except ImportError:
import _libsbol
return _libsbol
if fp is not None:
try:
_mod = imp.load_module('_libsbol', fp, pathname, description)
finally:
fp.close()
return _mod
_libsbol = swig_import_helper()
del swig_import_helper
else:
import _libsbol
del _swig_python_version_info
try:
_swig_property = property
except NameError:
pass # Python < 2.2 doesn't have 'property'.
try:
import builtins as __builtin__
except ImportError:
import __builtin__
def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
if (name == "thisown"):
return self.this.own(value)
if (name == "this"):
if type(value).__name__ == 'SwigPyObject':
self.__dict__[name] = value
return
method = class_type.__swig_setmethods__.get(name, None)
if method:
return method(self, value)
if (not static):
if _newclass:
object.__setattr__(self, name, value)
else:
self.__dict__[name] = value
else:
raise AttributeError("You cannot add attributes to %s" % self)
def _swig_setattr(self, class_type, name, value):
return _swig_setattr_nondynamic(self, class_type, name, value, 0)
def _swig_getattr(self, class_type, name):
if (name == "thisown"):
return self.this.own()
method = class_type.__swig_getmethods__.get(name, None)
if method:
return method(self)
raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))
def _swig_repr(self):
try:
strthis = "proxy of " + self.this.__repr__()
except __builtin__.Exception:
strthis = ""
return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
try:
_object = object
_newclass = 1
except __builtin__.Exception:
class _object:
pass
_newclass = 0
class SwigPyIterator(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, SwigPyIterator, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, SwigPyIterator, name)
def __init__(self, *args, **kwargs):
raise AttributeError("No constructor defined - class is abstract")
__repr__ = _swig_repr
__swig_destroy__ = _libsbol.delete_SwigPyIterator
__del__ = lambda self: None
def value(self):
return _libsbol.SwigPyIterator_value(self)
def incr(self, n=1):
return _libsbol.SwigPyIterator_incr(self, n)
def decr(self, n=1):
return _libsbol.SwigPyIterator_decr(self, n)
def distance(self, x):
return _libsbol.SwigPyIterator_distance(self, x)
def equal(self, x):
return _libsbol.SwigPyIterator_equal(self, x)
def copy(self):
return _libsbol.SwigPyIterator_copy(self)
def next(self):
return _libsbol.SwigPyIterator_next(self)
def __next__(self):
return _libsbol.SwigPyIterator___next__(self)
def previous(self):
return _libsbol.SwigPyIterator_previous(self)
def advance(self, n):
return _libsbol.SwigPyIterator_advance(self, n)
def __eq__(self, x):
return _libsbol.SwigPyIterator___eq__(self, x)
def __ne__(self, x):
return _libsbol.SwigPyIterator___ne__(self, x)
def __iadd__(self, n):
return _libsbol.SwigPyIterator___iadd__(self, n)
def __isub__(self, n):
return _libsbol.SwigPyIterator___isub__(self, n)
def __add__(self, n):
return _libsbol.SwigPyIterator___add__(self, n)
def __sub__(self, *args):
return _libsbol.SwigPyIterator___sub__(self, *args)
def __iter__(self):
return self
SwigPyIterator_swigregister = _libsbol.SwigPyIterator_swigregister
SwigPyIterator_swigregister(SwigPyIterator)
class _IntVector(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, _IntVector, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, _IntVector, name)
__repr__ = _swig_repr
def iterator(self):
return _libsbol._IntVector_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self):
return _libsbol._IntVector___nonzero__(self)
def __bool__(self):
return _libsbol._IntVector___bool__(self)
def __len__(self):
return _libsbol._IntVector___len__(self)
def __getslice__(self, i, j):
return _libsbol._IntVector___getslice__(self, i, j)
def __setslice__(self, *args):
return _libsbol._IntVector___setslice__(self, *args)
def __delslice__(self, i, j):
return _libsbol._IntVector___delslice__(self, i, j)
def __delitem__(self, *args):
return _libsbol._IntVector___delitem__(self, *args)
def __getitem__(self, *args):
return _libsbol._IntVector___getitem__(self, *args)
def __setitem__(self, *args):
return _libsbol._IntVector___setitem__(self, *args)
def pop(self):
return _libsbol._IntVector_pop(self)
def append(self, x):
return _libsbol._IntVector_append(self, x)
def empty(self):
return _libsbol._IntVector_empty(self)
def size(self):
return _libsbol._IntVector_size(self)
def swap(self, v):
return _libsbol._IntVector_swap(self, v)
def begin(self):
return _libsbol._IntVector_begin(self)
def end(self):
return _libsbol._IntVector_end(self)
def rbegin(self):
return _libsbol._IntVector_rbegin(self)
def rend(self):
return _libsbol._IntVector_rend(self)
def clear(self):
return _libsbol._IntVector_clear(self)
def get_allocator(self):
return _libsbol._IntVector_get_allocator(self)
def pop_back(self):
return _libsbol._IntVector_pop_back(self)
def erase(self, *args):
return _libsbol._IntVector_erase(self, *args)
def __init__(self, *args):
this = _libsbol.new__IntVector(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def push_back(self, x):
return _libsbol._IntVector_push_back(self, x)
def front(self):
return _libsbol._IntVector_front(self)
def back(self):
return _libsbol._IntVector_back(self)
def assign(self, n, x):
return _libsbol._IntVector_assign(self, n, x)
def resize(self, *args):
return _libsbol._IntVector_resize(self, *args)
def insert(self, *args):
return _libsbol._IntVector_insert(self, *args)
def reserve(self, n):
return _libsbol._IntVector_reserve(self, n)
def capacity(self):
return _libsbol._IntVector_capacity(self)
__swig_destroy__ = _libsbol.delete__IntVector
__del__ = lambda self: None
_IntVector_swigregister = _libsbol._IntVector_swigregister
_IntVector_swigregister(_IntVector)
class _StringVector(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, _StringVector, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, _StringVector, name)
__repr__ = _swig_repr
def iterator(self):
return _libsbol._StringVector_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self):
return _libsbol._StringVector___nonzero__(self)
def __bool__(self):
return _libsbol._StringVector___bool__(self)
def __len__(self):
return _libsbol._StringVector___len__(self)
def __getslice__(self, i, j):
return _libsbol._StringVector___getslice__(self, i, j)
def __setslice__(self, *args):
return _libsbol._StringVector___setslice__(self, *args)
def __delslice__(self, i, j):
return _libsbol._StringVector___delslice__(self, i, j)
def __delitem__(self, *args):
return _libsbol._StringVector___delitem__(self, *args)
def __getitem__(self, *args):
return _libsbol._StringVector___getitem__(self, *args)
def __setitem__(self, *args):
return _libsbol._StringVector___setitem__(self, *args)
def pop(self):
return _libsbol._StringVector_pop(self)
def append(self, x):
return _libsbol._StringVector_append(self, x)
def empty(self):
return _libsbol._StringVector_empty(self)
def size(self):
return _libsbol._StringVector_size(self)
def swap(self, v):
return _libsbol._StringVector_swap(self, v)
def begin(self):
return _libsbol._StringVector_begin(self)
def end(self):
return _libsbol._StringVector_end(self)
def rbegin(self):
return _libsbol._StringVector_rbegin(self)
def rend(self):
return _libsbol._StringVector_rend(self)
def clear(self):
return _libsbol._StringVector_clear(self)
def get_allocator(self):
return _libsbol._StringVector_get_allocator(self)
def pop_back(self):
return _libsbol._StringVector_pop_back(self)
def erase(self, *args):
return _libsbol._StringVector_erase(self, *args)
def __init__(self, *args):
this = _libsbol.new__StringVector(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def push_back(self, x):
return _libsbol._StringVector_push_back(self, x)
def front(self):
return _libsbol._StringVector_front(self)
def back(self):
return _libsbol._StringVector_back(self)
def assign(self, n, x):
return _libsbol._StringVector_assign(self, n, x)
def resize(self, *args):
return _libsbol._StringVector_resize(self, *args)
def insert(self, *args):
return _libsbol._StringVector_insert(self, *args)
def reserve(self, n):
return _libsbol._StringVector_reserve(self, n)
def capacity(self):
return _libsbol._StringVector_capacity(self)
__swig_destroy__ = _libsbol.delete__StringVector
__del__ = lambda self: None
_StringVector_swigregister = _libsbol._StringVector_swigregister
_StringVector_swigregister(_StringVector)
class _SBOLObjectVector(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, _SBOLObjectVector, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, _SBOLObjectVector, name)
__repr__ = _swig_repr
def iterator(self):
return _libsbol._SBOLObjectVector_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self):
return _libsbol._SBOLObjectVector___nonzero__(self)
def __bool__(self):
return _libsbol._SBOLObjectVector___bool__(self)
def __len__(self):
return _libsbol._SBOLObjectVector___len__(self)
def __getslice__(self, i, j):
return _libsbol._SBOLObjectVector___getslice__(self, i, j)
def __setslice__(self, *args):
return _libsbol._SBOLObjectVector___setslice__(self, *args)
def __delslice__(self, i, j):
return _libsbol._SBOLObjectVector___delslice__(self, i, j)
def __delitem__(self, *args):
return _libsbol._SBOLObjectVector___delitem__(self, *args)
def __getitem__(self, *args):
return _libsbol._SBOLObjectVector___getitem__(self, *args)
def __setitem__(self, *args):
return _libsbol._SBOLObjectVector___setitem__(self, *args)
def pop(self):
return _libsbol._SBOLObjectVector_pop(self)
def append(self, x):
return _libsbol._SBOLObjectVector_append(self, x)
def empty(self):
return _libsbol._SBOLObjectVector_empty(self)
def size(self):
return _libsbol._SBOLObjectVector_size(self)
def swap(self, v):
return _libsbol._SBOLObjectVector_swap(self, v)
def begin(self):
return _libsbol._SBOLObjectVector_begin(self)
def end(self):
return _libsbol._SBOLObjectVector_end(self)
def rbegin(self):
return _libsbol._SBOLObjectVector_rbegin(self)
def rend(self):
return _libsbol._SBOLObjectVector_rend(self)
def clear(self):
return _libsbol._SBOLObjectVector_clear(self)
def get_allocator(self):
return _libsbol._SBOLObjectVector_get_allocator(self)
def pop_back(self):
return _libsbol._SBOLObjectVector_pop_back(self)
def erase(self, *args):
return _libsbol._SBOLObjectVector_erase(self, *args)
def __init__(self, *args):
this = _libsbol.new__SBOLObjectVector(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def push_back(self, x):
return _libsbol._SBOLObjectVector_push_back(self, x)
def front(self):
return _libsbol._SBOLObjectVector_front(self)
def back(self):
return _libsbol._SBOLObjectVector_back(self)
def assign(self, n, x):
return _libsbol._SBOLObjectVector_assign(self, n, x)
def resize(self, *args):
return _libsbol._SBOLObjectVector_resize(self, *args)
def insert(self, *args):
return _libsbol._SBOLObjectVector_insert(self, *args)
def reserve(self, n):
return _libsbol._SBOLObjectVector_reserve(self, n)
def capacity(self):
return _libsbol._SBOLObjectVector_capacity(self)
__swig_destroy__ = _libsbol.delete__SBOLObjectVector
__del__ = lambda self: None
_SBOLObjectVector_swigregister = _libsbol._SBOLObjectVector_swigregister
_SBOLObjectVector_swigregister(_SBOLObjectVector)
class _MapVector(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, _MapVector, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, _MapVector, name)
__repr__ = _swig_repr
def iterator(self):
return _libsbol._MapVector_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self):
return _libsbol._MapVector___nonzero__(self)
def __bool__(self):
return _libsbol._MapVector___bool__(self)
def __len__(self):
return _libsbol._MapVector___len__(self)
def __iter__(self):
return self.key_iterator()
def iterkeys(self):
return self.key_iterator()
def itervalues(self):
return self.value_iterator()
def iteritems(self):
return self.iterator()
def __getitem__(self, key):
return _libsbol._MapVector___getitem__(self, key)
def __delitem__(self, key):
return _libsbol._MapVector___delitem__(self, key)
def has_key(self, key):
return _libsbol._MapVector_has_key(self, key)
def keys(self):
return _libsbol._MapVector_keys(self)
def values(self):
return _libsbol._MapVector_values(self)
def items(self):
return _libsbol._MapVector_items(self)
def __contains__(self, key):
return _libsbol._MapVector___contains__(self, key)
def key_iterator(self):
return _libsbol._MapVector_key_iterator(self)
def value_iterator(self):
return _libsbol._MapVector_value_iterator(self)
def __setitem__(self, *args):
return _libsbol._MapVector___setitem__(self, *args)
def asdict(self):
return _libsbol._MapVector_asdict(self)
def __init__(self, *args):
this = _libsbol.new__MapVector(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def empty(self):
return _libsbol._MapVector_empty(self)
def size(self):
return _libsbol._MapVector_size(self)
def swap(self, v):
return _libsbol._MapVector_swap(self, v)
def begin(self):
return _libsbol._MapVector_begin(self)
def end(self):
return _libsbol._MapVector_end(self)
def rbegin(self):
return _libsbol._MapVector_rbegin(self)
def rend(self):
return _libsbol._MapVector_rend(self)
def clear(self):
return _libsbol._MapVector_clear(self)
def get_allocator(self):
return _libsbol._MapVector_get_allocator(self)
def count(self, x):
return _libsbol._MapVector_count(self, x)
def erase(self, *args):
return _libsbol._MapVector_erase(self, *args)
def find(self, x):
return _libsbol._MapVector_find(self, x)
def lower_bound(self, x):
return _libsbol._MapVector_lower_bound(self, x)
def upper_bound(self, x):
return _libsbol._MapVector_upper_bound(self, x)
__swig_destroy__ = _libsbol.delete__MapVector
__del__ = lambda self: None
_MapVector_swigregister = _libsbol._MapVector_swigregister
_MapVector_swigregister(_MapVector)
class _MapOfStringVector(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, _MapOfStringVector, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, _MapOfStringVector, name)
__repr__ = _swig_repr
def iterator(self):
return _libsbol._MapOfStringVector_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self):
return _libsbol._MapOfStringVector___nonzero__(self)
def __bool__(self):
return _libsbol._MapOfStringVector___bool__(self)
def __len__(self):
return _libsbol._MapOfStringVector___len__(self)
def __iter__(self):
return self.key_iterator()
def iterkeys(self):
return self.key_iterator()
def itervalues(self):
return self.value_iterator()
def iteritems(self):
return self.iterator()
def __getitem__(self, key):
return _libsbol._MapOfStringVector___getitem__(self, key)
def __delitem__(self, key):
return _libsbol._MapOfStringVector___delitem__(self, key)
def has_key(self, key):
return _libsbol._MapOfStringVector_has_key(self, key)
def keys(self):
return _libsbol._MapOfStringVector_keys(self)
def values(self):
return _libsbol._MapOfStringVector_values(self)
def items(self):
return _libsbol._MapOfStringVector_items(self)
def __contains__(self, key):
return _libsbol._MapOfStringVector___contains__(self, key)
def key_iterator(self):
return _libsbol._MapOfStringVector_key_iterator(self)
def value_iterator(self):
return _libsbol._MapOfStringVector_value_iterator(self)
def __setitem__(self, *args):
return _libsbol._MapOfStringVector___setitem__(self, *args)
def asdict(self):
return _libsbol._MapOfStringVector_asdict(self)
def __init__(self, *args):
this = _libsbol.new__MapOfStringVector(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def empty(self):
return _libsbol._MapOfStringVector_empty(self)
def size(self):
return _libsbol._MapOfStringVector_size(self)
def swap(self, v):
return _libsbol._MapOfStringVector_swap(self, v)
def begin(self):
return _libsbol._MapOfStringVector_begin(self)
def end(self):
return _libsbol._MapOfStringVector_end(self)
def rbegin(self):
return _libsbol._MapOfStringVector_rbegin(self)
def rend(self):
return _libsbol._MapOfStringVector_rend(self)
def clear(self):
return _libsbol._MapOfStringVector_clear(self)
def get_allocator(self):
return _libsbol._MapOfStringVector_get_allocator(self)
def count(self, x):
return _libsbol._MapOfStringVector_count(self, x)
def erase(self, *args):
return _libsbol._MapOfStringVector_erase(self, *args)
def find(self, x):
return _libsbol._MapOfStringVector_find(self, x)
def lower_bound(self, x):
return _libsbol._MapOfStringVector_lower_bound(self, x)
def upper_bound(self, x):
return _libsbol._MapOfStringVector_upper_bound(self, x)
__swig_destroy__ = _libsbol.delete__MapOfStringVector
__del__ = lambda self: None
_MapOfStringVector_swigregister = _libsbol._MapOfStringVector_swigregister
_MapOfStringVector_swigregister(_MapOfStringVector)
class _MapOfSBOLObject(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, _MapOfSBOLObject, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, _MapOfSBOLObject, name)
__repr__ = _swig_repr
def iterator(self):
return _libsbol._MapOfSBOLObject_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self):
return _libsbol._MapOfSBOLObject___nonzero__(self)
def __bool__(self):
return _libsbol._MapOfSBOLObject___bool__(self)
def __len__(self):
return _libsbol._MapOfSBOLObject___len__(self)
def __iter__(self):
return self.key_iterator()
def iterkeys(self):
return self.key_iterator()
def itervalues(self):
return self.value_iterator()
def iteritems(self):
return self.iterator()
def __getitem__(self, key):
return _libsbol._MapOfSBOLObject___getitem__(self, key)
def __delitem__(self, key):
return _libsbol._MapOfSBOLObject___delitem__(self, key)
def has_key(self, key):
return _libsbol._MapOfSBOLObject_has_key(self, key)
def keys(self):
return _libsbol._MapOfSBOLObject_keys(self)
def values(self):
return _libsbol._MapOfSBOLObject_values(self)
def items(self):
return _libsbol._MapOfSBOLObject_items(self)
def __contains__(self, key):
return _libsbol._MapOfSBOLObject___contains__(self, key)
def key_iterator(self):
return _libsbol._MapOfSBOLObject_key_iterator(self)
def value_iterator(self):
return _libsbol._MapOfSBOLObject_value_iterator(self)
def __setitem__(self, *args):
return _libsbol._MapOfSBOLObject___setitem__(self, *args)
def asdict(self):
return _libsbol._MapOfSBOLObject_asdict(self)
def __init__(self, *args):
this = _libsbol.new__MapOfSBOLObject(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def empty(self):
return _libsbol._MapOfSBOLObject_empty(self)
def size(self):
return _libsbol._MapOfSBOLObject_size(self)
def swap(self, v):
return _libsbol._MapOfSBOLObject_swap(self, v)
def begin(self):
return _libsbol._MapOfSBOLObject_begin(self)
def end(self):
return _libsbol._MapOfSBOLObject_end(self)
def rbegin(self):
return _libsbol._MapOfSBOLObject_rbegin(self)
def rend(self):
return _libsbol._MapOfSBOLObject_rend(self)
def clear(self):
return _libsbol._MapOfSBOLObject_clear(self)
def get_allocator(self):
return _libsbol._MapOfSBOLObject_get_allocator(self)
def count(self, x):
return _libsbol._MapOfSBOLObject_count(self, x)
def erase(self, *args):
return _libsbol._MapOfSBOLObject_erase(self, *args)
def find(self, x):
return _libsbol._MapOfSBOLObject_find(self, x)
def lower_bound(self, x):
return _libsbol._MapOfSBOLObject_lower_bound(self, x)
def upper_bound(self, x):
return _libsbol._MapOfSBOLObject_upper_bound(self, x)
__swig_destroy__ = _libsbol.delete__MapOfSBOLObject
__del__ = lambda self: None
_MapOfSBOLObject_swigregister = _libsbol._MapOfSBOLObject_swigregister
_MapOfSBOLObject_swigregister(_MapOfSBOLObject)
[docs]class Config(_object):
"""
A class which contains global configuration variables for the libSBOL
environment. Intended to be used like a static class, configuration variables
are accessed through the `Config' object.
"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, Config, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, Config, name)
__repr__ = _swig_repr
def __init__(self):
"""
"""
this = _libsbol.new_Config()
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def setHomespace(self, ns):
return _libsbol.Config_setHomespace(self, ns)
def getHomespace(self):
return _libsbol.Config_getHomespace(self)
def hasHomespace(self):
return _libsbol.Config_hasHomespace(self)
def setFileFormat(self, file_format):
return _libsbol.Config_setFileFormat(self, file_format)
def getFileFormat(self):
return _libsbol.Config_getFileFormat(self)
[docs] def setOption(*args):
"""
Configure options for online validation and conversion
Option
Description
Values
validate
Enable validation and conversion requests through the online validator
True or False
validatorURL
The http request endpoint for validation
A valid URL, set to http://www.async.ece.utah.edu/sbol-validator/endpoint.php
by default
output
File format for conversion
SBOL2, SBOL1, FASTA, GenBank
diff
Report differences between two files
True or False
noncompliantUrisAllowed
If set to false, URIs in the file will not be checked for compliance
with the SBOL specification
True or False
incompleteDocumentsAllowed
If set to false, not all referenced objects must be described within
the given main_file
True or False
bestPracticesCheck
If set to true, the file is checked for the best practice rules set
in the SBOL specification
True or False
failOnFirstError
If set to true, the validator will fail at the first error
True or False
displayFullErrorStackTrace
If set to true (and failOnFirstError is true) the validator will
provide a stack trace for the first validation error
True or False
topLevelToConvert
uriPrefix
Required for conversion from FASTA and GenBank to SBOL1 or SBOL2,
used to generate URIs
True or False
version
Adds the version to all URIs and to the document
A valid Maven version string
wantFileBack
Whether or not to return the file contents as a string
True or False
Parameters
----------
* `option` :
The option key
* `value` :
The option value
"""
return _libsbol.Config_setOption(*args)
setOption = staticmethod(setOption)
[docs] def getOption(option):
"""
Get current option value for online validation and conversion.
Parameters
----------
* `option` :
The option key
"""
return _libsbol.Config_getOption(option)
getOption = staticmethod(getOption)
__swig_destroy__ = _libsbol.delete_Config
__del__ = lambda self: None
Config_swigregister = _libsbol.Config_swigregister
Config_swigregister(Config)
[docs]def Config_setOption(*args):
"""
Configure options for online validation and conversion
Option
Description
Values
validate
Enable validation and conversion requests through the online validator
True or False
validatorURL
The http request endpoint for validation
A valid URL, set to http://www.async.ece.utah.edu/sbol-validator/endpoint.php
by default
output
File format for conversion
SBOL2, SBOL1, FASTA, GenBank
diff
Report differences between two files
True or False
noncompliantUrisAllowed
If set to false, URIs in the file will not be checked for compliance
with the SBOL specification
True or False
incompleteDocumentsAllowed
If set to false, not all referenced objects must be described within
the given main_file
True or False
bestPracticesCheck
If set to true, the file is checked for the best practice rules set
in the SBOL specification
True or False
failOnFirstError
If set to true, the validator will fail at the first error
True or False
displayFullErrorStackTrace
If set to true (and failOnFirstError is true) the validator will
provide a stack trace for the first validation error
True or False
topLevelToConvert
uriPrefix
Required for conversion from FASTA and GenBank to SBOL1 or SBOL2,
used to generate URIs
True or False
version
Adds the version to all URIs and to the document
A valid Maven version string
wantFileBack
Whether or not to return the file contents as a string
True or False
Parameters
----------
* `option` :
The option key
* `value` :
The option value
"""
return _libsbol.Config_setOption(*args)
[docs]def Config_getOption(option):
"""
Get current option value for online validation and conversion.
Parameters
----------
* `option` :
The option key
"""
return _libsbol.Config_getOption(option)
[docs]def setHomespace(ns):
"""
Sets the default namespace for autocreation of URIs when a new SBOL object is
created.
Parameters
----------
* `ns`:
Homespace
"""
return _libsbol.setHomespace(ns)
[docs]def getHomespace():
"""
Returns the current default namespace for autocreation of URIs when a new SBOL
object is created.
"""
return _libsbol.getHomespace()
[docs]def hasHomespace():
"""
Checks if a valid default namespace has been defined.
"""
return _libsbol.hasHomespace()
def randomIdentifier():
return _libsbol.randomIdentifier()
randomIdentifier = _libsbol.randomIdentifier
def autoconstructURI():
return _libsbol.autoconstructURI()
autoconstructURI = _libsbol.autoconstructURI
def constructNonCompliantURI(uri):
return _libsbol.constructNonCompliantURI(uri)
constructNonCompliantURI = _libsbol.constructNonCompliantURI
def constructCompliantURI(*args):
return _libsbol.constructCompliantURI(*args)
constructCompliantURI = _libsbol.constructCompliantURI
def getCompliantURI(uri_prefix, sbol_class_name, display_id, version):
return _libsbol.getCompliantURI(uri_prefix, sbol_class_name, display_id, version)
getCompliantURI = _libsbol.getCompliantURI
def parseClassName(uri):
return _libsbol.parseClassName(uri)
parseClassName = _libsbol.parseClassName
def parsePropertyName(uri):
return _libsbol.parsePropertyName(uri)
parsePropertyName = _libsbol.parsePropertyName
def parseNamespace(uri):
return _libsbol.parseNamespace(uri)
parseNamespace = _libsbol.parseNamespace
def parseURLDomain(url):
return _libsbol.parseURLDomain(url)
parseURLDomain = _libsbol.parseURLDomain
def CurlWrite_CallbackFunc_StdString(contents, size, nmemb, s):
return _libsbol.CurlWrite_CallbackFunc_StdString(contents, size, nmemb, s)
CurlWrite_CallbackFunc_StdString = _libsbol.CurlWrite_CallbackFunc_StdString
def CurlResponseHeader_CallbackFunc(buffer, size, nitems, userdata):
return _libsbol.CurlResponseHeader_CallbackFunc(buffer, size, nitems, userdata)
CurlResponseHeader_CallbackFunc = _libsbol.CurlResponseHeader_CallbackFunc
DEFAULT_NS = _libsbol.DEFAULT_NS
SBOL_URI = _libsbol.SBOL_URI
RDF_URI = _libsbol.RDF_URI
PURL_URI = _libsbol.PURL_URI
PROV_URI = _libsbol.PROV_URI
PROVO = _libsbol.PROVO
SYSBIO_URI = _libsbol.SYSBIO_URI
NODENAME_ABOUT = _libsbol.NODENAME_ABOUT
NODENAME_RESOURCE = _libsbol.NODENAME_RESOURCE
VERSION_STRING = _libsbol.VERSION_STRING
SBOL_DOCUMENT = _libsbol.SBOL_DOCUMENT
SBOL_IDENTIFIED = _libsbol.SBOL_IDENTIFIED
SBOL_DOCUMENTED = _libsbol.SBOL_DOCUMENTED
SBOL_TOP_LEVEL = _libsbol.SBOL_TOP_LEVEL
SBOL_GENERIC_TOP_LEVEL = _libsbol.SBOL_GENERIC_TOP_LEVEL
SBOL_SEQUENCE_ANNOTATION = _libsbol.SBOL_SEQUENCE_ANNOTATION
SBOL_COMPONENT = _libsbol.SBOL_COMPONENT
SBOL_FUNCTIONAL_COMPONENT = _libsbol.SBOL_FUNCTIONAL_COMPONENT
SBOL_COMPONENT_DEFINITION = _libsbol.SBOL_COMPONENT_DEFINITION
SBOL_SEQUENCE = _libsbol.SBOL_SEQUENCE
SBOL_MODULE_DEFINITION = _libsbol.SBOL_MODULE_DEFINITION
SBOL_MODULE = _libsbol.SBOL_MODULE
SBOL_MODEL = _libsbol.SBOL_MODEL
SBOL_MAPS_TO = _libsbol.SBOL_MAPS_TO
SBOL_INTERACTION = _libsbol.SBOL_INTERACTION
SBOL_PARTICIPATION = _libsbol.SBOL_PARTICIPATION
SBOL_SEQUENCE_CONSTRAINT = _libsbol.SBOL_SEQUENCE_CONSTRAINT
SBOL_LOCATION = _libsbol.SBOL_LOCATION
SBOL_RANGE = _libsbol.SBOL_RANGE
SBOL_CUT = _libsbol.SBOL_CUT
SBOL_COLLECTION = _libsbol.SBOL_COLLECTION
SBOL_GENERIC_LOCATION = _libsbol.SBOL_GENERIC_LOCATION
SBOL_VARIABLE_COMPONENT = _libsbol.SBOL_VARIABLE_COMPONENT
SBOL_COMBINATORIAL_DERIVATION = _libsbol.SBOL_COMBINATORIAL_DERIVATION
SBOL_ATTACHMENT = _libsbol.SBOL_ATTACHMENT
SBOL_IMPLEMENTATION = _libsbol.SBOL_IMPLEMENTATION
UNDEFINED = _libsbol.UNDEFINED
SBOL_IDENTITY = _libsbol.SBOL_IDENTITY
SBOL_PERSISTENT_IDENTITY = _libsbol.SBOL_PERSISTENT_IDENTITY
SBOL_VERSION = _libsbol.SBOL_VERSION
SBOL_DISPLAY_ID = _libsbol.SBOL_DISPLAY_ID
SBOL_NAME = _libsbol.SBOL_NAME
SBOL_DESCRIPTION = _libsbol.SBOL_DESCRIPTION
SBOL_TYPES = _libsbol.SBOL_TYPES
SBOL_START = _libsbol.SBOL_START
SBOL_END = _libsbol.SBOL_END
SBOL_SEQUENCE_ANNOTATIONS = _libsbol.SBOL_SEQUENCE_ANNOTATIONS
SBOL_COMPONENTS = _libsbol.SBOL_COMPONENTS
SBOL_COMPONENT_PROPERTY = _libsbol.SBOL_COMPONENT_PROPERTY
SBOL_ROLES = _libsbol.SBOL_ROLES
SBOL_ELEMENTS = _libsbol.SBOL_ELEMENTS
SBOL_ENCODING = _libsbol.SBOL_ENCODING
SBOL_SEQUENCE_PROPERTY = _libsbol.SBOL_SEQUENCE_PROPERTY
SBOL_WAS_DERIVED_FROM = _libsbol.SBOL_WAS_DERIVED_FROM
SBOL_DEFINITION = _libsbol.SBOL_DEFINITION
SBOL_ACCESS = _libsbol.SBOL_ACCESS
SBOL_DIRECTION = _libsbol.SBOL_DIRECTION
SBOL_MODELS = _libsbol.SBOL_MODELS
SBOL_MODULES = _libsbol.SBOL_MODULES
SBOL_FUNCTIONAL_COMPONENTS = _libsbol.SBOL_FUNCTIONAL_COMPONENTS
SBOL_INTERACTIONS = _libsbol.SBOL_INTERACTIONS
SBOL_MAPS_TOS = _libsbol.SBOL_MAPS_TOS
SBOL_PARTICIPATIONS = _libsbol.SBOL_PARTICIPATIONS
SBOL_PARTICIPANT = _libsbol.SBOL_PARTICIPANT
SBOL_LOCAL = _libsbol.SBOL_LOCAL
SBOL_REMOTE = _libsbol.SBOL_REMOTE
SBOL_REFINEMENT = _libsbol.SBOL_REFINEMENT
SBOL_SOURCE = _libsbol.SBOL_SOURCE
SBOL_LANGUAGE = _libsbol.SBOL_LANGUAGE
SBOL_FRAMEWORK = _libsbol.SBOL_FRAMEWORK
SBOL_SEQUENCE_CONSTRAINTS = _libsbol.SBOL_SEQUENCE_CONSTRAINTS
SBOL_SUBJECT = _libsbol.SBOL_SUBJECT
SBOL_OBJECT = _libsbol.SBOL_OBJECT
SBOL_RESTRICTION = _libsbol.SBOL_RESTRICTION
SBOL_ORIENTATION = _libsbol.SBOL_ORIENTATION
SBOL_LOCATIONS = _libsbol.SBOL_LOCATIONS
SBOL_ROLE_INTEGRATION = _libsbol.SBOL_ROLE_INTEGRATION
SBOL_MEMBERS = _libsbol.SBOL_MEMBERS
SBOL_AT = _libsbol.SBOL_AT
SBOL_OPERATOR = _libsbol.SBOL_OPERATOR
SBOL_VARIABLE_COMPONENTS = _libsbol.SBOL_VARIABLE_COMPONENTS
SBOL_VARIABLE = _libsbol.SBOL_VARIABLE
SBOL_VARIANTS = _libsbol.SBOL_VARIANTS
SBOL_VARIANT_COLLECTIONS = _libsbol.SBOL_VARIANT_COLLECTIONS
SBOL_VARIANT_DERIVATIONS = _libsbol.SBOL_VARIANT_DERIVATIONS
SBOL_STRATEGY = _libsbol.SBOL_STRATEGY
SBOL_TEMPLATE = _libsbol.SBOL_TEMPLATE
SBOL_ATTACHMENTS = _libsbol.SBOL_ATTACHMENTS
SBOL_ACCESS_PRIVATE = _libsbol.SBOL_ACCESS_PRIVATE
SBOL_ACCESS_PUBLIC = _libsbol.SBOL_ACCESS_PUBLIC
SBOL_DIRECTION_IN = _libsbol.SBOL_DIRECTION_IN
SBOL_DIRECTION_OUT = _libsbol.SBOL_DIRECTION_OUT
SBOL_DIRECTION_IN_OUT = _libsbol.SBOL_DIRECTION_IN_OUT
SBOL_DIRECTION_NONE = _libsbol.SBOL_DIRECTION_NONE
SBOL_RESTRICTION_PRECEDES = _libsbol.SBOL_RESTRICTION_PRECEDES
SBOL_RESTRICTION_SAME_ORIENTATION_AS = _libsbol.SBOL_RESTRICTION_SAME_ORIENTATION_AS
SBOL_RESTRICTION_OPPOSITE_ORIENTATION_AS = _libsbol.SBOL_RESTRICTION_OPPOSITE_ORIENTATION_AS
SBOL_ENCODING_IUPAC = _libsbol.SBOL_ENCODING_IUPAC
SBOL_ENCODING_IUPAC_PROTEIN = _libsbol.SBOL_ENCODING_IUPAC_PROTEIN
SBOL_ENCODING_SMILES = _libsbol.SBOL_ENCODING_SMILES
SBOL_ORIENTATION_INLINE = _libsbol.SBOL_ORIENTATION_INLINE
SBOL_ORIENTATION_REVERSE_COMPLEMENT = _libsbol.SBOL_ORIENTATION_REVERSE_COMPLEMENT
SBOL_REFINEMENT_USE_REMOTE = _libsbol.SBOL_REFINEMENT_USE_REMOTE
SBOL_REFINEMENT_USE_LOCAL = _libsbol.SBOL_REFINEMENT_USE_LOCAL
SBOL_REFINEMENT_VERIFY_IDENTICAL = _libsbol.SBOL_REFINEMENT_VERIFY_IDENTICAL
SBOL_REFINEMENT_MERGE = _libsbol.SBOL_REFINEMENT_MERGE
SBOL_ROLE_INTEGRATION_MERGE = _libsbol.SBOL_ROLE_INTEGRATION_MERGE
SBOL_ROLE_INTEGRATION_OVERRIDE = _libsbol.SBOL_ROLE_INTEGRATION_OVERRIDE
SBOL_DESIGN = _libsbol.SBOL_DESIGN
SBOL_BUILD = _libsbol.SBOL_BUILD
SBOL_TEST = _libsbol.SBOL_TEST
SBOL_LEARN = _libsbol.SBOL_LEARN
PROVO_ACTIVITY = _libsbol.PROVO_ACTIVITY
PROVO_USAGE = _libsbol.PROVO_USAGE
PROVO_ASSOCIATION = _libsbol.PROVO_ASSOCIATION
PROVO_AGENT = _libsbol.PROVO_AGENT
PROVO_PLAN = _libsbol.PROVO_PLAN
PROVO_WAS_GENERATED_BY = _libsbol.PROVO_WAS_GENERATED_BY
PROVO_STARTED_AT_TIME = _libsbol.PROVO_STARTED_AT_TIME
PROVO_ENDED_AT_TIME = _libsbol.PROVO_ENDED_AT_TIME
PROVO_QUALIFIED_ASSOCIATION = _libsbol.PROVO_QUALIFIED_ASSOCIATION
PROVO_QUALIFIED_USAGE = _libsbol.PROVO_QUALIFIED_USAGE
PROVO_WAS_INFORMED_BY = _libsbol.PROVO_WAS_INFORMED_BY
PROVO_HAD_PLAN = _libsbol.PROVO_HAD_PLAN
PROVO_HAD_ROLE = _libsbol.PROVO_HAD_ROLE
PROVO_AGENT_PROPERTY = _libsbol.PROVO_AGENT_PROPERTY
PROVO_ENTITY = _libsbol.PROVO_ENTITY
SBO = _libsbol.SBO
SBO_INTERACTION = _libsbol.SBO_INTERACTION
SBO_INHIBITION = _libsbol.SBO_INHIBITION
SBO_GENETIC_PRODUCTION = _libsbol.SBO_GENETIC_PRODUCTION
SBO_NONCOVALENT_BINDING = _libsbol.SBO_NONCOVALENT_BINDING
SBO_STIMULATION = _libsbol.SBO_STIMULATION
SBO_DEGRADATION = _libsbol.SBO_DEGRADATION
SBO_CONTROL = _libsbol.SBO_CONTROL
SBO_BIOCHEMICAL_REACTION = _libsbol.SBO_BIOCHEMICAL_REACTION
SBO_STIMULATED = _libsbol.SBO_STIMULATED
SBO_CONVERSION = _libsbol.SBO_CONVERSION
SBO_PROMOTER = _libsbol.SBO_PROMOTER
SBO_GENE = _libsbol.SBO_GENE
SBO_INHIBITOR = _libsbol.SBO_INHIBITOR
SBO_INHIBITED = _libsbol.SBO_INHIBITED
SBO_STIMULATOR = _libsbol.SBO_STIMULATOR
SBO_REACTANT = _libsbol.SBO_REACTANT
SBO_PRODUCT = _libsbol.SBO_PRODUCT
SBO_LIGAND = _libsbol.SBO_LIGAND
SBO_NONCOVALENT_COMPLEX = _libsbol.SBO_NONCOVALENT_COMPLEX
SBO_BINDING_SITE = _libsbol.SBO_BINDING_SITE
SBO_SUBSTRATE = _libsbol.SBO_SUBSTRATE
SBO_COFACTOR = _libsbol.SBO_COFACTOR
SBO_SIDEPRODUCT = _libsbol.SBO_SIDEPRODUCT
SBO_ENZYME = _libsbol.SBO_ENZYME
SO = _libsbol.SO
SO_MISC = _libsbol.SO_MISC
SO_GENE = _libsbol.SO_GENE
SO_PROMOTER = _libsbol.SO_PROMOTER
SO_CDS = _libsbol.SO_CDS
SO_RBS = _libsbol.SO_RBS
SO_TERMINATOR = _libsbol.SO_TERMINATOR
SO_SGRNA = _libsbol.SO_SGRNA
SO_LINEAR = _libsbol.SO_LINEAR
SO_CIRCULAR = _libsbol.SO_CIRCULAR
SO_PLASMID = _libsbol.SO_PLASMID
BIOPAX_DNA = _libsbol.BIOPAX_DNA
BIOPAX_RNA = _libsbol.BIOPAX_RNA
BIOPAX_PROTEIN = _libsbol.BIOPAX_PROTEIN
BIOPAX_SMALL_MOLECULE = _libsbol.BIOPAX_SMALL_MOLECULE
BIOPAX_COMPLEX = _libsbol.BIOPAX_COMPLEX
EDAM_SBML = _libsbol.EDAM_SBML
EDAM_CELLML = _libsbol.EDAM_CELLML
EDAM_BIOPAX = _libsbol.EDAM_BIOPAX
SBO_CONTINUOUS = _libsbol.SBO_CONTINUOUS
SBO_DISCRETE = _libsbol.SBO_DISCRETE
SYSBIO_DESIGN = _libsbol.SYSBIO_DESIGN
SYSBIO_BUILD = _libsbol.SYSBIO_BUILD
SYSBIO_TEST = _libsbol.SYSBIO_TEST
SYSBIO_ANALYSIS = _libsbol.SYSBIO_ANALYSIS
SYSBIO_SAMPLE_ROSTER = _libsbol.SYSBIO_SAMPLE_ROSTER
def sbolRule10101(sbol_obj, arg):
return _libsbol.sbolRule10101(sbol_obj, arg)
sbolRule10101 = _libsbol.sbolRule10101
def sbolRule10102(sbol_obj, arg):
return _libsbol.sbolRule10102(sbol_obj, arg)
sbolRule10102 = _libsbol.sbolRule10102
def sbol_rule_10202(sbol_obj, arg):
return _libsbol.sbol_rule_10202(sbol_obj, arg)
sbol_rule_10202 = _libsbol.sbol_rule_10202
def sbol_rule_10204(sbol_obj, arg):
return _libsbol.sbol_rule_10204(sbol_obj, arg)
sbol_rule_10204 = _libsbol.sbol_rule_10204
def libsbol_rule_1(sbol_obj, arg):
return _libsbol.libsbol_rule_1(sbol_obj, arg)
libsbol_rule_1 = _libsbol.libsbol_rule_1
def libsbol_rule_2(sbol_obj, arg):
return _libsbol.libsbol_rule_2(sbol_obj, arg)
libsbol_rule_2 = _libsbol.libsbol_rule_2
def libsbol_rule_3(sbol_obj, arg):
return _libsbol.libsbol_rule_3(sbol_obj, arg)
libsbol_rule_3 = _libsbol.libsbol_rule_3
def libsbol_rule_4(sbol_obj, arg):
return _libsbol.libsbol_rule_4(sbol_obj, arg)
libsbol_rule_4 = _libsbol.libsbol_rule_4
def libsbol_rule_5(sbol_obj, arg):
return _libsbol.libsbol_rule_5(sbol_obj, arg)
libsbol_rule_5 = _libsbol.libsbol_rule_5
def libsbol_rule_6(sbol_obj, arg):
return _libsbol.libsbol_rule_6(sbol_obj, arg)
libsbol_rule_6 = _libsbol.libsbol_rule_6
def libsbol_rule_7(sbol_obj, arg):
return _libsbol.libsbol_rule_7(sbol_obj, arg)
libsbol_rule_7 = _libsbol.libsbol_rule_7
def libsbol_rule_8(sbol_obj, arg):
return _libsbol.libsbol_rule_8(sbol_obj, arg)
libsbol_rule_8 = _libsbol.libsbol_rule_8
def libsbol_rule_9(sbol_obj, arg):
return _libsbol.libsbol_rule_9(sbol_obj, arg)
libsbol_rule_9 = _libsbol.libsbol_rule_9
def libsbol_rule_10(sbol_obj, arg):
return _libsbol.libsbol_rule_10(sbol_obj, arg)
libsbol_rule_10 = _libsbol.libsbol_rule_10
def libsbol_rule_11(sbol_obj, arg):
return _libsbol.libsbol_rule_11(sbol_obj, arg)
libsbol_rule_11 = _libsbol.libsbol_rule_11
def libsbol_rule_12(sbol_obj, arg):
return _libsbol.libsbol_rule_12(sbol_obj, arg)
libsbol_rule_12 = _libsbol.libsbol_rule_12
def libsbol_rule_13(sbol_obj, arg):
return _libsbol.libsbol_rule_13(sbol_obj, arg)
libsbol_rule_13 = _libsbol.libsbol_rule_13
def libsbol_rule_14(sbol_obj, arg):
return _libsbol.libsbol_rule_14(sbol_obj, arg)
libsbol_rule_14 = _libsbol.libsbol_rule_14
def libsbol_rule_15(sbol_obj, arg):
return _libsbol.libsbol_rule_15(sbol_obj, arg)
libsbol_rule_15 = _libsbol.libsbol_rule_15
def libsbol_rule_16(sbol_obj, arg):
return _libsbol.libsbol_rule_16(sbol_obj, arg)
libsbol_rule_16 = _libsbol.libsbol_rule_16
def libsbol_rule_17(sbol_obj, arg):
return _libsbol.libsbol_rule_17(sbol_obj, arg)
libsbol_rule_17 = _libsbol.libsbol_rule_17
def libsbol_rule_18(sbol_obj, arg):
return _libsbol.libsbol_rule_18(sbol_obj, arg)
libsbol_rule_18 = _libsbol.libsbol_rule_18
def libsbol_rule_19(sbol_obj, arg):
return _libsbol.libsbol_rule_19(sbol_obj, arg)
libsbol_rule_19 = _libsbol.libsbol_rule_19
def is_alphanumeric_or_underscore(c):
return _libsbol.is_alphanumeric_or_underscore(c)
is_alphanumeric_or_underscore = _libsbol.is_alphanumeric_or_underscore
def is_not_alphanumeric_or_underscore(c):
return _libsbol.is_not_alphanumeric_or_underscore(c)
is_not_alphanumeric_or_underscore = _libsbol.is_not_alphanumeric_or_underscore
class _StringProperty(_object):
"""
Member properties of all SBOL objects are defined using a Property object.
The Property class provides a generic interface for accessing SBOL objects. At a
low level, the Property class converts SBOL data structures into RDF triples.
templateparam
-------------
* `The` :
SBOL specification currently supports string, URI, and integer literal
values.
"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, _StringProperty, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, _StringProperty, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Parameters
----------
* `type_uri` :
An RDF hash URI for this property, consisting of a namespace followed by an
identifier. For example, Properties of SBOLObjects use URIs of the form
http://sbols.org/v2#somePropertyName, where the identifier somePropertyName
determines the appearance of XML nodes in an SBOL file. Alternatively,
annotations in a custom namespace can be provided using a similarly formed
hash URI in another namespace.
* `property_owner` :
All Property objects must have a pointer back to its parent SBOLObject of
which it is a member
* `initial_value` :
The initial value of the Property
* `validation_rules` :
A vector of externally defined ValidationRules. The vector contains pointers
to functions which correspond to the validation rules listed in the appendix
of the formal SBOL specification document. ValidationRules are automatically
checked every time a setter or adder method is called and when Documents are
read and written.
"""
this = _libsbol.new__StringProperty(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete__StringProperty
__del__ = lambda self: None
def getTypeURI(self):
"""
Returns
-------
The uniform resource identifier that describes the RDF-type of this SBOL Object
"""
return _libsbol._StringProperty_getTypeURI(self)
def getOwner(self):
"""
"""
return _libsbol._StringProperty_getOwner(self)
def set(self, *args):
"""
Basic setter for SBOL Property.
Parameters
----------
* `new_value` :
A new integer value for the property, which is converted to a raw string
during serialization.
"""
return _libsbol._StringProperty_set(self, *args)
def add(self, new_value):
"""
Appends the new value to a list of values, for properties that allow it.
Parameters
----------
* `new_value` :
A new string which will be added to a list of values.
"""
return _libsbol._StringProperty_add(self, new_value)
def remove(self, index=0):
"""
Remove a Property from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol._StringProperty_remove(self, index)
def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol._StringProperty_clear(self)
def write(self):
"""
"""
return _libsbol._StringProperty_write(self)
def find(self, query):
return _libsbol._StringProperty_find(self, query)
def getLowerBound(self):
return _libsbol._StringProperty_getLowerBound(self)
def getUpperBound(self):
return _libsbol._StringProperty_getUpperBound(self)
def validate(self, arg=None):
"""
"""
return _libsbol._StringProperty_validate(self, arg)
def copy(self, target_property):
return _libsbol._StringProperty_copy(self, target_property)
__swig_setmethods__["python_iter"] = _libsbol._StringProperty_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol._StringProperty_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol._StringProperty_python_iter_get, _libsbol._StringProperty_python_iter_set)
def addValidationRule(self, *args):
return _libsbol._StringProperty_addValidationRule(self, *args)
_StringProperty_swigregister = _libsbol._StringProperty_swigregister
_StringProperty_swigregister(_StringProperty)
class _IntProperty(_object):
"""
Member properties of all SBOL objects are defined using a Property object.
The Property class provides a generic interface for accessing SBOL objects. At a
low level, the Property class converts SBOL data structures into RDF triples.
templateparam
-------------
* `The` :
SBOL specification currently supports string, URI, and integer literal
values.
"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, _IntProperty, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, _IntProperty, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Parameters
----------
* `type_uri` :
An RDF hash URI for this property, consisting of a namespace followed by an
identifier. For example, Properties of SBOLObjects use URIs of the form
http://sbols.org/v2#somePropertyName, where the identifier somePropertyName
determines the appearance of XML nodes in an SBOL file. Alternatively,
annotations in a custom namespace can be provided using a similarly formed
hash URI in another namespace.
* `property_owner` :
All Property objects must have a pointer back to its parent SBOLObject of
which it is a member
* `initial_value` :
The initial value of the Property
* `validation_rules` :
A vector of externally defined ValidationRules. The vector contains pointers
to functions which correspond to the validation rules listed in the appendix
of the formal SBOL specification document. ValidationRules are automatically
checked every time a setter or adder method is called and when Documents are
read and written.
"""
this = _libsbol.new__IntProperty(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete__IntProperty
__del__ = lambda self: None
def getTypeURI(self):
"""
Returns
-------
The uniform resource identifier that describes the RDF-type of this SBOL Object
"""
return _libsbol._IntProperty_getTypeURI(self)
def getOwner(self):
"""
"""
return _libsbol._IntProperty_getOwner(self)
def set(self, *args):
"""
Basic setter for SBOL Property.
Parameters
----------
* `new_value` :
A new integer value for the property, which is converted to a raw string
during serialization.
"""
return _libsbol._IntProperty_set(self, *args)
def add(self, new_value):
"""
Appends the new value to a list of values, for properties that allow it.
Parameters
----------
* `new_value` :
A new string which will be added to a list of values.
"""
return _libsbol._IntProperty_add(self, new_value)
def remove(self, index=0):
"""
Remove a Property from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol._IntProperty_remove(self, index)
def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol._IntProperty_clear(self)
def write(self):
"""
"""
return _libsbol._IntProperty_write(self)
def find(self, query):
return _libsbol._IntProperty_find(self, query)
def getLowerBound(self):
return _libsbol._IntProperty_getLowerBound(self)
def getUpperBound(self):
return _libsbol._IntProperty_getUpperBound(self)
def validate(self, arg=None):
"""
"""
return _libsbol._IntProperty_validate(self, arg)
def copy(self, target_property):
return _libsbol._IntProperty_copy(self, target_property)
__swig_setmethods__["python_iter"] = _libsbol._IntProperty_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol._IntProperty_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol._IntProperty_python_iter_get, _libsbol._IntProperty_python_iter_set)
def addValidationRule(self, *args):
return _libsbol._IntProperty_addValidationRule(self, *args)
_IntProperty_swigregister = _libsbol._IntProperty_swigregister
_IntProperty_swigregister(_IntProperty)
class _FloatProperty(_object):
"""
Member properties of all SBOL objects are defined using a Property object.
The Property class provides a generic interface for accessing SBOL objects. At a
low level, the Property class converts SBOL data structures into RDF triples.
templateparam
-------------
* `The` :
SBOL specification currently supports string, URI, and integer literal
values.
"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, _FloatProperty, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, _FloatProperty, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Parameters
----------
* `type_uri` :
An RDF hash URI for this property, consisting of a namespace followed by an
identifier. For example, Properties of SBOLObjects use URIs of the form
http://sbols.org/v2#somePropertyName, where the identifier somePropertyName
determines the appearance of XML nodes in an SBOL file. Alternatively,
annotations in a custom namespace can be provided using a similarly formed
hash URI in another namespace.
* `property_owner` :
All Property objects must have a pointer back to its parent SBOLObject of
which it is a member
* `initial_value` :
The initial value of the Property
* `validation_rules` :
A vector of externally defined ValidationRules. The vector contains pointers
to functions which correspond to the validation rules listed in the appendix
of the formal SBOL specification document. ValidationRules are automatically
checked every time a setter or adder method is called and when Documents are
read and written.
"""
this = _libsbol.new__FloatProperty(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete__FloatProperty
__del__ = lambda self: None
def getTypeURI(self):
"""
Returns
-------
The uniform resource identifier that describes the RDF-type of this SBOL Object
"""
return _libsbol._FloatProperty_getTypeURI(self)
def getOwner(self):
"""
"""
return _libsbol._FloatProperty_getOwner(self)
def set(self, *args):
"""
Basic setter for SBOL Property.
Parameters
----------
* `new_value` :
A new integer value for the property, which is converted to a raw string
during serialization.
"""
return _libsbol._FloatProperty_set(self, *args)
def add(self, new_value):
"""
Appends the new value to a list of values, for properties that allow it.
Parameters
----------
* `new_value` :
A new string which will be added to a list of values.
"""
return _libsbol._FloatProperty_add(self, new_value)
def remove(self, index=0):
"""
Remove a Property from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol._FloatProperty_remove(self, index)
def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol._FloatProperty_clear(self)
def write(self):
"""
"""
return _libsbol._FloatProperty_write(self)
def find(self, query):
return _libsbol._FloatProperty_find(self, query)
def getLowerBound(self):
return _libsbol._FloatProperty_getLowerBound(self)
def getUpperBound(self):
return _libsbol._FloatProperty_getUpperBound(self)
def validate(self, arg=None):
"""
"""
return _libsbol._FloatProperty_validate(self, arg)
def copy(self, target_property):
return _libsbol._FloatProperty_copy(self, target_property)
__swig_setmethods__["python_iter"] = _libsbol._FloatProperty_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol._FloatProperty_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol._FloatProperty_python_iter_get, _libsbol._FloatProperty_python_iter_set)
def addValidationRule(self, *args):
return _libsbol._FloatProperty_addValidationRule(self, *args)
_FloatProperty_swigregister = _libsbol._FloatProperty_swigregister
_FloatProperty_swigregister(_FloatProperty)
[docs]class URIProperty(_StringProperty):
"""
A URIProperty may contain a restricted type of string that conforms to the
specification for a Uniform Resource Identifier (URI), typically consisting of a
namespace authority followed by an identifier.
A URIProperty often contains a reference to an SBOL object or may contain an
ontology term.
"""
__swig_setmethods__ = {}
for _s in [_StringProperty]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, URIProperty, name, value)
__swig_getmethods__ = {}
for _s in [_StringProperty]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, URIProperty, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
"""
this = _libsbol.new_URIProperty(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
[docs] def get(self):
"""
Basic getter for all SBOL literal properties.
Returns
-------
A string of characters used to identify a resource
"""
return _libsbol.URIProperty_get(self)
[docs] def getAll(self):
"""
Retrieve a vector of objects from the URIProperty.
"""
val = _libsbol.URIProperty_getAll(self)
val = list(val)
return val
def __getitem__(self, nIndex):
return _libsbol.URIProperty___getitem__(self, nIndex)
def __iter__(self):
return _libsbol.URIProperty___iter__(self)
def next(self):
return _libsbol.URIProperty_next(self)
def __next__(self):
return _libsbol.URIProperty___next__(self)
def __len__(self):
return _libsbol.URIProperty___len__(self)
__swig_destroy__ = _libsbol.delete_URIProperty
__del__ = lambda self: None
URIProperty_swigregister = _libsbol.URIProperty_swigregister
URIProperty_swigregister(URIProperty)
[docs]class TextProperty(_StringProperty):
"""
TextProperty objects are used to contain string literals.
They can be used as member objects inside custom SBOL Extension classes.
"""
__swig_setmethods__ = {}
for _s in [_StringProperty]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, TextProperty, name, value)
__swig_getmethods__ = {}
for _s in [_StringProperty]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, TextProperty, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
"""
this = _libsbol.new_TextProperty(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
[docs] def get(self):
"""
Basic getter for all SBOL literal properties.
Returns
-------
A string literal
"""
return _libsbol.TextProperty_get(self)
[docs] def getAll(self):
"""
Retrieve a vector of objects from the TextProperty.
"""
val = _libsbol.TextProperty_getAll(self)
val = list(val)
return val
def __getitem__(self, nIndex):
return _libsbol.TextProperty___getitem__(self, nIndex)
def __iter__(self):
return _libsbol.TextProperty___iter__(self)
def next(self):
return _libsbol.TextProperty_next(self)
def __next__(self):
return _libsbol.TextProperty___next__(self)
def __len__(self):
return _libsbol.TextProperty___len__(self)
__swig_destroy__ = _libsbol.delete_TextProperty
__del__ = lambda self: None
TextProperty_swigregister = _libsbol.TextProperty_swigregister
TextProperty_swigregister(TextProperty)
[docs]class IntProperty(_IntProperty):
"""
IntProperty objects are used to contain integers.
They can be used as member objects inside custom SBOL Extension classes.
"""
__swig_setmethods__ = {}
for _s in [_IntProperty]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, IntProperty, name, value)
__swig_getmethods__ = {}
for _s in [_IntProperty]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, IntProperty, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
"""
this = _libsbol.new_IntProperty(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
[docs] def get(self):
"""
Basic getter for all SBOL literal properties.
Returns
-------
An integer
"""
return _libsbol.IntProperty_get(self)
[docs] def getAll(self):
"""
Retrieve a vector of objects from the IntProperty.
"""
val = _libsbol.IntProperty_getAll(self)
val = list(val)
return val
def __getitem__(self, nIndex):
return _libsbol.IntProperty___getitem__(self, nIndex)
def __iter__(self):
return _libsbol.IntProperty___iter__(self)
def next(self):
return _libsbol.IntProperty_next(self)
def __next__(self):
return _libsbol.IntProperty___next__(self)
def __len__(self):
return _libsbol.IntProperty___len__(self)
__swig_destroy__ = _libsbol.delete_IntProperty
__del__ = lambda self: None
IntProperty_swigregister = _libsbol.IntProperty_swigregister
IntProperty_swigregister(IntProperty)
class FloatProperty(_FloatProperty):
__swig_setmethods__ = {}
for _s in [_FloatProperty]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, FloatProperty, name, value)
__swig_getmethods__ = {}
for _s in [_FloatProperty]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, FloatProperty, name)
__repr__ = _swig_repr
def __init__(self, *args):
this = _libsbol.new_FloatProperty(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def get(self):
return _libsbol.FloatProperty_get(self)
def getAll(self):
val = _libsbol.FloatProperty_getAll(self)
val = list(val)
return val
def __getitem__(self, nIndex):
return _libsbol.FloatProperty___getitem__(self, nIndex)
def __iter__(self):
return _libsbol.FloatProperty___iter__(self)
def next(self):
return _libsbol.FloatProperty_next(self)
def __next__(self):
return _libsbol.FloatProperty___next__(self)
def __len__(self):
return _libsbol.FloatProperty___len__(self)
__swig_destroy__ = _libsbol.delete_FloatProperty
__del__ = lambda self: None
FloatProperty_swigregister = _libsbol.FloatProperty_swigregister
FloatProperty_swigregister(FloatProperty)
[docs]class VersionProperty(TextProperty):
"""
Contains a version number for an SBOL object.
The VersionProperty follows Maven versioning semantics and includes a major,
minor, and patch version number. Specifically, libSBOL currently only supports
using '.' as a delimiter (e.g.: v2.0.1). If the user does not want to follow Maven
versioning, they can specify an arbitrary version string using the set() method.
"""
__swig_setmethods__ = {}
for _s in [TextProperty]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, VersionProperty, name, value)
__swig_getmethods__ = {}
for _s in [TextProperty]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, VersionProperty, name)
__repr__ = _swig_repr
def split(self):
return _libsbol.VersionProperty_split(self)
[docs] def incrementMajor(self):
"""
Increment major version.
"""
return _libsbol.VersionProperty_incrementMajor(self)
[docs] def incrementMinor(self):
"""
Increment minor version.
"""
return _libsbol.VersionProperty_incrementMinor(self)
[docs] def incrementPatch(self):
"""
Increment patch version.
"""
return _libsbol.VersionProperty_incrementPatch(self)
[docs] def decrementMinor(self):
"""
Decrement major version.
"""
return _libsbol.VersionProperty_decrementMinor(self)
[docs] def decrementMajor(self):
"""
Decrement major version.
"""
return _libsbol.VersionProperty_decrementMajor(self)
[docs] def decrementPatch(self):
"""
Decrement major version.
"""
return _libsbol.VersionProperty_decrementPatch(self)
[docs] def major(self):
"""
Get major version.
Returns
-------
The major version as an integer Splits the version string by a delimiter and
returns the major version number
"""
return _libsbol.VersionProperty_major(self)
[docs] def minor(self):
"""
Get minor version.
Returns
-------
The minor version as an integer Splits the version string by a delimiter and
returns the minor version number
"""
return _libsbol.VersionProperty_minor(self)
[docs] def patch(self):
"""
Get patch version.
Returns
-------
The patch version as an integer Splits the version string by a delimiter and
returns the patch version
"""
return _libsbol.VersionProperty_patch(self)
def __init__(self, property_owner, type_uri, lower_bound, upper_bound, initial_value):
"""
"""
this = _libsbol.new_VersionProperty(property_owner, type_uri, lower_bound, upper_bound, initial_value)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete_VersionProperty
__del__ = lambda self: None
VersionProperty_swigregister = _libsbol.VersionProperty_swigregister
VersionProperty_swigregister(VersionProperty)
class DateTimeProperty(TextProperty):
__swig_setmethods__ = {}
for _s in [TextProperty]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, DateTimeProperty, name, value)
__swig_getmethods__ = {}
for _s in [TextProperty]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, DateTimeProperty, name)
__repr__ = _swig_repr
def __init__(self, *args):
this = _libsbol.new_DateTimeProperty(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def stampTime(self):
return _libsbol.DateTimeProperty_stampTime(self)
__swig_destroy__ = _libsbol.delete_DateTimeProperty
__del__ = lambda self: None
DateTimeProperty_swigregister = _libsbol.DateTimeProperty_swigregister
DateTimeProperty_swigregister(DateTimeProperty)
[docs]class SBOLObject(_object):
"""
An SBOLObject converts a class data structure into an RDF triple store and
contains methods for serializing and parsing RDF triples.
"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, SBOLObject, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, SBOLObject, name)
__repr__ = _swig_repr
__swig_setmethods__["doc"] = _libsbol.SBOLObject_doc_set
__swig_getmethods__["doc"] = _libsbol.SBOLObject_doc_get
if _newclass:
doc = _swig_property(_libsbol.SBOLObject_doc_get, _libsbol.SBOLObject_doc_set)
__swig_setmethods__["type"] = _libsbol.SBOLObject_type_set
__swig_getmethods__["type"] = _libsbol.SBOLObject_type_get
if _newclass:
type = _swig_property(_libsbol.SBOLObject_type_get, _libsbol.SBOLObject_type_set)
__swig_setmethods__["parent"] = _libsbol.SBOLObject_parent_set
__swig_getmethods__["parent"] = _libsbol.SBOLObject_parent_get
if _newclass:
parent = _swig_property(_libsbol.SBOLObject_parent_get, _libsbol.SBOLObject_parent_set)
__swig_setmethods__["identity"] = _libsbol.SBOLObject_identity_set
__swig_getmethods__["identity"] = _libsbol.SBOLObject_identity_get
if _newclass:
identity = _swig_property(_libsbol.SBOLObject_identity_get, _libsbol.SBOLObject_identity_set)
def __init__(self, *args):
"""
"""
this = _libsbol.new_SBOLObject(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete_SBOLObject
__del__ = lambda self: None
[docs] def getTypeURI(self):
"""
Returns
-------
The uniform resource identifier that describes the RDF-type of this SBOL Object
"""
return _libsbol.SBOLObject_getTypeURI(self)
[docs] def getClassName(self, type):
"""
Returns
-------
Parses a local class name from the RDF-type of this SBOL Object
"""
return _libsbol.SBOLObject_getClassName(self, type)
[docs] def find(self, uri):
"""
Search this object recursively to see if an object with the URI already exists.
Parameters
----------
* `uri` :
The URI to search for.
Returns
-------
A pointer to theobject with this URI if it exists, NULL otherwise
"""
return _libsbol.SBOLObject_find(self, uri)
[docs] def find_property(self, uri):
"""
Search this object recursively to see if it contains a member property with the
given RDF type.
Parameters
----------
* `uri` :
The RDF type of the property to search for.
Returns
-------
A pointer to the object that contains a member property with the specified RDF
type, NULL otherwise
"""
return _libsbol.SBOLObject_find_property(self, uri)
def find_property_value(self, *args):
return _libsbol.SBOLObject_find_property_value(self, *args)
def find_reference(self, uri):
return _libsbol.SBOLObject_find_reference(self, uri)
[docs] def compare(self, comparand):
"""
Compare two SBOL objects or Documents.
The behavior is currently undefined for objects with custom annotations or
extension classes.
Parameters
----------
* `comparand` :
A pointer to the object being compared to this one.
Returns
-------
1 if the objects are identical, 0 if they are different
"""
return _libsbol.SBOLObject_compare(self, comparand)
[docs] def getPropertyValue(self, property_uri):
"""
Get the value of a custom annotation property by its URI.
Parameters
----------
* `property_uri` :
The URI for the property
Returns
-------
The value of the property or SBOL_ERROR_NOT_FOUND
"""
return _libsbol.SBOLObject_getPropertyValue(self, property_uri)
[docs] def getPropertyValues(self, property_uri):
"""
Get all values of a custom annotation property by its URI.
Parameters
----------
* `property_uri` :
The URI for the property
Returns
-------
A vector of property values or SBOL_ERROR_NOT_FOUND
"""
return _libsbol.SBOLObject_getPropertyValues(self, property_uri)
[docs] def getProperties(self):
"""
Gets URIs for all properties contained by this object.
This includes SBOL core properties as well as custom annotations. Use this to
find custom extension data in an SBOL file.
Returns
-------
A vector of URIs that identify the properties contained in this object
"""
return _libsbol.SBOLObject_getProperties(self)
def setPropertyValue(self, property_uri, val):
return _libsbol.SBOLObject_setPropertyValue(self, property_uri, val)
def setAnnotation(self, property_uri, val):
return _libsbol.SBOLObject_setAnnotation(self, property_uri, val)
def getAnnotation(self, property_uri):
return _libsbol.SBOLObject_getAnnotation(self, property_uri)
def update_uri(self):
return _libsbol.SBOLObject_update_uri(self)
__swig_setmethods__["PythonObjects"] = _libsbol.SBOLObject_PythonObjects_set
__swig_getmethods__["PythonObjects"] = _libsbol.SBOLObject_PythonObjects_get
if _newclass:
PythonObjects = _swig_property(_libsbol.SBOLObject_PythonObjects_get, _libsbol.SBOLObject_PythonObjects_set)
def register_extension_class(self, python_class, extension_name):
return _libsbol.SBOLObject_register_extension_class(self, python_class, extension_name)
def cast(self, python_class):
return _libsbol.SBOLObject_cast(self, python_class)
def __str__(self):
return _libsbol.SBOLObject___str__(self)
def __getattribute__(self,name):
if name in object.__getattribute__(self, '__swig_getmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if sbol_attribute.getUpperBound() != '1':
return sbol_attribute.getAll()
else:
try:
return sbol_attribute.get()
except LookupError:
return None
return None
elif sbol_attribute.getUpperBound() == '1':
try:
return sbol_attribute.get()
except:
return None
return object.__getattribute__(self, name)
__setattribute__ = __setattr__
def __setattr__(self,name, value):
if name in object.__getattribute__(self, '__swig_setmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if value == None:
sbol_attribute.clear()
elif type(value) == list:
if sbol_attribute.getUpperBound() == '1':
raise TypeError('The ' + sbol_attribute.getTypeURI() + ' property does not accept list arguments')
sbol_attribute.clear()
for val in value:
sbol_attribute.add(val)
else:
sbol_attribute.set(value)
elif sbol_attribute.getUpperBound() == '1':
if len(sbol_attribute) > 0:
sbol_obj = sbol_attribute.get()
doc = sbol_obj.doc
sbol_attribute.remove()
if not doc:
sbol_obj.thisown = True
elif not doc.find(sbol_obj.identity):
sbol_obj.thisown = True
if not value == None:
sbol_attribute.set(value)
value.thisown = False
else:
self.__class__.__setattribute__(self, name, value)
def __repr__(self):
return self.__class__.__name__
SBOLObject_swigregister = _libsbol.SBOLObject_swigregister
SBOLObject_swigregister(SBOLObject)
[docs]class ReferencedObject(URIProperty):
"""
A reference to another SBOL object Contains a Uniform Resource Identifier (URI)
that refers to an an associated object.
The object it points to may be another resource in this Document or an external
reference, for example to an object in an external repository. In the SBOL
specification, association by reference is indicated in class diagrams by arrows
with open (white) diamonds.
"""
__swig_setmethods__ = {}
for _s in [URIProperty]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, ReferencedObject, name, value)
__swig_getmethods__ = {}
for _s in [URIProperty]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, ReferencedObject, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
"""
this = _libsbol.new_ReferencedObject(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
[docs] def create(self, uri):
"""
Creates another SBOL object derived from TopLevel and adds it to the Document.
Parameters
----------
* `uri` :
In "open world" mode, this is a full URI and the same as the returned URI.
If the default namespace for libSBOL has been configured, then this argument
should simply be a local identifier. If SBOL-compliance is enabled, this
argument should be the intended displayId of the new object. A full URI is
automatically generated and returned.
Returns
-------
The full URI of the created object.
"""
val = _libsbol.ReferencedObject_create(self, uri)
val.thisown = False
return val
[docs] def set(self, *args):
"""
Basic setter for SBOL ReferencedObject.
Parameters
----------
* `new_value` :
A new integer value for the property, which is converted to a raw string
during serialization.
"""
val = _libsbol.ReferencedObject_set(self, *args)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, *args):
"""
Appends the new value to a list of values, for properties that allow it.
Parameters
----------
* `new_value` :
A new string which will be added to a list of values.
"""
val = _libsbol.ReferencedObject_add(self, *args)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def addReference(self, uri):
"""
"""
return _libsbol.ReferencedObject_addReference(self, uri)
[docs] def setReference(self, uri):
"""
"""
return _libsbol.ReferencedObject_setReference(self, uri)
def __getitem__(self, nIndex):
return _libsbol.ReferencedObject___getitem__(self, nIndex)
def __iter__(self):
return _libsbol.ReferencedObject___iter__(self)
def next(self):
return _libsbol.ReferencedObject_next(self)
def __next__(self):
return _libsbol.ReferencedObject___next__(self)
def __len__(self):
return _libsbol.ReferencedObject___len__(self)
__swig_destroy__ = _libsbol.delete_ReferencedObject
__del__ = lambda self: None
ReferencedObject_swigregister = _libsbol.ReferencedObject_swigregister
ReferencedObject_swigregister(ReferencedObject)
def __ne__(a, b):
return _libsbol.__ne__(a, b)
__ne__ = _libsbol.__ne__
[docs]class Identified(SBOLObject):
"""
All SBOL-defined classes are directly or indirectly derived from the Identified
abstract class.
An Identified object is identified using a Uniform Resource Identifier (URI), a
unique string that identifies and refers to a specific object in an SBOL
document or in an online resource such as a DNA repository.
"""
__swig_setmethods__ = {}
for _s in [SBOLObject]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, Identified, name, value)
__swig_getmethods__ = {}
for _s in [SBOLObject]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, Identified, name)
__repr__ = _swig_repr
def __init__(self, *args):
this = _libsbol.new_Identified(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_setmethods__["persistentIdentity"] = _libsbol.Identified_persistentIdentity_set
__swig_getmethods__["persistentIdentity"] = _libsbol.Identified_persistentIdentity_get
if _newclass:
persistentIdentity = _swig_property(_libsbol.Identified_persistentIdentity_get, _libsbol.Identified_persistentIdentity_set)
__swig_setmethods__["displayId"] = _libsbol.Identified_displayId_set
__swig_getmethods__["displayId"] = _libsbol.Identified_displayId_get
if _newclass:
displayId = _swig_property(_libsbol.Identified_displayId_get, _libsbol.Identified_displayId_set)
__swig_setmethods__["version"] = _libsbol.Identified_version_set
__swig_getmethods__["version"] = _libsbol.Identified_version_get
if _newclass:
version = _swig_property(_libsbol.Identified_version_get, _libsbol.Identified_version_set)
__swig_setmethods__["wasDerivedFrom"] = _libsbol.Identified_wasDerivedFrom_set
__swig_getmethods__["wasDerivedFrom"] = _libsbol.Identified_wasDerivedFrom_get
if _newclass:
wasDerivedFrom = _swig_property(_libsbol.Identified_wasDerivedFrom_get, _libsbol.Identified_wasDerivedFrom_set)
__swig_setmethods__["wasGeneratedBy"] = _libsbol.Identified_wasGeneratedBy_set
__swig_getmethods__["wasGeneratedBy"] = _libsbol.Identified_wasGeneratedBy_get
if _newclass:
wasGeneratedBy = _swig_property(_libsbol.Identified_wasGeneratedBy_get, _libsbol.Identified_wasGeneratedBy_set)
__swig_setmethods__["name"] = _libsbol.Identified_name_set
__swig_getmethods__["name"] = _libsbol.Identified_name_get
if _newclass:
name = _swig_property(_libsbol.Identified_name_get, _libsbol.Identified_name_set)
__swig_setmethods__["description"] = _libsbol.Identified_description_set
__swig_getmethods__["description"] = _libsbol.Identified_description_get
if _newclass:
description = _swig_property(_libsbol.Identified_description_get, _libsbol.Identified_description_set)
__swig_destroy__ = _libsbol.delete_Identified
__del__ = lambda self: None
def __getattribute__(self,name):
if name in object.__getattribute__(self, '__swig_getmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if sbol_attribute.getUpperBound() != '1':
return sbol_attribute.getAll()
else:
try:
return sbol_attribute.get()
except LookupError:
return None
return None
elif sbol_attribute.getUpperBound() == '1':
try:
return sbol_attribute.get()
except:
return None
return object.__getattribute__(self, name)
__setattribute__ = __setattr__
def __setattr__(self,name, value):
if name in object.__getattribute__(self, '__swig_setmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if value == None:
sbol_attribute.clear()
elif type(value) == list:
if sbol_attribute.getUpperBound() == '1':
raise TypeError('The ' + sbol_attribute.getTypeURI() + ' property does not accept list arguments')
sbol_attribute.clear()
for val in value:
sbol_attribute.add(val)
else:
sbol_attribute.set(value)
elif sbol_attribute.getUpperBound() == '1':
if len(sbol_attribute) > 0:
sbol_obj = sbol_attribute.get()
doc = sbol_obj.doc
sbol_attribute.remove()
if not doc:
sbol_obj.thisown = True
elif not doc.find(sbol_obj.identity):
sbol_obj.thisown = True
if not value == None:
sbol_attribute.set(value)
value.thisown = False
else:
self.__class__.__setattribute__(self, name, value)
def __repr__(self):
return self.__class__.__name__
Identified_swigregister = _libsbol.Identified_swigregister
Identified_swigregister(Identified)
[docs]class TopLevel(Identified):
"""
All SBOL classes derived from TopLevel appear as top level nodes in the RDF/XML
document tree and SBOL files. An abstract class.
"""
__swig_setmethods__ = {}
for _s in [Identified]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, TopLevel, name, value)
__swig_getmethods__ = {}
for _s in [Identified]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, TopLevel, name)
__repr__ = _swig_repr
__swig_setmethods__["attachments"] = _libsbol.TopLevel_attachments_set
__swig_getmethods__["attachments"] = _libsbol.TopLevel_attachments_get
if _newclass:
attachments = _swig_property(_libsbol.TopLevel_attachments_get, _libsbol.TopLevel_attachments_set)
def __init__(self, *args):
"""
"""
this = _libsbol.new_TopLevel(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete_TopLevel
__del__ = lambda self: None
def initialize(self, uri):
return _libsbol.TopLevel_initialize(self, uri)
def generateDesign(self, *args):
return _libsbol.TopLevel_generateDesign(self, *args)
def generateBuild(self, *args):
return _libsbol.TopLevel_generateBuild(self, *args)
def generateTest(self, *args):
return _libsbol.TopLevel_generateTest(self, *args)
def generateAnalysis(self, *args):
return _libsbol.TopLevel_generateAnalysis(self, *args)
TopLevel_swigregister = _libsbol.TopLevel_swigregister
TopLevel_swigregister(TopLevel)
[docs]class Location(Identified):
"""
The Location class specifies the strand orientation of a Component and can be
further extended by the Range, Cut, and GenericLocation classes.
"""
__swig_setmethods__ = {}
for _s in [Identified]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, Location, name, value)
__swig_getmethods__ = {}
for _s in [Identified]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, Location, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
"""
this = _libsbol.new_Location(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_setmethods__["orientation"] = _libsbol.Location_orientation_set
__swig_getmethods__["orientation"] = _libsbol.Location_orientation_get
if _newclass:
orientation = _swig_property(_libsbol.Location_orientation_get, _libsbol.Location_orientation_set)
__swig_destroy__ = _libsbol.delete_Location
__del__ = lambda self: None
def __getattribute__(self,name):
if name in object.__getattribute__(self, '__swig_getmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if sbol_attribute.getUpperBound() != '1':
return sbol_attribute.getAll()
else:
try:
return sbol_attribute.get()
except LookupError:
return None
return None
elif sbol_attribute.getUpperBound() == '1':
try:
return sbol_attribute.get()
except:
return None
return object.__getattribute__(self, name)
__setattribute__ = __setattr__
def __setattr__(self,name, value):
if name in object.__getattribute__(self, '__swig_setmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if value == None:
sbol_attribute.clear()
elif type(value) == list:
if sbol_attribute.getUpperBound() == '1':
raise TypeError('The ' + sbol_attribute.getTypeURI() + ' property does not accept list arguments')
sbol_attribute.clear()
for val in value:
sbol_attribute.add(val)
else:
sbol_attribute.set(value)
elif sbol_attribute.getUpperBound() == '1':
if len(sbol_attribute) > 0:
sbol_obj = sbol_attribute.get()
doc = sbol_obj.doc
sbol_attribute.remove()
if not doc:
sbol_obj.thisown = True
elif not doc.find(sbol_obj.identity):
sbol_obj.thisown = True
if not value == None:
sbol_attribute.set(value)
value.thisown = False
else:
self.__class__.__setattribute__(self, name, value)
def __repr__(self):
return self.__class__.__name__
Location_swigregister = _libsbol.Location_swigregister
Location_swigregister(Location)
[docs]class Range(Location):
"""
A Range object specifies a region via discrete, inclusive start and end
positions that correspond to indices for characters in the elements String of a
Sequence. Note that the index of the first location is 1, as is typical practice
in biology, rather than 0, as is typical practice in computer science.
"""
__swig_setmethods__ = {}
for _s in [Location]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, Range, name, value)
__swig_getmethods__ = {}
for _s in [Location]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, Range, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Construct a Range.
If operating in SBOL-compliant mode, use SequenceAnnotation.locations.create instead.
Parameters
----------
* `uri` :
If operating in open-world mode, this should be a full URI including a
scheme, namespace, and identifier. If SBOLCompliance configuration is
enabled, then this argument is simply the displayId for the new object and a
full URI will automatically be constructed.
* `start` :
An integer of 1 or greater
* `end` :
An integer equal to or greater than the start
"""
this = _libsbol.new_Range(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_setmethods__["start"] = _libsbol.Range_start_set
__swig_getmethods__["start"] = _libsbol.Range_start_get
if _newclass:
start = _swig_property(_libsbol.Range_start_get, _libsbol.Range_start_set)
__swig_setmethods__["end"] = _libsbol.Range_end_set
__swig_getmethods__["end"] = _libsbol.Range_end_get
if _newclass:
end = _swig_property(_libsbol.Range_end_get, _libsbol.Range_end_set)
def precedes(self, comparand):
return _libsbol.Range_precedes(self, comparand)
def follows(self, comparand):
return _libsbol.Range_follows(self, comparand)
def contains(self, comparand):
return _libsbol.Range_contains(self, comparand)
def overlaps(self, comparand):
return _libsbol.Range_overlaps(self, comparand)
def length(self):
return _libsbol.Range_length(self)
def adjoins(self, comparand):
return _libsbol.Range_adjoins(self, comparand)
__swig_destroy__ = _libsbol.delete_Range
__del__ = lambda self: None
def __getattribute__(self,name):
if name in object.__getattribute__(self, '__swig_getmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if sbol_attribute.getUpperBound() != '1':
return sbol_attribute.getAll()
else:
try:
return sbol_attribute.get()
except LookupError:
return None
return None
elif sbol_attribute.getUpperBound() == '1':
try:
return sbol_attribute.get()
except:
return None
return object.__getattribute__(self, name)
__setattribute__ = __setattr__
def __setattr__(self,name, value):
if name in object.__getattribute__(self, '__swig_setmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if value == None:
sbol_attribute.clear()
elif type(value) == list:
if sbol_attribute.getUpperBound() == '1':
raise TypeError('The ' + sbol_attribute.getTypeURI() + ' property does not accept list arguments')
sbol_attribute.clear()
for val in value:
sbol_attribute.add(val)
else:
sbol_attribute.set(value)
elif sbol_attribute.getUpperBound() == '1':
if len(sbol_attribute) > 0:
sbol_obj = sbol_attribute.get()
doc = sbol_obj.doc
sbol_attribute.remove()
if not doc:
sbol_obj.thisown = True
elif not doc.find(sbol_obj.identity):
sbol_obj.thisown = True
if not value == None:
sbol_attribute.set(value)
value.thisown = False
else:
self.__class__.__setattribute__(self, name, value)
def __repr__(self):
return self.__class__.__name__
Range_swigregister = _libsbol.Range_swigregister
Range_swigregister(Range)
[docs]class Cut(Location):
"""
The Cut class specifies a location between two coordinates of a Sequence's
elements.
"""
__swig_setmethods__ = {}
for _s in [Location]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, Cut, name, value)
__swig_getmethods__ = {}
for _s in [Location]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, Cut, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Construct a Cut.
If operating in SBOL-compliant mode, use SequenceAnnotation.locations.create instead.
Parameters
----------
* `uri` :
If operating in open-world mode, this should be a full URI including a
scheme, namespace, and identifier. If SBOLCompliance configuration is
enabled, then this argument is simply the displayId for the new object and a
full URI will automatically be constructed.
* `at` :
An integer of 0 or greater
"""
this = _libsbol.new_Cut(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_setmethods__["at"] = _libsbol.Cut_at_set
__swig_getmethods__["at"] = _libsbol.Cut_at_get
if _newclass:
at = _swig_property(_libsbol.Cut_at_get, _libsbol.Cut_at_set)
__swig_destroy__ = _libsbol.delete_Cut
__del__ = lambda self: None
def __getattribute__(self,name):
if name in object.__getattribute__(self, '__swig_getmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if sbol_attribute.getUpperBound() != '1':
return sbol_attribute.getAll()
else:
try:
return sbol_attribute.get()
except LookupError:
return None
return None
elif sbol_attribute.getUpperBound() == '1':
try:
return sbol_attribute.get()
except:
return None
return object.__getattribute__(self, name)
__setattribute__ = __setattr__
def __setattr__(self,name, value):
if name in object.__getattribute__(self, '__swig_setmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if value == None:
sbol_attribute.clear()
elif type(value) == list:
if sbol_attribute.getUpperBound() == '1':
raise TypeError('The ' + sbol_attribute.getTypeURI() + ' property does not accept list arguments')
sbol_attribute.clear()
for val in value:
sbol_attribute.add(val)
else:
sbol_attribute.set(value)
elif sbol_attribute.getUpperBound() == '1':
if len(sbol_attribute) > 0:
sbol_obj = sbol_attribute.get()
doc = sbol_obj.doc
sbol_attribute.remove()
if not doc:
sbol_obj.thisown = True
elif not doc.find(sbol_obj.identity):
sbol_obj.thisown = True
if not value == None:
sbol_attribute.set(value)
value.thisown = False
else:
self.__class__.__setattribute__(self, name, value)
def __repr__(self):
return self.__class__.__name__
Cut_swigregister = _libsbol.Cut_swigregister
Cut_swigregister(Cut)
[docs]class GenericLocation(Location):
"""
the GenericLocation class is included as a starting point for specifying regions
on Sequence objects with encoding properties other than IUPAC and potentially
nonlinear structure. This class can also be used to set the orientation of a
SequenceAnnotation and any associated Component when their parent
ComponentDefinition is a partial design that lacks a Sequence.
"""
__swig_setmethods__ = {}
for _s in [Location]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, GenericLocation, name, value)
__swig_getmethods__ = {}
for _s in [Location]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, GenericLocation, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Construct a GenericLocation.
If operating in SBOL-compliant mode, use SequenceAnnotation.locations.create instead.
Parameters
----------
* `uri` :
If operating in open-world mode, this should be a full URI including a
scheme, namespace, and identifier. If SBOLCompliance configuration is
enabled, then this argument is simply the displayId for the new object and a
full URI will automatically be constructed.
"""
this = _libsbol.new_GenericLocation(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete_GenericLocation
__del__ = lambda self: None
GenericLocation_swigregister = _libsbol.GenericLocation_swigregister
GenericLocation_swigregister(GenericLocation)
[docs]class SequenceAnnotation(Identified):
"""
The SequenceAnnotation class describes one or more regions of interest on the
Sequence objects referred to by its parent ComponentDefinition. In addition,
SequenceAnnotation objects can describe the substructure of their parent
ComponentDefinition through association with the Component objects contained by
this ComponentDefinition.
"""
__swig_setmethods__ = {}
for _s in [Identified]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, SequenceAnnotation, name, value)
__swig_getmethods__ = {}
for _s in [Identified]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, SequenceAnnotation, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Construct a ComponentDefinition.
Parameters
----------
* `uri` :
A full URI including a scheme, namespace, and identifier. If SBOLCompliance
configuration is enabled, then this argument is simply the displayId for the
new object and a full URI will automatically be constructed.
* `version` :
An arbitrary version string. If SBOLCompliance is enabled, this should be a
Maven version string of the form "major.minor.patch".
"""
this = _libsbol.new_SequenceAnnotation(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_setmethods__["component"] = _libsbol.SequenceAnnotation_component_set
__swig_getmethods__["component"] = _libsbol.SequenceAnnotation_component_get
if _newclass:
component = _swig_property(_libsbol.SequenceAnnotation_component_get, _libsbol.SequenceAnnotation_component_set)
__swig_setmethods__["locations"] = _libsbol.SequenceAnnotation_locations_set
__swig_getmethods__["locations"] = _libsbol.SequenceAnnotation_locations_get
if _newclass:
locations = _swig_property(_libsbol.SequenceAnnotation_locations_get, _libsbol.SequenceAnnotation_locations_set)
__swig_setmethods__["roles"] = _libsbol.SequenceAnnotation_roles_set
__swig_getmethods__["roles"] = _libsbol.SequenceAnnotation_roles_get
if _newclass:
roles = _swig_property(_libsbol.SequenceAnnotation_roles_get, _libsbol.SequenceAnnotation_roles_set)
def precedes(self, *args):
return _libsbol.SequenceAnnotation_precedes(self, *args)
def follows(self, *args):
return _libsbol.SequenceAnnotation_follows(self, *args)
def contains(self, *args):
return _libsbol.SequenceAnnotation_contains(self, *args)
def overlaps(self, *args):
return _libsbol.SequenceAnnotation_overlaps(self, *args)
def extract(self, start_reference=1):
return _libsbol.SequenceAnnotation_extract(self, start_reference)
def length(self):
return _libsbol.SequenceAnnotation_length(self)
__swig_destroy__ = _libsbol.delete_SequenceAnnotation
__del__ = lambda self: None
def __getattribute__(self,name):
if name in object.__getattribute__(self, '__swig_getmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if sbol_attribute.getUpperBound() != '1':
return sbol_attribute.getAll()
else:
try:
return sbol_attribute.get()
except LookupError:
return None
return None
elif sbol_attribute.getUpperBound() == '1':
try:
return sbol_attribute.get()
except:
return None
return object.__getattribute__(self, name)
__setattribute__ = __setattr__
def __setattr__(self,name, value):
if name in object.__getattribute__(self, '__swig_setmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if value == None:
sbol_attribute.clear()
elif type(value) == list:
if sbol_attribute.getUpperBound() == '1':
raise TypeError('The ' + sbol_attribute.getTypeURI() + ' property does not accept list arguments')
sbol_attribute.clear()
for val in value:
sbol_attribute.add(val)
else:
sbol_attribute.set(value)
elif sbol_attribute.getUpperBound() == '1':
if len(sbol_attribute) > 0:
sbol_obj = sbol_attribute.get()
doc = sbol_obj.doc
sbol_attribute.remove()
if not doc:
sbol_obj.thisown = True
elif not doc.find(sbol_obj.identity):
sbol_obj.thisown = True
if not value == None:
sbol_attribute.set(value)
value.thisown = False
else:
self.__class__.__setattribute__(self, name, value)
def __repr__(self):
return self.__class__.__name__
SequenceAnnotation_swigregister = _libsbol.SequenceAnnotation_swigregister
SequenceAnnotation_swigregister(SequenceAnnotation)
[docs]class MapsTo(Identified):
"""
The purpose of the MapsTo class is to make identity relationships between
different ComponentInstances in functional and structural hierarchies more
clear. For example, a MapsTo object may be used to connect outputs and inputs
between different low-level ModuleDefinitions contained in a higher level Module
Definition. A MapsTo object may also be used to override a generic Component in
a low-level ModuleDefinition with an explicit Component in a high-level
ModuleDefinition, for example mapping a generic gene to an explicit component
with a name and sequence.
"""
__swig_setmethods__ = {}
for _s in [Identified]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, MapsTo, name, value)
__swig_getmethods__ = {}
for _s in [Identified]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, MapsTo, name)
__repr__ = _swig_repr
__swig_setmethods__["refinement"] = _libsbol.MapsTo_refinement_set
__swig_getmethods__["refinement"] = _libsbol.MapsTo_refinement_get
if _newclass:
refinement = _swig_property(_libsbol.MapsTo_refinement_get, _libsbol.MapsTo_refinement_set)
__swig_setmethods__["local"] = _libsbol.MapsTo_local_set
__swig_getmethods__["local"] = _libsbol.MapsTo_local_get
if _newclass:
local = _swig_property(_libsbol.MapsTo_local_get, _libsbol.MapsTo_local_set)
__swig_setmethods__["remote"] = _libsbol.MapsTo_remote_set
__swig_getmethods__["remote"] = _libsbol.MapsTo_remote_get
if _newclass:
remote = _swig_property(_libsbol.MapsTo_remote_get, _libsbol.MapsTo_remote_set)
def __init__(self, *args):
"""
Construct a MapsTo.
If operating in SBOL-compliant mode, use ModuleDefinition::mapsTos::create
instead.
Parameters
----------
* `uri` :
If operating in open-world mode, this should be a full URI including a
scheme, namespace, and identifier. If SBOLCompliance configuration is
enabled, then this argument is simply the displayId for the new object and a
full URI will automatically be constructed.
* `local` :
The identity of the lower level ComponentInstance
* `remote` :
The identity of the higher level ComponentInstance
* `restriction` :
Flag indicating the relationship between high- and low-level
ComponentInstances. By default, this is set to
SBOL_REFINEMENT_VERIFY_IDENTICAL
"""
this = _libsbol.new_MapsTo(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete_MapsTo
__del__ = lambda self: None
def __getattribute__(self,name):
if name in object.__getattribute__(self, '__swig_getmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if sbol_attribute.getUpperBound() != '1':
return sbol_attribute.getAll()
else:
try:
return sbol_attribute.get()
except LookupError:
return None
return None
elif sbol_attribute.getUpperBound() == '1':
try:
return sbol_attribute.get()
except:
return None
return object.__getattribute__(self, name)
__setattribute__ = __setattr__
def __setattr__(self,name, value):
if name in object.__getattribute__(self, '__swig_setmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if value == None:
sbol_attribute.clear()
elif type(value) == list:
if sbol_attribute.getUpperBound() == '1':
raise TypeError('The ' + sbol_attribute.getTypeURI() + ' property does not accept list arguments')
sbol_attribute.clear()
for val in value:
sbol_attribute.add(val)
else:
sbol_attribute.set(value)
elif sbol_attribute.getUpperBound() == '1':
if len(sbol_attribute) > 0:
sbol_obj = sbol_attribute.get()
doc = sbol_obj.doc
sbol_attribute.remove()
if not doc:
sbol_obj.thisown = True
elif not doc.find(sbol_obj.identity):
sbol_obj.thisown = True
if not value == None:
sbol_attribute.set(value)
value.thisown = False
else:
self.__class__.__setattribute__(self, name, value)
def __repr__(self):
return self.__class__.__name__
MapsTo_swigregister = _libsbol.MapsTo_swigregister
MapsTo_swigregister(MapsTo)
[docs]class ComponentInstance(Identified):
"""
"""
__swig_setmethods__ = {}
for _s in [Identified]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, ComponentInstance, name, value)
__swig_getmethods__ = {}
for _s in [Identified]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, ComponentInstance, name)
def __init__(self, *args, **kwargs):
raise AttributeError("No constructor defined")
__repr__ = _swig_repr
__swig_setmethods__["definition"] = _libsbol.ComponentInstance_definition_set
__swig_getmethods__["definition"] = _libsbol.ComponentInstance_definition_get
if _newclass:
definition = _swig_property(_libsbol.ComponentInstance_definition_get, _libsbol.ComponentInstance_definition_set)
__swig_setmethods__["access"] = _libsbol.ComponentInstance_access_set
__swig_getmethods__["access"] = _libsbol.ComponentInstance_access_get
if _newclass:
access = _swig_property(_libsbol.ComponentInstance_access_get, _libsbol.ComponentInstance_access_set)
__swig_setmethods__["mapsTos"] = _libsbol.ComponentInstance_mapsTos_set
__swig_getmethods__["mapsTos"] = _libsbol.ComponentInstance_mapsTos_get
if _newclass:
mapsTos = _swig_property(_libsbol.ComponentInstance_mapsTos_get, _libsbol.ComponentInstance_mapsTos_set)
__swig_destroy__ = _libsbol.delete_ComponentInstance
__del__ = lambda self: None
ComponentInstance_swigregister = _libsbol.ComponentInstance_swigregister
ComponentInstance_swigregister(ComponentInstance)
[docs]class Component(ComponentInstance):
"""
The Component class is used to compose ComponentDefinition objects into a
structural hierarchy. For example, the ComponentDefinition of a gene could
contain four Component objects: a promoter, RBS, CDS, and terminator. In turn,
the ComponentDefinition of the promoter Component could contain Component
objects defined as various operator sites.
"""
__swig_setmethods__ = {}
for _s in [ComponentInstance]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, Component, name, value)
__swig_getmethods__ = {}
for _s in [ComponentInstance]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, Component, name)
__repr__ = _swig_repr
__swig_setmethods__["roles"] = _libsbol.Component_roles_set
__swig_getmethods__["roles"] = _libsbol.Component_roles_get
if _newclass:
roles = _swig_property(_libsbol.Component_roles_get, _libsbol.Component_roles_set)
__swig_setmethods__["roleIntegration"] = _libsbol.Component_roleIntegration_set
__swig_getmethods__["roleIntegration"] = _libsbol.Component_roleIntegration_get
if _newclass:
roleIntegration = _swig_property(_libsbol.Component_roleIntegration_get, _libsbol.Component_roleIntegration_set)
def __init__(self, *args):
"""
Construct a Component.
If operating in SBOL-compliant mode, use ComponentDefinition::components::create
instead.
Parameters
----------
* `A` :
full URI including a scheme, namespace, and identifier. If SBOLCompliance
configuration is enabled, then this argument is simply the displayId for the
new object and a full URI will automatically be constructed.
* `definition` :
A URI referring to the ComponentDefinition that defines this instance
* `access` :
Flag indicating whether the Component can be referred to remotely by a
MapsTo
* `version` :
An arbitrary version string. If SBOLCompliance is enabled, this should be a
Maven version string of the form "major.minor.patch".
"""
this = _libsbol.new_Component(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete_Component
__del__ = lambda self: None
def __getattribute__(self,name):
if name in object.__getattribute__(self, '__swig_getmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if sbol_attribute.getUpperBound() != '1':
return sbol_attribute.getAll()
else:
try:
return sbol_attribute.get()
except LookupError:
return None
return None
elif sbol_attribute.getUpperBound() == '1':
try:
return sbol_attribute.get()
except:
return None
return object.__getattribute__(self, name)
__setattribute__ = __setattr__
def __setattr__(self,name, value):
if name in object.__getattribute__(self, '__swig_setmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if value == None:
sbol_attribute.clear()
elif type(value) == list:
if sbol_attribute.getUpperBound() == '1':
raise TypeError('The ' + sbol_attribute.getTypeURI() + ' property does not accept list arguments')
sbol_attribute.clear()
for val in value:
sbol_attribute.add(val)
else:
sbol_attribute.set(value)
elif sbol_attribute.getUpperBound() == '1':
if len(sbol_attribute) > 0:
sbol_obj = sbol_attribute.get()
doc = sbol_obj.doc
sbol_attribute.remove()
if not doc:
sbol_obj.thisown = True
elif not doc.find(sbol_obj.identity):
sbol_obj.thisown = True
if not value == None:
sbol_attribute.set(value)
value.thisown = False
else:
self.__class__.__setattribute__(self, name, value)
def __repr__(self):
return self.__class__.__name__
Component_swigregister = _libsbol.Component_swigregister
Component_swigregister(Component)
[docs]class FunctionalComponent(ComponentInstance):
"""
The FunctionalComponent class is used to specify the functional usage of a
ComponentDefinition inside a ModuleDefinition. The ModuleDefinition describes
how the that describes how the FunctionalComponent interacts with others and
summarizes their aggregate function.
"""
__swig_setmethods__ = {}
for _s in [ComponentInstance]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, FunctionalComponent, name, value)
__swig_getmethods__ = {}
for _s in [ComponentInstance]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, FunctionalComponent, name)
__repr__ = _swig_repr
__swig_setmethods__["direction"] = _libsbol.FunctionalComponent_direction_set
__swig_getmethods__["direction"] = _libsbol.FunctionalComponent_direction_get
if _newclass:
direction = _swig_property(_libsbol.FunctionalComponent_direction_get, _libsbol.FunctionalComponent_direction_set)
def __init__(self, *args):
"""
Construct a FunctionalComponent.
If operating in SBOL-compliant mode, use
ModuleDefinition::functionalComponents::create instead.
Parameters
----------
* `A` :
full URI including a scheme, namespace, and identifier. If SBOLCompliance
configuration is enabled, then this argument is simply the displayId for the
new object and a full URI will automatically be constructed.
* `definition` :
A URI referring to the ComponentDefinition that defines this instance
* `access` :
Flag indicating whether the FunctionalComponent can be referred to remotely
by a MapsTo
* `direction` :
The direction property specifies whether a FunctionalComponent serves as an
input, output, both, or neither for its parent ModuleDefinition object
* `version` :
An arbitrary version string. If SBOLCompliance is enabled, this should be a
Maven version string of the form "major.minor.patch".
"""
this = _libsbol.new_FunctionalComponent(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
[docs] def connect(self, interface_component):
"""
This method connects module inputs and outputs.
This convenience method auto-constructs a MapsTo object. See Biosystem Design
for an example
Parameters
----------
* `interface_component` :
An input or output component from another ModuleDefinition that corresponds
with this component.
"""
return _libsbol.FunctionalComponent_connect(self, interface_component)
[docs] def mask(self, masked_component):
"""
This method is used to state that FunctionalComponents in separate
ModuleDefinitions are functionally equivalent.
Using this method will override the FunctionalComponent in the argument with the
FunctionalComponent calling the method. This is useful for overriding a generic,
template component with an explicitly defined component. This convenience method
auto-constructs a MapsTo object. See Biosystem Design for an example
Parameters
----------
* `masked_component` :
The FunctionalComponent that is being masked (over-ridden)
"""
return _libsbol.FunctionalComponent_mask(self, masked_component)
def override(self, masked_component):
return _libsbol.FunctionalComponent_override(self, masked_component)
[docs] def isMasked(self):
"""
Used to tell if a FunctionalComponent is linked to an equivalent
FunctionalComponent in another ModuleDefinition.
Returns
-------
1 if the FunctionalComponent has been over-rided by another FunctionalComponent,
0 if it hasn't.
"""
return _libsbol.FunctionalComponent_isMasked(self)
__swig_destroy__ = _libsbol.delete_FunctionalComponent
__del__ = lambda self: None
def __getattribute__(self,name):
if name in object.__getattribute__(self, '__swig_getmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if sbol_attribute.getUpperBound() != '1':
return sbol_attribute.getAll()
else:
try:
return sbol_attribute.get()
except LookupError:
return None
return None
elif sbol_attribute.getUpperBound() == '1':
try:
return sbol_attribute.get()
except:
return None
return object.__getattribute__(self, name)
__setattribute__ = __setattr__
def __setattr__(self,name, value):
if name in object.__getattribute__(self, '__swig_setmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if value == None:
sbol_attribute.clear()
elif type(value) == list:
if sbol_attribute.getUpperBound() == '1':
raise TypeError('The ' + sbol_attribute.getTypeURI() + ' property does not accept list arguments')
sbol_attribute.clear()
for val in value:
sbol_attribute.add(val)
else:
sbol_attribute.set(value)
elif sbol_attribute.getUpperBound() == '1':
if len(sbol_attribute) > 0:
sbol_obj = sbol_attribute.get()
doc = sbol_obj.doc
sbol_attribute.remove()
if not doc:
sbol_obj.thisown = True
elif not doc.find(sbol_obj.identity):
sbol_obj.thisown = True
if not value == None:
sbol_attribute.set(value)
value.thisown = False
else:
self.__class__.__setattribute__(self, name, value)
def __repr__(self):
return self.__class__.__name__
FunctionalComponent_swigregister = _libsbol.FunctionalComponent_swigregister
FunctionalComponent_swigregister(FunctionalComponent)
[docs]class SequenceConstraint(Identified):
"""
The SequenceConstraint class can be used to assert restrictions on the relative,
sequence-based positions of pairs of Component objects contained by the same
parent ComponentDefinition. The primary purpose of this class is to enable the
specification of partially designed ComponentDefinition objects, for which the
precise positions or orientations of their contained Component objects are not
yet fully determined.
"""
__swig_setmethods__ = {}
for _s in [Identified]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, SequenceConstraint, name, value)
__swig_getmethods__ = {}
for _s in [Identified]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, SequenceConstraint, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Construct a SequenceConstraint.
If operating in SBOL-compliant mode, use
ComponentDefinition::sequenceConstraints::create instead.
Parameters
----------
* `uri` :
If operating in open-world mode, this should be a full URI including a
scheme, namespace, and identifier. If SBOLCompliance configuration is
enabled, then this argument is simply the displayId for the new object and a
full URI will automatically be constructed.
* `subject` :
Identity of the Component with this structural constraint
* `object` :
Identity of the other Component with this structural constraint
* `restriction` :
Flag indicating the type of structual constraint between the subject and
object Components. By default, this is set to SBOL_RESTRICTION_PRECEDES
"""
this = _libsbol.new_SequenceConstraint(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_setmethods__["subject"] = _libsbol.SequenceConstraint_subject_set
__swig_getmethods__["subject"] = _libsbol.SequenceConstraint_subject_get
if _newclass:
subject = _swig_property(_libsbol.SequenceConstraint_subject_get, _libsbol.SequenceConstraint_subject_set)
__swig_setmethods__["object"] = _libsbol.SequenceConstraint_object_set
__swig_getmethods__["object"] = _libsbol.SequenceConstraint_object_get
if _newclass:
object = _swig_property(_libsbol.SequenceConstraint_object_get, _libsbol.SequenceConstraint_object_set)
__swig_setmethods__["restriction"] = _libsbol.SequenceConstraint_restriction_set
__swig_getmethods__["restriction"] = _libsbol.SequenceConstraint_restriction_get
if _newclass:
restriction = _swig_property(_libsbol.SequenceConstraint_restriction_get, _libsbol.SequenceConstraint_restriction_set)
__swig_destroy__ = _libsbol.delete_SequenceConstraint
__del__ = lambda self: None
def __getattribute__(self,name):
if name in object.__getattribute__(self, '__swig_getmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if sbol_attribute.getUpperBound() != '1':
return sbol_attribute.getAll()
else:
try:
return sbol_attribute.get()
except LookupError:
return None
return None
elif sbol_attribute.getUpperBound() == '1':
try:
return sbol_attribute.get()
except:
return None
return object.__getattribute__(self, name)
__setattribute__ = __setattr__
def __setattr__(self,name, value):
if name in object.__getattribute__(self, '__swig_setmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if value == None:
sbol_attribute.clear()
elif type(value) == list:
if sbol_attribute.getUpperBound() == '1':
raise TypeError('The ' + sbol_attribute.getTypeURI() + ' property does not accept list arguments')
sbol_attribute.clear()
for val in value:
sbol_attribute.add(val)
else:
sbol_attribute.set(value)
elif sbol_attribute.getUpperBound() == '1':
if len(sbol_attribute) > 0:
sbol_obj = sbol_attribute.get()
doc = sbol_obj.doc
sbol_attribute.remove()
if not doc:
sbol_obj.thisown = True
elif not doc.find(sbol_obj.identity):
sbol_obj.thisown = True
if not value == None:
sbol_attribute.set(value)
value.thisown = False
else:
self.__class__.__setattribute__(self, name, value)
def __repr__(self):
return self.__class__.__name__
SequenceConstraint_swigregister = _libsbol.SequenceConstraint_swigregister
SequenceConstraint_swigregister(SequenceConstraint)
[docs]class ComponentDefinition(TopLevel):
"""
The ComponentDefinition class represents the structural entities of a biological
design.
The primary usage of this class is to represent structural entities with
designed sequences, such as DNA, RNA, and proteins, but it can also be used to
represent any other entity that is part of a design, such as small molecules,
proteins, and complexes
"""
__swig_setmethods__ = {}
for _s in [TopLevel]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, ComponentDefinition, name, value)
__swig_getmethods__ = {}
for _s in [TopLevel]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, ComponentDefinition, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Construct a ComponentDefinition.
Parameters
----------
* `uri` :
A full URI including a scheme, namespace, and identifier. If SBOLCompliance
configuration is enabled, then this argument is simply the displayId for the
new object and a full URI will automatically be constructed.
* `type` :
A BioPAX ontology term that indicates whether the ComponentDefinition is
DNA, RNA, protein, or some other molecule type.
* `version` :
An arbitrary version string. If SBOLCompliance is enabled, this should be a
Maven version string of the form "major.minor.patch".
"""
this = _libsbol.new_ComponentDefinition(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_setmethods__["types"] = _libsbol.ComponentDefinition_types_set
__swig_getmethods__["types"] = _libsbol.ComponentDefinition_types_get
if _newclass:
types = _swig_property(_libsbol.ComponentDefinition_types_get, _libsbol.ComponentDefinition_types_set)
__swig_setmethods__["roles"] = _libsbol.ComponentDefinition_roles_set
__swig_getmethods__["roles"] = _libsbol.ComponentDefinition_roles_get
if _newclass:
roles = _swig_property(_libsbol.ComponentDefinition_roles_get, _libsbol.ComponentDefinition_roles_set)
__swig_setmethods__["components"] = _libsbol.ComponentDefinition_components_set
__swig_getmethods__["components"] = _libsbol.ComponentDefinition_components_get
if _newclass:
components = _swig_property(_libsbol.ComponentDefinition_components_get, _libsbol.ComponentDefinition_components_set)
__swig_setmethods__["sequences"] = _libsbol.ComponentDefinition_sequences_set
__swig_getmethods__["sequences"] = _libsbol.ComponentDefinition_sequences_get
if _newclass:
sequences = _swig_property(_libsbol.ComponentDefinition_sequences_get, _libsbol.ComponentDefinition_sequences_set)
__swig_setmethods__["sequence"] = _libsbol.ComponentDefinition_sequence_set
__swig_getmethods__["sequence"] = _libsbol.ComponentDefinition_sequence_get
if _newclass:
sequence = _swig_property(_libsbol.ComponentDefinition_sequence_get, _libsbol.ComponentDefinition_sequence_set)
__swig_setmethods__["sequenceAnnotations"] = _libsbol.ComponentDefinition_sequenceAnnotations_set
__swig_getmethods__["sequenceAnnotations"] = _libsbol.ComponentDefinition_sequenceAnnotations_get
if _newclass:
sequenceAnnotations = _swig_property(_libsbol.ComponentDefinition_sequenceAnnotations_get, _libsbol.ComponentDefinition_sequenceAnnotations_set)
__swig_setmethods__["sequenceConstraints"] = _libsbol.ComponentDefinition_sequenceConstraints_set
__swig_getmethods__["sequenceConstraints"] = _libsbol.ComponentDefinition_sequenceConstraints_get
if _newclass:
sequenceConstraints = _swig_property(_libsbol.ComponentDefinition_sequenceConstraints_get, _libsbol.ComponentDefinition_sequenceConstraints_set)
[docs] def updateSequence(self, *args):
"""
Assemble a parent ComponentDefinition's Sequence from its subcomponent
Sequences.
Parameters
----------
* `composite_sequence` :
A recursive parameter, use default value
Returns
-------
The assembled parent sequence
"""
return _libsbol.ComponentDefinition_updateSequence(self, *args)
[docs] def getInSequentialOrder(self):
"""
Orders this ComponentDefinition's member Components into a linear arrangement
based on Sequence Constraints.
Returns
-------
Primary sequence structure
"""
return _libsbol.ComponentDefinition_getInSequentialOrder(self)
[docs] def hasUpstreamComponent(self, current_component):
"""
Checks if the specified Component has a Component upstream in linear arrangement
on the DNA strand.
Checks that the appropriate SequenceConstraint exists.
Parameters
----------
* `current_component` :
A Component in this ComponentDefinition
Returns
-------
1 if found, 0 if not
"""
return _libsbol.ComponentDefinition_hasUpstreamComponent(self, current_component)
[docs] def getUpstreamComponent(self, current_component):
"""
Get the upstream Component.
Returns
-------
The upstream component
"""
return _libsbol.ComponentDefinition_getUpstreamComponent(self, current_component)
[docs] def hasDownstreamComponent(self, current_component):
"""
Checks if the specified Component has a Component downstream in linear
arrangement on the DNA strand.
Checks that the appropriate SequenceConstraint exists.
Parameters
----------
* `current_component` :
A Component in this ComponentDefinition
Returns
-------
1 if found, 0 if not
"""
return _libsbol.ComponentDefinition_hasDownstreamComponent(self, current_component)
[docs] def getDownstreamComponent(self, current_component):
"""
Get the downstream Component.
Returns
-------
The downstream component
"""
return _libsbol.ComponentDefinition_getDownstreamComponent(self, current_component)
[docs] def getFirstComponent(self):
"""
Gets the first Component in a linear sequence.
Returns
-------
The first component in sequential order
"""
return _libsbol.ComponentDefinition_getFirstComponent(self)
[docs] def getLastComponent(self):
"""
Gets the last Component in a linear sequence.
Returns
-------
The last component in sequential order
"""
return _libsbol.ComponentDefinition_getLastComponent(self)
def applyToComponentHierarchy(self, callback_fn=None, user_data=None):
return _libsbol.ComponentDefinition_applyToComponentHierarchy(self, callback_fn, user_data)
def getPrimaryStructure(self):
return _libsbol.ComponentDefinition_getPrimaryStructure(self)
def insertDownstream(self, target, insert):
return _libsbol.ComponentDefinition_insertDownstream(self, target, insert)
def insertUpstream(self, target, insert):
return _libsbol.ComponentDefinition_insertUpstream(self, target, insert)
def addUpstreamFlank(self, target, elements):
return _libsbol.ComponentDefinition_addUpstreamFlank(self, target, elements)
def addDownstreamFlank(self, target, elements):
return _libsbol.ComponentDefinition_addDownstreamFlank(self, target, elements)
def isComplete(self, *args):
return _libsbol.ComponentDefinition_isComplete(self, *args)
def disassemble(self, range_start=1):
return _libsbol.ComponentDefinition_disassemble(self, range_start)
def build(self):
return _libsbol.ComponentDefinition_build(self)
[docs] def participate(self, species):
"""
A convenience method that assigns a component to participate in a biochemical
reaction.
Behind the scenes, it auto-constructs a FunctionalComponent for this
ComponentDefinition and assigns it to a Participation
Parameters
----------
* `species` :
A Participation object (ie, participant species in a biochemical
Interaction).
"""
return _libsbol.ComponentDefinition_participate(self, species)
__swig_destroy__ = _libsbol.delete_ComponentDefinition
__del__ = lambda self: None
[docs] def copy(self, *args):
"""
Copy an object and automatically increment its version.
If the optional version argument is specified, it will be used instead of
incrementing the copied object's version. An object may also be copied into a
new document and a new namespace, assuming compliant URIs.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object being copied
Parameters
----------
* `new_doc` :
The new copies will be attached to this Document. NULL by default.
* `ns` :
This namespace will be substituted for the current namespace (as configured
by setHomespace) in all SBOL-compliat URIs.
* `version` :
A new version
Returns
-------
The full URI of the created object.
"""
return _libsbol.ComponentDefinition_copy(self, *args)
def __getattribute__(self,name):
if name in object.__getattribute__(self, '__swig_getmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if sbol_attribute.getUpperBound() != '1':
return sbol_attribute.getAll()
else:
try:
return sbol_attribute.get()
except LookupError:
return None
return None
elif sbol_attribute.getUpperBound() == '1':
try:
return sbol_attribute.get()
except:
return None
return object.__getattribute__(self, name)
__setattribute__ = __setattr__
def __setattr__(self,name, value):
if name in object.__getattribute__(self, '__swig_setmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if value == None:
sbol_attribute.clear()
elif type(value) == list:
if sbol_attribute.getUpperBound() == '1':
raise TypeError('The ' + sbol_attribute.getTypeURI() + ' property does not accept list arguments')
sbol_attribute.clear()
for val in value:
sbol_attribute.add(val)
else:
sbol_attribute.set(value)
elif sbol_attribute.getUpperBound() == '1':
if len(sbol_attribute) > 0:
sbol_obj = sbol_attribute.get()
doc = sbol_obj.doc
sbol_attribute.remove()
if not doc:
sbol_obj.thisown = True
elif not doc.find(sbol_obj.identity):
sbol_obj.thisown = True
if not value == None:
sbol_attribute.set(value)
value.thisown = False
else:
self.__class__.__setattribute__(self, name, value)
def __repr__(self):
return self.__class__.__name__
[docs] def assemble(self, *args):
"""
Assembles the provided vector of Components into a structural hierarchy.
update SequenceAnnotation starts and ends
Autoconstructs the required Components and SequenceConstraints. The resulting
data structure is a partial design, still lacking a specific DNA (or other)
sequence. To fully realize a design, use Sequence::assemble().
Parameters
----------
* `list_of_components` :
A list of subcomponents that will compose this ComponentDefinition
"""
return _libsbol.ComponentDefinition_assemble(self, *args)
def assemblePrimaryStructure(self, *args):
return _libsbol.ComponentDefinition_assemblePrimaryStructure(self, *args)
def linearize(self, *args):
return _libsbol.ComponentDefinition_linearize(self, *args)
def isRegular(self, *args):
return _libsbol.ComponentDefinition_isRegular(self, *args)
ComponentDefinition_swigregister = _libsbol.ComponentDefinition_swigregister
ComponentDefinition_swigregister(ComponentDefinition)
[docs]class Sequence(TopLevel):
"""
The primary structure (eg, nucleotide or amino acid sequence) of a
ComponentDefinition object.
"""
__swig_setmethods__ = {}
for _s in [TopLevel]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, Sequence, name, value)
__swig_getmethods__ = {}
for _s in [TopLevel]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, Sequence, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Construct a ComponentDefinition.
Parameters
----------
* `uri` :
A full URI including a scheme, namespace, and identifier. If SBOLCompliance
configuration is enabled, then this argument is simply the displayId for the
new object and a full URI will automatically be constructed.
* `elements` :
A string representation of the primary structure of DNA, RNA, protein, or a
SMILES string for small molecules.
* `encoding` :
A URI that describes the representation format used for the elements
property. Set to SBOL_ENCODING_IUPAC by default
* `version` :
An arbitrary version string. If SBOLCompliance is enabled, this should be a
Maven version string.
"""
this = _libsbol.new_Sequence(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_setmethods__["elements"] = _libsbol.Sequence_elements_set
__swig_getmethods__["elements"] = _libsbol.Sequence_elements_get
if _newclass:
elements = _swig_property(_libsbol.Sequence_elements_get, _libsbol.Sequence_elements_set)
__swig_setmethods__["encoding"] = _libsbol.Sequence_encoding_set
__swig_getmethods__["encoding"] = _libsbol.Sequence_encoding_get
if _newclass:
encoding = _swig_property(_libsbol.Sequence_encoding_get, _libsbol.Sequence_encoding_set)
[docs] def assemble(self, *args):
"""
Calculates the complete sequence of a high-level Component from the sequence of
its subcomponents.
{rior to assembling the the complete sequence, you must assemble a template
design by calling ComponentDefinition::assemble for the ComponentDefinition that
references this Sequence.
Parameters
----------
* `composite_sequence` :
Typically no value for the composite sequence should be specified by the
user. This parameter is used to hold the composite sequence as it is passed
to function calls at a higher-level of the recursion stack.
"""
return _libsbol.Sequence_assemble(self, *args)
def compile(self):
return _libsbol.Sequence_compile(self)
def length(self):
return _libsbol.Sequence_length(self)
def synthesize(self, clone_id):
return _libsbol.Sequence_synthesize(self, clone_id)
__swig_destroy__ = _libsbol.delete_Sequence
__del__ = lambda self: None
[docs] def copy(self, *args):
"""
Copy an object and automatically increment its version.
If the optional version argument is specified, it will be used instead of
incrementing the copied object's version. An object may also be copied into a
new document and a new namespace, assuming compliant URIs.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object being copied
Parameters
----------
* `new_doc` :
The new copies will be attached to this Document. NULL by default.
* `ns` :
This namespace will be substituted for the current namespace (as configured
by setHomespace) in all SBOL-compliat URIs.
* `version` :
A new version
Returns
-------
The full URI of the created object.
"""
return _libsbol.Sequence_copy(self, *args)
def __getattribute__(self,name):
if name in object.__getattribute__(self, '__swig_getmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if sbol_attribute.getUpperBound() != '1':
return sbol_attribute.getAll()
else:
try:
return sbol_attribute.get()
except LookupError:
return None
return None
elif sbol_attribute.getUpperBound() == '1':
try:
return sbol_attribute.get()
except:
return None
return object.__getattribute__(self, name)
__setattribute__ = __setattr__
def __setattr__(self,name, value):
if name in object.__getattribute__(self, '__swig_setmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if value == None:
sbol_attribute.clear()
elif type(value) == list:
if sbol_attribute.getUpperBound() == '1':
raise TypeError('The ' + sbol_attribute.getTypeURI() + ' property does not accept list arguments')
sbol_attribute.clear()
for val in value:
sbol_attribute.add(val)
else:
sbol_attribute.set(value)
elif sbol_attribute.getUpperBound() == '1':
if len(sbol_attribute) > 0:
sbol_obj = sbol_attribute.get()
doc = sbol_obj.doc
sbol_attribute.remove()
if not doc:
sbol_obj.thisown = True
elif not doc.find(sbol_obj.identity):
sbol_obj.thisown = True
if not value == None:
sbol_attribute.set(value)
value.thisown = False
else:
self.__class__.__setattribute__(self, name, value)
def __repr__(self):
return self.__class__.__name__
Sequence_swigregister = _libsbol.Sequence_swigregister
Sequence_swigregister(Sequence)
[docs]class Participation(Identified):
"""
Each Participation represents how a particular FunctionalComponent behaves in
its parent Interaction.
"""
__swig_setmethods__ = {}
for _s in [Identified]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, Participation, name, value)
__swig_getmethods__ = {}
for _s in [Identified]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, Participation, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
"""
this = _libsbol.new_Participation(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_setmethods__["roles"] = _libsbol.Participation_roles_set
__swig_getmethods__["roles"] = _libsbol.Participation_roles_get
if _newclass:
roles = _swig_property(_libsbol.Participation_roles_get, _libsbol.Participation_roles_set)
__swig_setmethods__["participant"] = _libsbol.Participation_participant_set
__swig_getmethods__["participant"] = _libsbol.Participation_participant_get
if _newclass:
participant = _swig_property(_libsbol.Participation_participant_get, _libsbol.Participation_participant_set)
def define(self, *args):
return _libsbol.Participation_define(self, *args)
__swig_destroy__ = _libsbol.delete_Participation
__del__ = lambda self: None
def __getattribute__(self,name):
if name in object.__getattribute__(self, '__swig_getmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if sbol_attribute.getUpperBound() != '1':
return sbol_attribute.getAll()
else:
try:
return sbol_attribute.get()
except LookupError:
return None
return None
elif sbol_attribute.getUpperBound() == '1':
try:
return sbol_attribute.get()
except:
return None
return object.__getattribute__(self, name)
__setattribute__ = __setattr__
def __setattr__(self,name, value):
if name in object.__getattribute__(self, '__swig_setmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if value == None:
sbol_attribute.clear()
elif type(value) == list:
if sbol_attribute.getUpperBound() == '1':
raise TypeError('The ' + sbol_attribute.getTypeURI() + ' property does not accept list arguments')
sbol_attribute.clear()
for val in value:
sbol_attribute.add(val)
else:
sbol_attribute.set(value)
elif sbol_attribute.getUpperBound() == '1':
if len(sbol_attribute) > 0:
sbol_obj = sbol_attribute.get()
doc = sbol_obj.doc
sbol_attribute.remove()
if not doc:
sbol_obj.thisown = True
elif not doc.find(sbol_obj.identity):
sbol_obj.thisown = True
if not value == None:
sbol_attribute.set(value)
value.thisown = False
else:
self.__class__.__setattribute__(self, name, value)
def __repr__(self):
return self.__class__.__name__
Participation_swigregister = _libsbol.Participation_swigregister
Participation_swigregister(Participation)
[docs]class Interaction(Identified):
"""
The Interaction class provides more detailed descriptionof how the
FunctionalComponents are intended to work together. For example, this class can
be used to represent different forms of genetic regulation (e.g.,
transcriptional activation or repression), processes from the central dogma of
biology (e.g. transcription and translation), and other basic molecular
interactions (e.g., non-covalent binding or enzymatic phosphorylation).
"""
__swig_setmethods__ = {}
for _s in [Identified]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, Interaction, name, value)
__swig_getmethods__ = {}
for _s in [Identified]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, Interaction, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Construct an Interaction.
Parameters
----------
* `uri` :
A full URI including a scheme, namespace, and identifier. If SBOLCompliance
configuration is enabled, then this argument is simply the displayId for the
new object and a full URI will automatically be constructed.
* `interaction_type` :
A Systems Biology Ontology term that describes a biochemical interaction
"""
this = _libsbol.new_Interaction(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_setmethods__["types"] = _libsbol.Interaction_types_set
__swig_getmethods__["types"] = _libsbol.Interaction_types_get
if _newclass:
types = _swig_property(_libsbol.Interaction_types_get, _libsbol.Interaction_types_set)
__swig_setmethods__["participations"] = _libsbol.Interaction_participations_set
__swig_getmethods__["participations"] = _libsbol.Interaction_participations_get
if _newclass:
participations = _swig_property(_libsbol.Interaction_participations_get, _libsbol.Interaction_participations_set)
__swig_setmethods__["functionalComponents"] = _libsbol.Interaction_functionalComponents_set
__swig_getmethods__["functionalComponents"] = _libsbol.Interaction_functionalComponents_get
if _newclass:
functionalComponents = _swig_property(_libsbol.Interaction_functionalComponents_get, _libsbol.Interaction_functionalComponents_set)
__swig_destroy__ = _libsbol.delete_Interaction
__del__ = lambda self: None
def __getattribute__(self,name):
if name in object.__getattribute__(self, '__swig_getmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if sbol_attribute.getUpperBound() != '1':
return sbol_attribute.getAll()
else:
try:
return sbol_attribute.get()
except LookupError:
return None
return None
elif sbol_attribute.getUpperBound() == '1':
try:
return sbol_attribute.get()
except:
return None
return object.__getattribute__(self, name)
__setattribute__ = __setattr__
def __setattr__(self,name, value):
if name in object.__getattribute__(self, '__swig_setmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if value == None:
sbol_attribute.clear()
elif type(value) == list:
if sbol_attribute.getUpperBound() == '1':
raise TypeError('The ' + sbol_attribute.getTypeURI() + ' property does not accept list arguments')
sbol_attribute.clear()
for val in value:
sbol_attribute.add(val)
else:
sbol_attribute.set(value)
elif sbol_attribute.getUpperBound() == '1':
if len(sbol_attribute) > 0:
sbol_obj = sbol_attribute.get()
doc = sbol_obj.doc
sbol_attribute.remove()
if not doc:
sbol_obj.thisown = True
elif not doc.find(sbol_obj.identity):
sbol_obj.thisown = True
if not value == None:
sbol_attribute.set(value)
value.thisown = False
else:
self.__class__.__setattribute__(self, name, value)
def __repr__(self):
return self.__class__.__name__
Interaction_swigregister = _libsbol.Interaction_swigregister
Interaction_swigregister(Interaction)
[docs]class Module(Identified):
"""
The Module class represents a submodule of a ModuleDefinition within a
hierarchical design.
"""
__swig_setmethods__ = {}
for _s in [Identified]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, Module, name, value)
__swig_getmethods__ = {}
for _s in [Identified]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, Module, name)
__repr__ = _swig_repr
__swig_setmethods__["definition"] = _libsbol.Module_definition_set
__swig_getmethods__["definition"] = _libsbol.Module_definition_get
if _newclass:
definition = _swig_property(_libsbol.Module_definition_get, _libsbol.Module_definition_set)
__swig_setmethods__["mapsTos"] = _libsbol.Module_mapsTos_set
__swig_getmethods__["mapsTos"] = _libsbol.Module_mapsTos_get
if _newclass:
mapsTos = _swig_property(_libsbol.Module_mapsTos_get, _libsbol.Module_mapsTos_set)
def __init__(self, *args):
"""
Construct a Module.
If operating in SBOL-compliant mode, use ModuleDefinition::modules::create
instead.
Parameters
----------
* `uri` :
If operating in open-world mode, this should be a full URI including a
scheme, namespace, and identifier. If SBOLCompliance configuration is
enabled, then this argument is simply the displayId for the new object and a
full URI will automatically be constructed.
* `definition` :
The identity of the Component with this structural constraint
* `version` :
An arbitrary version string. If SBOLCompliance is enabled, this should be a
Maven version string of the form "major.minor.patch".
"""
this = _libsbol.new_Module(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete_Module
__del__ = lambda self: None
def __getattribute__(self,name):
if name in object.__getattribute__(self, '__swig_getmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if sbol_attribute.getUpperBound() != '1':
return sbol_attribute.getAll()
else:
try:
return sbol_attribute.get()
except LookupError:
return None
return None
elif sbol_attribute.getUpperBound() == '1':
try:
return sbol_attribute.get()
except:
return None
return object.__getattribute__(self, name)
__setattribute__ = __setattr__
def __setattr__(self,name, value):
if name in object.__getattribute__(self, '__swig_setmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if value == None:
sbol_attribute.clear()
elif type(value) == list:
if sbol_attribute.getUpperBound() == '1':
raise TypeError('The ' + sbol_attribute.getTypeURI() + ' property does not accept list arguments')
sbol_attribute.clear()
for val in value:
sbol_attribute.add(val)
else:
sbol_attribute.set(value)
elif sbol_attribute.getUpperBound() == '1':
if len(sbol_attribute) > 0:
sbol_obj = sbol_attribute.get()
doc = sbol_obj.doc
sbol_attribute.remove()
if not doc:
sbol_obj.thisown = True
elif not doc.find(sbol_obj.identity):
sbol_obj.thisown = True
if not value == None:
sbol_attribute.set(value)
value.thisown = False
else:
self.__class__.__setattribute__(self, name, value)
def __repr__(self):
return self.__class__.__name__
Module_swigregister = _libsbol.Module_swigregister
Module_swigregister(Module)
[docs]class Model(TopLevel):
"""
The purpose of the Model class is to serve as a placeholder for an external
computational model and provide additional meta-data to enable better reasoning
about the contents of this model.
In this way, there is minimal duplication of standardization efforts and users
of SBOL can formalize the function of a ModuleDefinition in the language of
their choice.
"""
__swig_setmethods__ = {}
for _s in [TopLevel]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, Model, name, value)
__swig_getmethods__ = {}
for _s in [TopLevel]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, Model, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
"""
this = _libsbol.new_Model(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_setmethods__["source"] = _libsbol.Model_source_set
__swig_getmethods__["source"] = _libsbol.Model_source_get
if _newclass:
source = _swig_property(_libsbol.Model_source_get, _libsbol.Model_source_set)
__swig_setmethods__["language"] = _libsbol.Model_language_set
__swig_getmethods__["language"] = _libsbol.Model_language_get
if _newclass:
language = _swig_property(_libsbol.Model_language_get, _libsbol.Model_language_set)
__swig_setmethods__["framework"] = _libsbol.Model_framework_set
__swig_getmethods__["framework"] = _libsbol.Model_framework_get
if _newclass:
framework = _swig_property(_libsbol.Model_framework_get, _libsbol.Model_framework_set)
__swig_destroy__ = _libsbol.delete_Model
__del__ = lambda self: None
[docs] def copy(self, *args):
"""
Copy an object and automatically increment its version.
If the optional version argument is specified, it will be used instead of
incrementing the copied object's version. An object may also be copied into a
new document and a new namespace, assuming compliant URIs.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object being copied
Parameters
----------
* `new_doc` :
The new copies will be attached to this Document. NULL by default.
* `ns` :
This namespace will be substituted for the current namespace (as configured
by setHomespace) in all SBOL-compliat URIs.
* `version` :
A new version
Returns
-------
The full URI of the created object.
"""
return _libsbol.Model_copy(self, *args)
def __getattribute__(self,name):
if name in object.__getattribute__(self, '__swig_getmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if sbol_attribute.getUpperBound() != '1':
return sbol_attribute.getAll()
else:
try:
return sbol_attribute.get()
except LookupError:
return None
return None
elif sbol_attribute.getUpperBound() == '1':
try:
return sbol_attribute.get()
except:
return None
return object.__getattribute__(self, name)
__setattribute__ = __setattr__
def __setattr__(self,name, value):
if name in object.__getattribute__(self, '__swig_setmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if value == None:
sbol_attribute.clear()
elif type(value) == list:
if sbol_attribute.getUpperBound() == '1':
raise TypeError('The ' + sbol_attribute.getTypeURI() + ' property does not accept list arguments')
sbol_attribute.clear()
for val in value:
sbol_attribute.add(val)
else:
sbol_attribute.set(value)
elif sbol_attribute.getUpperBound() == '1':
if len(sbol_attribute) > 0:
sbol_obj = sbol_attribute.get()
doc = sbol_obj.doc
sbol_attribute.remove()
if not doc:
sbol_obj.thisown = True
elif not doc.find(sbol_obj.identity):
sbol_obj.thisown = True
if not value == None:
sbol_attribute.set(value)
value.thisown = False
else:
self.__class__.__setattribute__(self, name, value)
def __repr__(self):
return self.__class__.__name__
Model_swigregister = _libsbol.Model_swigregister
Model_swigregister(Model)
[docs]class Collection(TopLevel):
"""
The Collection class is a class that groups together a set of TopLevel objects
that have something in common.
Some examples of Collection objects: . Results of a query to find all
ComponentDefinition objects in a repository that function as promoters . A set
of ModuleDefinition objects representing a library of genetic logic gates. . A
ModuleDefinition for a complexdesign, and all of the ModuleDefinition,
ComponentDefinition, Sequence, and Model objects used to provide its full
specification.
"""
__swig_setmethods__ = {}
for _s in [TopLevel]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, Collection, name, value)
__swig_getmethods__ = {}
for _s in [TopLevel]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, Collection, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Construct a Collection.
Parameters
----------
* `uri` :
If operating in open-world mode, this should be a full URI including a
scheme, namespace, and identifier. If SBOLCompliance configuration is
enabled, then this argument is simply the displayId for the new object and a
full URI will automatically be constructed.
"""
this = _libsbol.new_Collection(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_setmethods__["members"] = _libsbol.Collection_members_set
__swig_getmethods__["members"] = _libsbol.Collection_members_get
if _newclass:
members = _swig_property(_libsbol.Collection_members_get, _libsbol.Collection_members_set)
__swig_destroy__ = _libsbol.delete_Collection
__del__ = lambda self: None
[docs] def copy(self, *args):
"""
Copy an object and automatically increment its version.
If the optional version argument is specified, it will be used instead of
incrementing the copied object's version. An object may also be copied into a
new document and a new namespace, assuming compliant URIs.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object being copied
Parameters
----------
* `new_doc` :
The new copies will be attached to this Document. NULL by default.
* `ns` :
This namespace will be substituted for the current namespace (as configured
by setHomespace) in all SBOL-compliat URIs.
* `version` :
A new version
Returns
-------
The full URI of the created object.
"""
return _libsbol.Collection_copy(self, *args)
def __getattribute__(self,name):
if name in object.__getattribute__(self, '__swig_getmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if sbol_attribute.getUpperBound() != '1':
return sbol_attribute.getAll()
else:
try:
return sbol_attribute.get()
except LookupError:
return None
return None
elif sbol_attribute.getUpperBound() == '1':
try:
return sbol_attribute.get()
except:
return None
return object.__getattribute__(self, name)
__setattribute__ = __setattr__
def __setattr__(self,name, value):
if name in object.__getattribute__(self, '__swig_setmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if value == None:
sbol_attribute.clear()
elif type(value) == list:
if sbol_attribute.getUpperBound() == '1':
raise TypeError('The ' + sbol_attribute.getTypeURI() + ' property does not accept list arguments')
sbol_attribute.clear()
for val in value:
sbol_attribute.add(val)
else:
sbol_attribute.set(value)
elif sbol_attribute.getUpperBound() == '1':
if len(sbol_attribute) > 0:
sbol_obj = sbol_attribute.get()
doc = sbol_obj.doc
sbol_attribute.remove()
if not doc:
sbol_obj.thisown = True
elif not doc.find(sbol_obj.identity):
sbol_obj.thisown = True
if not value == None:
sbol_attribute.set(value)
value.thisown = False
else:
self.__class__.__setattribute__(self, name, value)
def __repr__(self):
return self.__class__.__name__
Collection_swigregister = _libsbol.Collection_swigregister
Collection_swigregister(Collection)
[docs]class ModuleDefinition(TopLevel):
"""
The ModuleDefinition class represents a grouping of structural and functional
entities in a biological design. The primary usage of this class is to assert
the molecular interactions and abstract function of its child entities.
"""
__swig_setmethods__ = {}
for _s in [TopLevel]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, ModuleDefinition, name, value)
__swig_getmethods__ = {}
for _s in [TopLevel]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, ModuleDefinition, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Construct a ModuleDefinition.
Parameters
----------
* `uri` :
A full URI including a scheme, namespace, and identifier. If SBOLCompliance
configuration is enabled, then this argument is simply the displayId for the
new object and a full URI will automatically be constructed.
* `version` :
An arbitrary version string. If SBOLCompliance is enabled, this should be a
valid Maven version string.
"""
this = _libsbol.new_ModuleDefinition(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_setmethods__["roles"] = _libsbol.ModuleDefinition_roles_set
__swig_getmethods__["roles"] = _libsbol.ModuleDefinition_roles_get
if _newclass:
roles = _swig_property(_libsbol.ModuleDefinition_roles_get, _libsbol.ModuleDefinition_roles_set)
__swig_setmethods__["modules"] = _libsbol.ModuleDefinition_modules_set
__swig_getmethods__["modules"] = _libsbol.ModuleDefinition_modules_get
if _newclass:
modules = _swig_property(_libsbol.ModuleDefinition_modules_get, _libsbol.ModuleDefinition_modules_set)
__swig_setmethods__["interactions"] = _libsbol.ModuleDefinition_interactions_set
__swig_getmethods__["interactions"] = _libsbol.ModuleDefinition_interactions_get
if _newclass:
interactions = _swig_property(_libsbol.ModuleDefinition_interactions_get, _libsbol.ModuleDefinition_interactions_set)
__swig_setmethods__["functionalComponents"] = _libsbol.ModuleDefinition_functionalComponents_set
__swig_getmethods__["functionalComponents"] = _libsbol.ModuleDefinition_functionalComponents_get
if _newclass:
functionalComponents = _swig_property(_libsbol.ModuleDefinition_functionalComponents_get, _libsbol.ModuleDefinition_functionalComponents_set)
__swig_setmethods__["models"] = _libsbol.ModuleDefinition_models_set
__swig_getmethods__["models"] = _libsbol.ModuleDefinition_models_get
if _newclass:
models = _swig_property(_libsbol.ModuleDefinition_models_get, _libsbol.ModuleDefinition_models_set)
[docs] def setOutput(self, *args):
"""
Defines an output for a system module.
Parameters
----------
* `output` :
A ComponentDefinition that defines the output
Returns
-------
A FunctionalComponent that is derived from the argument ComponentDefinition and
configured as this ModuleDefinition's output (it's direction property is set to
SBOL_DIRECTION_OUT)
"""
return _libsbol.ModuleDefinition_setOutput(self, *args)
def connect(self, output, input):
return _libsbol.ModuleDefinition_connect(self, output, input)
def override(self, highlevel, lowlevel):
return _libsbol.ModuleDefinition_override(self, highlevel, lowlevel)
__swig_destroy__ = _libsbol.delete_ModuleDefinition
__del__ = lambda self: None
[docs] def copy(self, *args):
"""
Copy an object and automatically increment its version.
If the optional version argument is specified, it will be used instead of
incrementing the copied object's version. An object may also be copied into a
new document and a new namespace, assuming compliant URIs.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object being copied
Parameters
----------
* `new_doc` :
The new copies will be attached to this Document. NULL by default.
* `ns` :
This namespace will be substituted for the current namespace (as configured
by setHomespace) in all SBOL-compliat URIs.
* `version` :
A new version
Returns
-------
The full URI of the created object.
"""
return _libsbol.ModuleDefinition_copy(self, *args)
def __getattribute__(self,name):
if name in object.__getattribute__(self, '__swig_getmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if sbol_attribute.getUpperBound() != '1':
return sbol_attribute.getAll()
else:
try:
return sbol_attribute.get()
except LookupError:
return None
return None
elif sbol_attribute.getUpperBound() == '1':
try:
return sbol_attribute.get()
except:
return None
return object.__getattribute__(self, name)
__setattribute__ = __setattr__
def __setattr__(self,name, value):
if name in object.__getattribute__(self, '__swig_setmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if value == None:
sbol_attribute.clear()
elif type(value) == list:
if sbol_attribute.getUpperBound() == '1':
raise TypeError('The ' + sbol_attribute.getTypeURI() + ' property does not accept list arguments')
sbol_attribute.clear()
for val in value:
sbol_attribute.add(val)
else:
sbol_attribute.set(value)
elif sbol_attribute.getUpperBound() == '1':
if len(sbol_attribute) > 0:
sbol_obj = sbol_attribute.get()
doc = sbol_obj.doc
sbol_attribute.remove()
if not doc:
sbol_obj.thisown = True
elif not doc.find(sbol_obj.identity):
sbol_obj.thisown = True
if not value == None:
sbol_attribute.set(value)
value.thisown = False
else:
self.__class__.__setattribute__(self, name, value)
def __repr__(self):
return self.__class__.__name__
[docs] def assemble(self, *args):
"""
Assemble a high-level ModuleDefinition from lower-level submodules.
Autoconstructs Module objects in the process.
Parameters
----------
* `list_of_modules` :
A list of pointers to the submodule ModuleDefinitions
"""
return _libsbol.ModuleDefinition_assemble(self, *args)
ModuleDefinition_swigregister = _libsbol.ModuleDefinition_swigregister
ModuleDefinition_swigregister(ModuleDefinition)
class Association(Identified):
__swig_setmethods__ = {}
for _s in [Identified]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, Association, name, value)
__swig_getmethods__ = {}
for _s in [Identified]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, Association, name)
__repr__ = _swig_repr
def __init__(self, *args):
this = _libsbol.new_Association(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_setmethods__["agent"] = _libsbol.Association_agent_set
__swig_getmethods__["agent"] = _libsbol.Association_agent_get
if _newclass:
agent = _swig_property(_libsbol.Association_agent_get, _libsbol.Association_agent_set)
__swig_setmethods__["roles"] = _libsbol.Association_roles_set
__swig_getmethods__["roles"] = _libsbol.Association_roles_get
if _newclass:
roles = _swig_property(_libsbol.Association_roles_get, _libsbol.Association_roles_set)
__swig_setmethods__["plan"] = _libsbol.Association_plan_set
__swig_getmethods__["plan"] = _libsbol.Association_plan_get
if _newclass:
plan = _swig_property(_libsbol.Association_plan_get, _libsbol.Association_plan_set)
__swig_destroy__ = _libsbol.delete_Association
__del__ = lambda self: None
Association_swigregister = _libsbol.Association_swigregister
Association_swigregister(Association)
class Usage(Identified):
__swig_setmethods__ = {}
for _s in [Identified]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, Usage, name, value)
__swig_getmethods__ = {}
for _s in [Identified]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, Usage, name)
__repr__ = _swig_repr
def __init__(self, *args):
this = _libsbol.new_Usage(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_setmethods__["entity"] = _libsbol.Usage_entity_set
__swig_getmethods__["entity"] = _libsbol.Usage_entity_get
if _newclass:
entity = _swig_property(_libsbol.Usage_entity_get, _libsbol.Usage_entity_set)
__swig_setmethods__["roles"] = _libsbol.Usage_roles_set
__swig_getmethods__["roles"] = _libsbol.Usage_roles_get
if _newclass:
roles = _swig_property(_libsbol.Usage_roles_get, _libsbol.Usage_roles_set)
def __getattribute__(self,name):
if name in object.__getattribute__(self, '__swig_getmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if sbol_attribute.getUpperBound() != '1':
return sbol_attribute.getAll()
else:
try:
return sbol_attribute.get()
except LookupError:
return None
return None
elif sbol_attribute.getUpperBound() == '1':
try:
return sbol_attribute.get()
except:
return None
return object.__getattribute__(self, name)
__setattribute__ = __setattr__
def __setattr__(self,name, value):
if name in object.__getattribute__(self, '__swig_setmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if value == None:
sbol_attribute.clear()
elif type(value) == list:
if sbol_attribute.getUpperBound() == '1':
raise TypeError('The ' + sbol_attribute.getTypeURI() + ' property does not accept list arguments')
sbol_attribute.clear()
for val in value:
sbol_attribute.add(val)
else:
sbol_attribute.set(value)
elif sbol_attribute.getUpperBound() == '1':
if len(sbol_attribute) > 0:
sbol_obj = sbol_attribute.get()
doc = sbol_obj.doc
sbol_attribute.remove()
if not doc:
sbol_obj.thisown = True
elif not doc.find(sbol_obj.identity):
sbol_obj.thisown = True
if not value == None:
sbol_attribute.set(value)
value.thisown = False
else:
self.__class__.__setattribute__(self, name, value)
def __repr__(self):
return self.__class__.__name__
__swig_destroy__ = _libsbol.delete_Usage
__del__ = lambda self: None
Usage_swigregister = _libsbol.Usage_swigregister
Usage_swigregister(Usage)
class Agent(TopLevel):
__swig_setmethods__ = {}
for _s in [TopLevel]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, Agent, name, value)
__swig_getmethods__ = {}
for _s in [TopLevel]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, Agent, name)
__repr__ = _swig_repr
def __init__(self, *args):
this = _libsbol.new_Agent(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def copy(self, *args):
"""
Copy an object and automatically increment its version.
If the optional version argument is specified, it will be used instead of
incrementing the copied object's version. An object may also be copied into a
new document and a new namespace, assuming compliant URIs.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object being copied
Parameters
----------
* `new_doc` :
The new copies will be attached to this Document. NULL by default.
* `ns` :
This namespace will be substituted for the current namespace (as configured
by setHomespace) in all SBOL-compliat URIs.
* `version` :
A new version
Returns
-------
The full URI of the created object.
"""
return _libsbol.Agent_copy(self, *args)
def __getattribute__(self,name):
if name in object.__getattribute__(self, '__swig_getmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if sbol_attribute.getUpperBound() != '1':
return sbol_attribute.getAll()
else:
try:
return sbol_attribute.get()
except LookupError:
return None
return None
elif sbol_attribute.getUpperBound() == '1':
try:
return sbol_attribute.get()
except:
return None
return object.__getattribute__(self, name)
__setattribute__ = __setattr__
def __setattr__(self,name, value):
if name in object.__getattribute__(self, '__swig_setmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if value == None:
sbol_attribute.clear()
elif type(value) == list:
if sbol_attribute.getUpperBound() == '1':
raise TypeError('The ' + sbol_attribute.getTypeURI() + ' property does not accept list arguments')
sbol_attribute.clear()
for val in value:
sbol_attribute.add(val)
else:
sbol_attribute.set(value)
elif sbol_attribute.getUpperBound() == '1':
if len(sbol_attribute) > 0:
sbol_obj = sbol_attribute.get()
doc = sbol_obj.doc
sbol_attribute.remove()
if not doc:
sbol_obj.thisown = True
elif not doc.find(sbol_obj.identity):
sbol_obj.thisown = True
if not value == None:
sbol_attribute.set(value)
value.thisown = False
else:
self.__class__.__setattribute__(self, name, value)
def __repr__(self):
return self.__class__.__name__
__swig_destroy__ = _libsbol.delete_Agent
__del__ = lambda self: None
Agent_swigregister = _libsbol.Agent_swigregister
Agent_swigregister(Agent)
class Plan(TopLevel):
__swig_setmethods__ = {}
for _s in [TopLevel]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, Plan, name, value)
__swig_getmethods__ = {}
for _s in [TopLevel]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, Plan, name)
__repr__ = _swig_repr
def __init__(self, *args):
this = _libsbol.new_Plan(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def copy(self, *args):
"""
Copy an object and automatically increment its version.
If the optional version argument is specified, it will be used instead of
incrementing the copied object's version. An object may also be copied into a
new document and a new namespace, assuming compliant URIs.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object being copied
Parameters
----------
* `new_doc` :
The new copies will be attached to this Document. NULL by default.
* `ns` :
This namespace will be substituted for the current namespace (as configured
by setHomespace) in all SBOL-compliat URIs.
* `version` :
A new version
Returns
-------
The full URI of the created object.
"""
return _libsbol.Plan_copy(self, *args)
def __getattribute__(self,name):
if name in object.__getattribute__(self, '__swig_getmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if sbol_attribute.getUpperBound() != '1':
return sbol_attribute.getAll()
else:
try:
return sbol_attribute.get()
except LookupError:
return None
return None
elif sbol_attribute.getUpperBound() == '1':
try:
return sbol_attribute.get()
except:
return None
return object.__getattribute__(self, name)
__setattribute__ = __setattr__
def __setattr__(self,name, value):
if name in object.__getattribute__(self, '__swig_setmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if value == None:
sbol_attribute.clear()
elif type(value) == list:
if sbol_attribute.getUpperBound() == '1':
raise TypeError('The ' + sbol_attribute.getTypeURI() + ' property does not accept list arguments')
sbol_attribute.clear()
for val in value:
sbol_attribute.add(val)
else:
sbol_attribute.set(value)
elif sbol_attribute.getUpperBound() == '1':
if len(sbol_attribute) > 0:
sbol_obj = sbol_attribute.get()
doc = sbol_obj.doc
sbol_attribute.remove()
if not doc:
sbol_obj.thisown = True
elif not doc.find(sbol_obj.identity):
sbol_obj.thisown = True
if not value == None:
sbol_attribute.set(value)
value.thisown = False
else:
self.__class__.__setattribute__(self, name, value)
def __repr__(self):
return self.__class__.__name__
__swig_destroy__ = _libsbol.delete_Plan
__del__ = lambda self: None
Plan_swigregister = _libsbol.Plan_swigregister
Plan_swigregister(Plan)
class Activity(TopLevel):
__swig_setmethods__ = {}
for _s in [TopLevel]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, Activity, name, value)
__swig_getmethods__ = {}
for _s in [TopLevel]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, Activity, name)
__repr__ = _swig_repr
def __init__(self, *args):
this = _libsbol.new_Activity(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_setmethods__["startedAtTime"] = _libsbol.Activity_startedAtTime_set
__swig_getmethods__["startedAtTime"] = _libsbol.Activity_startedAtTime_get
if _newclass:
startedAtTime = _swig_property(_libsbol.Activity_startedAtTime_get, _libsbol.Activity_startedAtTime_set)
__swig_setmethods__["endedAtTime"] = _libsbol.Activity_endedAtTime_set
__swig_getmethods__["endedAtTime"] = _libsbol.Activity_endedAtTime_get
if _newclass:
endedAtTime = _swig_property(_libsbol.Activity_endedAtTime_get, _libsbol.Activity_endedAtTime_set)
__swig_setmethods__["wasInformedBy"] = _libsbol.Activity_wasInformedBy_set
__swig_getmethods__["wasInformedBy"] = _libsbol.Activity_wasInformedBy_get
if _newclass:
wasInformedBy = _swig_property(_libsbol.Activity_wasInformedBy_get, _libsbol.Activity_wasInformedBy_set)
__swig_setmethods__["associations"] = _libsbol.Activity_associations_set
__swig_getmethods__["associations"] = _libsbol.Activity_associations_get
if _newclass:
associations = _swig_property(_libsbol.Activity_associations_get, _libsbol.Activity_associations_set)
__swig_setmethods__["usages"] = _libsbol.Activity_usages_set
__swig_getmethods__["usages"] = _libsbol.Activity_usages_get
if _newclass:
usages = _swig_property(_libsbol.Activity_usages_get, _libsbol.Activity_usages_set)
__swig_destroy__ = _libsbol.delete_Activity
__del__ = lambda self: None
def copy(self, *args):
"""
Copy an object and automatically increment its version.
If the optional version argument is specified, it will be used instead of
incrementing the copied object's version. An object may also be copied into a
new document and a new namespace, assuming compliant URIs.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object being copied
Parameters
----------
* `new_doc` :
The new copies will be attached to this Document. NULL by default.
* `ns` :
This namespace will be substituted for the current namespace (as configured
by setHomespace) in all SBOL-compliat URIs.
* `version` :
A new version
Returns
-------
The full URI of the created object.
"""
return _libsbol.Activity_copy(self, *args)
def __getattribute__(self,name):
if name in object.__getattribute__(self, '__swig_getmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if sbol_attribute.getUpperBound() != '1':
return sbol_attribute.getAll()
else:
try:
return sbol_attribute.get()
except LookupError:
return None
return None
elif sbol_attribute.getUpperBound() == '1':
try:
return sbol_attribute.get()
except:
return None
return object.__getattribute__(self, name)
__setattribute__ = __setattr__
def __setattr__(self,name, value):
if name in object.__getattribute__(self, '__swig_setmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if value == None:
sbol_attribute.clear()
elif type(value) == list:
if sbol_attribute.getUpperBound() == '1':
raise TypeError('The ' + sbol_attribute.getTypeURI() + ' property does not accept list arguments')
sbol_attribute.clear()
for val in value:
sbol_attribute.add(val)
else:
sbol_attribute.set(value)
elif sbol_attribute.getUpperBound() == '1':
if len(sbol_attribute) > 0:
sbol_obj = sbol_attribute.get()
doc = sbol_obj.doc
sbol_attribute.remove()
if not doc:
sbol_obj.thisown = True
elif not doc.find(sbol_obj.identity):
sbol_obj.thisown = True
if not value == None:
sbol_attribute.set(value)
value.thisown = False
else:
self.__class__.__setattribute__(self, name, value)
def __repr__(self):
return self.__class__.__name__
Activity_swigregister = _libsbol.Activity_swigregister
Activity_swigregister(Activity)
class VariableComponent(Identified):
__swig_setmethods__ = {}
for _s in [Identified]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, VariableComponent, name, value)
__swig_getmethods__ = {}
for _s in [Identified]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, VariableComponent, name)
__repr__ = _swig_repr
def __init__(self, *args):
this = _libsbol.new_VariableComponent(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_setmethods__["variable"] = _libsbol.VariableComponent_variable_set
__swig_getmethods__["variable"] = _libsbol.VariableComponent_variable_get
if _newclass:
variable = _swig_property(_libsbol.VariableComponent_variable_get, _libsbol.VariableComponent_variable_set)
__swig_setmethods__["repeat"] = _libsbol.VariableComponent_repeat_set
__swig_getmethods__["repeat"] = _libsbol.VariableComponent_repeat_get
if _newclass:
repeat = _swig_property(_libsbol.VariableComponent_repeat_get, _libsbol.VariableComponent_repeat_set)
__swig_setmethods__["variants"] = _libsbol.VariableComponent_variants_set
__swig_getmethods__["variants"] = _libsbol.VariableComponent_variants_get
if _newclass:
variants = _swig_property(_libsbol.VariableComponent_variants_get, _libsbol.VariableComponent_variants_set)
__swig_setmethods__["variantCollections"] = _libsbol.VariableComponent_variantCollections_set
__swig_getmethods__["variantCollections"] = _libsbol.VariableComponent_variantCollections_get
if _newclass:
variantCollections = _swig_property(_libsbol.VariableComponent_variantCollections_get, _libsbol.VariableComponent_variantCollections_set)
__swig_setmethods__["variantDerivations"] = _libsbol.VariableComponent_variantDerivations_set
__swig_getmethods__["variantDerivations"] = _libsbol.VariableComponent_variantDerivations_get
if _newclass:
variantDerivations = _swig_property(_libsbol.VariableComponent_variantDerivations_get, _libsbol.VariableComponent_variantDerivations_set)
__swig_destroy__ = _libsbol.delete_VariableComponent
__del__ = lambda self: None
VariableComponent_swigregister = _libsbol.VariableComponent_swigregister
VariableComponent_swigregister(VariableComponent)
class CombinatorialDerivation(TopLevel):
__swig_setmethods__ = {}
for _s in [TopLevel]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, CombinatorialDerivation, name, value)
__swig_getmethods__ = {}
for _s in [TopLevel]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, CombinatorialDerivation, name)
__repr__ = _swig_repr
def __init__(self, *args):
this = _libsbol.new_CombinatorialDerivation(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_setmethods__["strategy"] = _libsbol.CombinatorialDerivation_strategy_set
__swig_getmethods__["strategy"] = _libsbol.CombinatorialDerivation_strategy_get
if _newclass:
strategy = _swig_property(_libsbol.CombinatorialDerivation_strategy_get, _libsbol.CombinatorialDerivation_strategy_set)
__swig_setmethods__["masterTemplate"] = _libsbol.CombinatorialDerivation_masterTemplate_set
__swig_getmethods__["masterTemplate"] = _libsbol.CombinatorialDerivation_masterTemplate_get
if _newclass:
masterTemplate = _swig_property(_libsbol.CombinatorialDerivation_masterTemplate_get, _libsbol.CombinatorialDerivation_masterTemplate_set)
__swig_setmethods__["variableComponents"] = _libsbol.CombinatorialDerivation_variableComponents_set
__swig_getmethods__["variableComponents"] = _libsbol.CombinatorialDerivation_variableComponents_get
if _newclass:
variableComponents = _swig_property(_libsbol.CombinatorialDerivation_variableComponents_get, _libsbol.CombinatorialDerivation_variableComponents_set)
def copy(self, *args):
"""
Copy an object and automatically increment its version.
If the optional version argument is specified, it will be used instead of
incrementing the copied object's version. An object may also be copied into a
new document and a new namespace, assuming compliant URIs.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object being copied
Parameters
----------
* `new_doc` :
The new copies will be attached to this Document. NULL by default.
* `ns` :
This namespace will be substituted for the current namespace (as configured
by setHomespace) in all SBOL-compliat URIs.
* `version` :
A new version
Returns
-------
The full URI of the created object.
"""
return _libsbol.CombinatorialDerivation_copy(self, *args)
def __getattribute__(self,name):
if name in object.__getattribute__(self, '__swig_getmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if sbol_attribute.getUpperBound() != '1':
return sbol_attribute.getAll()
else:
try:
return sbol_attribute.get()
except LookupError:
return None
return None
elif sbol_attribute.getUpperBound() == '1':
try:
return sbol_attribute.get()
except:
return None
return object.__getattribute__(self, name)
__setattribute__ = __setattr__
def __setattr__(self,name, value):
if name in object.__getattribute__(self, '__swig_setmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if value == None:
sbol_attribute.clear()
elif type(value) == list:
if sbol_attribute.getUpperBound() == '1':
raise TypeError('The ' + sbol_attribute.getTypeURI() + ' property does not accept list arguments')
sbol_attribute.clear()
for val in value:
sbol_attribute.add(val)
else:
sbol_attribute.set(value)
elif sbol_attribute.getUpperBound() == '1':
if len(sbol_attribute) > 0:
sbol_obj = sbol_attribute.get()
doc = sbol_obj.doc
sbol_attribute.remove()
if not doc:
sbol_obj.thisown = True
elif not doc.find(sbol_obj.identity):
sbol_obj.thisown = True
if not value == None:
sbol_attribute.set(value)
value.thisown = False
else:
self.__class__.__setattribute__(self, name, value)
def __repr__(self):
return self.__class__.__name__
__swig_destroy__ = _libsbol.delete_CombinatorialDerivation
__del__ = lambda self: None
CombinatorialDerivation_swigregister = _libsbol.CombinatorialDerivation_swigregister
CombinatorialDerivation_swigregister(CombinatorialDerivation)
class Attachment(TopLevel):
__swig_setmethods__ = {}
for _s in [TopLevel]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, Attachment, name, value)
__swig_getmethods__ = {}
for _s in [TopLevel]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, Attachment, name)
__repr__ = _swig_repr
def __init__(self, *args):
this = _libsbol.new_Attachment(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_setmethods__["source"] = _libsbol.Attachment_source_set
__swig_getmethods__["source"] = _libsbol.Attachment_source_get
if _newclass:
source = _swig_property(_libsbol.Attachment_source_get, _libsbol.Attachment_source_set)
__swig_setmethods__["format"] = _libsbol.Attachment_format_set
__swig_getmethods__["format"] = _libsbol.Attachment_format_get
if _newclass:
format = _swig_property(_libsbol.Attachment_format_get, _libsbol.Attachment_format_set)
__swig_setmethods__["hash"] = _libsbol.Attachment_hash_set
__swig_getmethods__["hash"] = _libsbol.Attachment_hash_get
if _newclass:
hash = _swig_property(_libsbol.Attachment_hash_get, _libsbol.Attachment_hash_set)
__swig_destroy__ = _libsbol.delete_Attachment
__del__ = lambda self: None
def copy(self, *args):
"""
Copy an object and automatically increment its version.
If the optional version argument is specified, it will be used instead of
incrementing the copied object's version. An object may also be copied into a
new document and a new namespace, assuming compliant URIs.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object being copied
Parameters
----------
* `new_doc` :
The new copies will be attached to this Document. NULL by default.
* `ns` :
This namespace will be substituted for the current namespace (as configured
by setHomespace) in all SBOL-compliat URIs.
* `version` :
A new version
Returns
-------
The full URI of the created object.
"""
return _libsbol.Attachment_copy(self, *args)
def __getattribute__(self,name):
if name in object.__getattribute__(self, '__swig_getmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if sbol_attribute.getUpperBound() != '1':
return sbol_attribute.getAll()
else:
try:
return sbol_attribute.get()
except LookupError:
return None
return None
elif sbol_attribute.getUpperBound() == '1':
try:
return sbol_attribute.get()
except:
return None
return object.__getattribute__(self, name)
__setattribute__ = __setattr__
def __setattr__(self,name, value):
if name in object.__getattribute__(self, '__swig_setmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if value == None:
sbol_attribute.clear()
elif type(value) == list:
if sbol_attribute.getUpperBound() == '1':
raise TypeError('The ' + sbol_attribute.getTypeURI() + ' property does not accept list arguments')
sbol_attribute.clear()
for val in value:
sbol_attribute.add(val)
else:
sbol_attribute.set(value)
elif sbol_attribute.getUpperBound() == '1':
if len(sbol_attribute) > 0:
sbol_obj = sbol_attribute.get()
doc = sbol_obj.doc
sbol_attribute.remove()
if not doc:
sbol_obj.thisown = True
elif not doc.find(sbol_obj.identity):
sbol_obj.thisown = True
if not value == None:
sbol_attribute.set(value)
value.thisown = False
else:
self.__class__.__setattribute__(self, name, value)
def __repr__(self):
return self.__class__.__name__
Attachment_swigregister = _libsbol.Attachment_swigregister
Attachment_swigregister(Attachment)
class Implementation(TopLevel):
__swig_setmethods__ = {}
for _s in [TopLevel]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, Implementation, name, value)
__swig_getmethods__ = {}
for _s in [TopLevel]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, Implementation, name)
__repr__ = _swig_repr
def __init__(self, *args):
this = _libsbol.new_Implementation(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_setmethods__["built"] = _libsbol.Implementation_built_set
__swig_getmethods__["built"] = _libsbol.Implementation_built_get
if _newclass:
built = _swig_property(_libsbol.Implementation_built_get, _libsbol.Implementation_built_set)
__swig_destroy__ = _libsbol.delete_Implementation
__del__ = lambda self: None
def copy(self, *args):
"""
Copy an object and automatically increment its version.
If the optional version argument is specified, it will be used instead of
incrementing the copied object's version. An object may also be copied into a
new document and a new namespace, assuming compliant URIs.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object being copied
Parameters
----------
* `new_doc` :
The new copies will be attached to this Document. NULL by default.
* `ns` :
This namespace will be substituted for the current namespace (as configured
by setHomespace) in all SBOL-compliat URIs.
* `version` :
A new version
Returns
-------
The full URI of the created object.
"""
return _libsbol.Implementation_copy(self, *args)
def __getattribute__(self,name):
if name in object.__getattribute__(self, '__swig_getmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if sbol_attribute.getUpperBound() != '1':
return sbol_attribute.getAll()
else:
try:
return sbol_attribute.get()
except LookupError:
return None
return None
elif sbol_attribute.getUpperBound() == '1':
try:
return sbol_attribute.get()
except:
return None
return object.__getattribute__(self, name)
__setattribute__ = __setattr__
def __setattr__(self,name, value):
if name in object.__getattribute__(self, '__swig_setmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if value == None:
sbol_attribute.clear()
elif type(value) == list:
if sbol_attribute.getUpperBound() == '1':
raise TypeError('The ' + sbol_attribute.getTypeURI() + ' property does not accept list arguments')
sbol_attribute.clear()
for val in value:
sbol_attribute.add(val)
else:
sbol_attribute.set(value)
elif sbol_attribute.getUpperBound() == '1':
if len(sbol_attribute) > 0:
sbol_obj = sbol_attribute.get()
doc = sbol_obj.doc
sbol_attribute.remove()
if not doc:
sbol_obj.thisown = True
elif not doc.find(sbol_obj.identity):
sbol_obj.thisown = True
if not value == None:
sbol_attribute.set(value)
value.thisown = False
else:
self.__class__.__setattribute__(self, name, value)
def __repr__(self):
return self.__class__.__name__
Implementation_swigregister = _libsbol.Implementation_swigregister
Implementation_swigregister(Implementation)
class Design(TopLevel):
__swig_setmethods__ = {}
for _s in [TopLevel]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, Design, name, value)
__swig_getmethods__ = {}
for _s in [TopLevel]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, Design, name)
__repr__ = _swig_repr
def __init__(self, *args):
this = _libsbol.new_Design(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_setmethods__["structure"] = _libsbol.Design_structure_set
__swig_getmethods__["structure"] = _libsbol.Design_structure_get
if _newclass:
structure = _swig_property(_libsbol.Design_structure_get, _libsbol.Design_structure_set)
__swig_setmethods__["function"] = _libsbol.Design_function_set
__swig_getmethods__["function"] = _libsbol.Design_function_get
if _newclass:
function = _swig_property(_libsbol.Design_function_get, _libsbol.Design_function_set)
__swig_setmethods__["characterization"] = _libsbol.Design_characterization_set
__swig_getmethods__["characterization"] = _libsbol.Design_characterization_get
if _newclass:
characterization = _swig_property(_libsbol.Design_characterization_get, _libsbol.Design_characterization_set)
__swig_destroy__ = _libsbol.delete_Design
__del__ = lambda self: None
def copy(self, *args):
"""
Copy an object and automatically increment its version.
If the optional version argument is specified, it will be used instead of
incrementing the copied object's version. An object may also be copied into a
new document and a new namespace, assuming compliant URIs.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object being copied
Parameters
----------
* `new_doc` :
The new copies will be attached to this Document. NULL by default.
* `ns` :
This namespace will be substituted for the current namespace (as configured
by setHomespace) in all SBOL-compliat URIs.
* `version` :
A new version
Returns
-------
The full URI of the created object.
"""
return _libsbol.Design_copy(self, *args)
def __getattribute__(self,name):
if name in object.__getattribute__(self, '__swig_getmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if sbol_attribute.getUpperBound() != '1':
return sbol_attribute.getAll()
else:
try:
return sbol_attribute.get()
except LookupError:
return None
return None
elif sbol_attribute.getUpperBound() == '1':
try:
return sbol_attribute.get()
except:
return None
return object.__getattribute__(self, name)
__setattribute__ = __setattr__
def __setattr__(self,name, value):
if name in object.__getattribute__(self, '__swig_setmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if value == None:
sbol_attribute.clear()
elif type(value) == list:
if sbol_attribute.getUpperBound() == '1':
raise TypeError('The ' + sbol_attribute.getTypeURI() + ' property does not accept list arguments')
sbol_attribute.clear()
for val in value:
sbol_attribute.add(val)
else:
sbol_attribute.set(value)
elif sbol_attribute.getUpperBound() == '1':
if len(sbol_attribute) > 0:
sbol_obj = sbol_attribute.get()
doc = sbol_obj.doc
sbol_attribute.remove()
if not doc:
sbol_obj.thisown = True
elif not doc.find(sbol_obj.identity):
sbol_obj.thisown = True
if not value == None:
sbol_attribute.set(value)
value.thisown = False
else:
self.__class__.__setattribute__(self, name, value)
def __repr__(self):
return self.__class__.__name__
Design_swigregister = _libsbol.Design_swigregister
Design_swigregister(Design)
class Build(Implementation):
__swig_setmethods__ = {}
for _s in [Implementation]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, Build, name, value)
__swig_getmethods__ = {}
for _s in [Implementation]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, Build, name)
__repr__ = _swig_repr
def __init__(self, *args):
this = _libsbol.new_Build(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_setmethods__["design"] = _libsbol.Build_design_set
__swig_getmethods__["design"] = _libsbol.Build_design_get
if _newclass:
design = _swig_property(_libsbol.Build_design_get, _libsbol.Build_design_set)
__swig_setmethods__["structure"] = _libsbol.Build_structure_set
__swig_getmethods__["structure"] = _libsbol.Build_structure_get
if _newclass:
structure = _swig_property(_libsbol.Build_structure_get, _libsbol.Build_structure_set)
__swig_setmethods__["behavior"] = _libsbol.Build_behavior_set
__swig_getmethods__["behavior"] = _libsbol.Build_behavior_get
if _newclass:
behavior = _swig_property(_libsbol.Build_behavior_get, _libsbol.Build_behavior_set)
__swig_destroy__ = _libsbol.delete_Build
__del__ = lambda self: None
def copy(self, *args):
"""
Copy an object and automatically increment its version.
If the optional version argument is specified, it will be used instead of
incrementing the copied object's version. An object may also be copied into a
new document and a new namespace, assuming compliant URIs.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object being copied
Parameters
----------
* `new_doc` :
The new copies will be attached to this Document. NULL by default.
* `ns` :
This namespace will be substituted for the current namespace (as configured
by setHomespace) in all SBOL-compliat URIs.
* `version` :
A new version
Returns
-------
The full URI of the created object.
"""
return _libsbol.Build_copy(self, *args)
def __getattribute__(self,name):
if name in object.__getattribute__(self, '__swig_getmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if sbol_attribute.getUpperBound() != '1':
return sbol_attribute.getAll()
else:
try:
return sbol_attribute.get()
except LookupError:
return None
return None
elif sbol_attribute.getUpperBound() == '1':
try:
return sbol_attribute.get()
except:
return None
return object.__getattribute__(self, name)
__setattribute__ = __setattr__
def __setattr__(self,name, value):
if name in object.__getattribute__(self, '__swig_setmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if value == None:
sbol_attribute.clear()
elif type(value) == list:
if sbol_attribute.getUpperBound() == '1':
raise TypeError('The ' + sbol_attribute.getTypeURI() + ' property does not accept list arguments')
sbol_attribute.clear()
for val in value:
sbol_attribute.add(val)
else:
sbol_attribute.set(value)
elif sbol_attribute.getUpperBound() == '1':
if len(sbol_attribute) > 0:
sbol_obj = sbol_attribute.get()
doc = sbol_obj.doc
sbol_attribute.remove()
if not doc:
sbol_obj.thisown = True
elif not doc.find(sbol_obj.identity):
sbol_obj.thisown = True
if not value == None:
sbol_attribute.set(value)
value.thisown = False
else:
self.__class__.__setattribute__(self, name, value)
def __repr__(self):
return self.__class__.__name__
Build_swigregister = _libsbol.Build_swigregister
Build_swigregister(Build)
class Test(Collection):
__swig_setmethods__ = {}
for _s in [Collection]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, Test, name, value)
__swig_getmethods__ = {}
for _s in [Collection]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, Test, name)
__repr__ = _swig_repr
def __init__(self, *args):
this = _libsbol.new_Test(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_setmethods__["samples"] = _libsbol.Test_samples_set
__swig_getmethods__["samples"] = _libsbol.Test_samples_get
if _newclass:
samples = _swig_property(_libsbol.Test_samples_get, _libsbol.Test_samples_set)
__swig_setmethods__["dataFiles"] = _libsbol.Test_dataFiles_set
__swig_getmethods__["dataFiles"] = _libsbol.Test_dataFiles_get
if _newclass:
dataFiles = _swig_property(_libsbol.Test_dataFiles_get, _libsbol.Test_dataFiles_set)
def copy(self, *args):
"""
Copy an object and automatically increment its version.
If the optional version argument is specified, it will be used instead of
incrementing the copied object's version. An object may also be copied into a
new document and a new namespace, assuming compliant URIs.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object being copied
Parameters
----------
* `new_doc` :
The new copies will be attached to this Document. NULL by default.
* `ns` :
This namespace will be substituted for the current namespace (as configured
by setHomespace) in all SBOL-compliat URIs.
* `version` :
A new version
Returns
-------
The full URI of the created object.
"""
return _libsbol.Test_copy(self, *args)
def __getattribute__(self,name):
if name in object.__getattribute__(self, '__swig_getmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if sbol_attribute.getUpperBound() != '1':
return sbol_attribute.getAll()
else:
try:
return sbol_attribute.get()
except LookupError:
return None
return None
elif sbol_attribute.getUpperBound() == '1':
try:
return sbol_attribute.get()
except:
return None
return object.__getattribute__(self, name)
__setattribute__ = __setattr__
def __setattr__(self,name, value):
if name in object.__getattribute__(self, '__swig_setmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if value == None:
sbol_attribute.clear()
elif type(value) == list:
if sbol_attribute.getUpperBound() == '1':
raise TypeError('The ' + sbol_attribute.getTypeURI() + ' property does not accept list arguments')
sbol_attribute.clear()
for val in value:
sbol_attribute.add(val)
else:
sbol_attribute.set(value)
elif sbol_attribute.getUpperBound() == '1':
if len(sbol_attribute) > 0:
sbol_obj = sbol_attribute.get()
doc = sbol_obj.doc
sbol_attribute.remove()
if not doc:
sbol_obj.thisown = True
elif not doc.find(sbol_obj.identity):
sbol_obj.thisown = True
if not value == None:
sbol_attribute.set(value)
value.thisown = False
else:
self.__class__.__setattribute__(self, name, value)
def __repr__(self):
return self.__class__.__name__
__swig_destroy__ = _libsbol.delete_Test
__del__ = lambda self: None
Test_swigregister = _libsbol.Test_swigregister
Test_swigregister(Test)
class Analysis(TopLevel):
__swig_setmethods__ = {}
for _s in [TopLevel]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, Analysis, name, value)
__swig_getmethods__ = {}
for _s in [TopLevel]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, Analysis, name)
__repr__ = _swig_repr
def __init__(self, *args):
this = _libsbol.new_Analysis(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_setmethods__["rawData"] = _libsbol.Analysis_rawData_set
__swig_getmethods__["rawData"] = _libsbol.Analysis_rawData_get
if _newclass:
rawData = _swig_property(_libsbol.Analysis_rawData_get, _libsbol.Analysis_rawData_set)
__swig_setmethods__["dataFiles"] = _libsbol.Analysis_dataFiles_set
__swig_getmethods__["dataFiles"] = _libsbol.Analysis_dataFiles_get
if _newclass:
dataFiles = _swig_property(_libsbol.Analysis_dataFiles_get, _libsbol.Analysis_dataFiles_set)
__swig_setmethods__["dataSheet"] = _libsbol.Analysis_dataSheet_set
__swig_getmethods__["dataSheet"] = _libsbol.Analysis_dataSheet_get
if _newclass:
dataSheet = _swig_property(_libsbol.Analysis_dataSheet_get, _libsbol.Analysis_dataSheet_set)
__swig_setmethods__["consensusSequence"] = _libsbol.Analysis_consensusSequence_set
__swig_getmethods__["consensusSequence"] = _libsbol.Analysis_consensusSequence_get
if _newclass:
consensusSequence = _swig_property(_libsbol.Analysis_consensusSequence_get, _libsbol.Analysis_consensusSequence_set)
__swig_setmethods__["fittedModel"] = _libsbol.Analysis_fittedModel_set
__swig_getmethods__["fittedModel"] = _libsbol.Analysis_fittedModel_get
if _newclass:
fittedModel = _swig_property(_libsbol.Analysis_fittedModel_get, _libsbol.Analysis_fittedModel_set)
def verifyTarget(self, consensus_sequence):
val = _libsbol.Analysis_verifyTarget(self, consensus_sequence)
consensus_sequence.thisown = False
return val
def reportIdentity(self):
return _libsbol.Analysis_reportIdentity(self)
def reportError(self):
return _libsbol.Analysis_reportError(self)
def reportCoverage(self):
return _libsbol.Analysis_reportCoverage(self)
def reportAmbiguity(self):
return _libsbol.Analysis_reportAmbiguity(self)
__swig_destroy__ = _libsbol.delete_Analysis
__del__ = lambda self: None
def copy(self, *args):
"""
Copy an object and automatically increment its version.
If the optional version argument is specified, it will be used instead of
incrementing the copied object's version. An object may also be copied into a
new document and a new namespace, assuming compliant URIs.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object being copied
Parameters
----------
* `new_doc` :
The new copies will be attached to this Document. NULL by default.
* `ns` :
This namespace will be substituted for the current namespace (as configured
by setHomespace) in all SBOL-compliat URIs.
* `version` :
A new version
Returns
-------
The full URI of the created object.
"""
return _libsbol.Analysis_copy(self, *args)
def __getattribute__(self,name):
if name in object.__getattribute__(self, '__swig_getmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if sbol_attribute.getUpperBound() != '1':
return sbol_attribute.getAll()
else:
try:
return sbol_attribute.get()
except LookupError:
return None
return None
elif sbol_attribute.getUpperBound() == '1':
try:
return sbol_attribute.get()
except:
return None
return object.__getattribute__(self, name)
__setattribute__ = __setattr__
def __setattr__(self,name, value):
if name in object.__getattribute__(self, '__swig_setmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if value == None:
sbol_attribute.clear()
elif type(value) == list:
if sbol_attribute.getUpperBound() == '1':
raise TypeError('The ' + sbol_attribute.getTypeURI() + ' property does not accept list arguments')
sbol_attribute.clear()
for val in value:
sbol_attribute.add(val)
else:
sbol_attribute.set(value)
elif sbol_attribute.getUpperBound() == '1':
if len(sbol_attribute) > 0:
sbol_obj = sbol_attribute.get()
doc = sbol_obj.doc
sbol_attribute.remove()
if not doc:
sbol_obj.thisown = True
elif not doc.find(sbol_obj.identity):
sbol_obj.thisown = True
if not value == None:
sbol_attribute.set(value)
value.thisown = False
else:
self.__class__.__setattribute__(self, name, value)
def __repr__(self):
return self.__class__.__name__
Analysis_swigregister = _libsbol.Analysis_swigregister
Analysis_swigregister(Analysis)
class SampleRoster(Collection):
__swig_setmethods__ = {}
for _s in [Collection]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, SampleRoster, name, value)
__swig_getmethods__ = {}
for _s in [Collection]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, SampleRoster, name)
__repr__ = _swig_repr
def __init__(self, *args):
this = _libsbol.new_SampleRoster(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_setmethods__["samples"] = _libsbol.SampleRoster_samples_set
__swig_getmethods__["samples"] = _libsbol.SampleRoster_samples_get
if _newclass:
samples = _swig_property(_libsbol.SampleRoster_samples_get, _libsbol.SampleRoster_samples_set)
def copy(self, *args):
"""
Copy an object and automatically increment its version.
If the optional version argument is specified, it will be used instead of
incrementing the copied object's version. An object may also be copied into a
new document and a new namespace, assuming compliant URIs.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object being copied
Parameters
----------
* `new_doc` :
The new copies will be attached to this Document. NULL by default.
* `ns` :
This namespace will be substituted for the current namespace (as configured
by setHomespace) in all SBOL-compliat URIs.
* `version` :
A new version
Returns
-------
The full URI of the created object.
"""
return _libsbol.SampleRoster_copy(self, *args)
def __getattribute__(self,name):
if name in object.__getattribute__(self, '__swig_getmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if sbol_attribute.getUpperBound() != '1':
return sbol_attribute.getAll()
else:
try:
return sbol_attribute.get()
except LookupError:
return None
return None
elif sbol_attribute.getUpperBound() == '1':
try:
return sbol_attribute.get()
except:
return None
return object.__getattribute__(self, name)
__setattribute__ = __setattr__
def __setattr__(self,name, value):
if name in object.__getattribute__(self, '__swig_setmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if value == None:
sbol_attribute.clear()
elif type(value) == list:
if sbol_attribute.getUpperBound() == '1':
raise TypeError('The ' + sbol_attribute.getTypeURI() + ' property does not accept list arguments')
sbol_attribute.clear()
for val in value:
sbol_attribute.add(val)
else:
sbol_attribute.set(value)
elif sbol_attribute.getUpperBound() == '1':
if len(sbol_attribute) > 0:
sbol_obj = sbol_attribute.get()
doc = sbol_obj.doc
sbol_attribute.remove()
if not doc:
sbol_obj.thisown = True
elif not doc.find(sbol_obj.identity):
sbol_obj.thisown = True
if not value == None:
sbol_attribute.set(value)
value.thisown = False
else:
self.__class__.__setattribute__(self, name, value)
def __repr__(self):
return self.__class__.__name__
__swig_destroy__ = _libsbol.delete_SampleRoster
__del__ = lambda self: None
SampleRoster_swigregister = _libsbol.SampleRoster_swigregister
SampleRoster_swigregister(SampleRoster)
class TranscriptionalRepressionInteraction(Interaction):
__swig_setmethods__ = {}
for _s in [Interaction]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, TranscriptionalRepressionInteraction, name, value)
__swig_getmethods__ = {}
for _s in [Interaction]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, TranscriptionalRepressionInteraction, name)
__repr__ = _swig_repr
def __init__(self, uri, repressor, target_promoter):
this = _libsbol.new_TranscriptionalRepressionInteraction(uri, repressor, target_promoter)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_setmethods__["repressor"] = _libsbol.TranscriptionalRepressionInteraction_repressor_set
__swig_getmethods__["repressor"] = _libsbol.TranscriptionalRepressionInteraction_repressor_get
if _newclass:
repressor = _swig_property(_libsbol.TranscriptionalRepressionInteraction_repressor_get, _libsbol.TranscriptionalRepressionInteraction_repressor_set)
__swig_setmethods__["targetPromoter"] = _libsbol.TranscriptionalRepressionInteraction_targetPromoter_set
__swig_getmethods__["targetPromoter"] = _libsbol.TranscriptionalRepressionInteraction_targetPromoter_get
if _newclass:
targetPromoter = _swig_property(_libsbol.TranscriptionalRepressionInteraction_targetPromoter_get, _libsbol.TranscriptionalRepressionInteraction_targetPromoter_set)
def __getattribute__(self,name):
if name in object.__getattribute__(self, '__swig_getmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if sbol_attribute.getUpperBound() != '1':
return sbol_attribute.getAll()
else:
try:
return sbol_attribute.get()
except LookupError:
return None
return None
elif sbol_attribute.getUpperBound() == '1':
try:
return sbol_attribute.get()
except:
return None
return object.__getattribute__(self, name)
__setattribute__ = __setattr__
def __setattr__(self,name, value):
if name in object.__getattribute__(self, '__swig_setmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if value == None:
sbol_attribute.clear()
elif type(value) == list:
if sbol_attribute.getUpperBound() == '1':
raise TypeError('The ' + sbol_attribute.getTypeURI() + ' property does not accept list arguments')
sbol_attribute.clear()
for val in value:
sbol_attribute.add(val)
else:
sbol_attribute.set(value)
elif sbol_attribute.getUpperBound() == '1':
if len(sbol_attribute) > 0:
sbol_obj = sbol_attribute.get()
doc = sbol_obj.doc
sbol_attribute.remove()
if not doc:
sbol_obj.thisown = True
elif not doc.find(sbol_obj.identity):
sbol_obj.thisown = True
if not value == None:
sbol_attribute.set(value)
value.thisown = False
else:
self.__class__.__setattribute__(self, name, value)
def __repr__(self):
return self.__class__.__name__
__swig_destroy__ = _libsbol.delete_TranscriptionalRepressionInteraction
__del__ = lambda self: None
TranscriptionalRepressionInteraction_swigregister = _libsbol.TranscriptionalRepressionInteraction_swigregister
TranscriptionalRepressionInteraction_swigregister(TranscriptionalRepressionInteraction)
class SmallMoleculeInhibitionInteraction(Interaction):
__swig_setmethods__ = {}
for _s in [Interaction]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, SmallMoleculeInhibitionInteraction, name, value)
__swig_getmethods__ = {}
for _s in [Interaction]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, SmallMoleculeInhibitionInteraction, name)
__repr__ = _swig_repr
def __init__(self, uri, ligand, transcription_factor):
this = _libsbol.new_SmallMoleculeInhibitionInteraction(uri, ligand, transcription_factor)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_setmethods__["ligand"] = _libsbol.SmallMoleculeInhibitionInteraction_ligand_set
__swig_getmethods__["ligand"] = _libsbol.SmallMoleculeInhibitionInteraction_ligand_get
if _newclass:
ligand = _swig_property(_libsbol.SmallMoleculeInhibitionInteraction_ligand_get, _libsbol.SmallMoleculeInhibitionInteraction_ligand_set)
__swig_setmethods__["transcriptionFactor"] = _libsbol.SmallMoleculeInhibitionInteraction_transcriptionFactor_set
__swig_getmethods__["transcriptionFactor"] = _libsbol.SmallMoleculeInhibitionInteraction_transcriptionFactor_get
if _newclass:
transcriptionFactor = _swig_property(_libsbol.SmallMoleculeInhibitionInteraction_transcriptionFactor_get, _libsbol.SmallMoleculeInhibitionInteraction_transcriptionFactor_set)
def __getattribute__(self,name):
if name in object.__getattribute__(self, '__swig_getmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if sbol_attribute.getUpperBound() != '1':
return sbol_attribute.getAll()
else:
try:
return sbol_attribute.get()
except LookupError:
return None
return None
elif sbol_attribute.getUpperBound() == '1':
try:
return sbol_attribute.get()
except:
return None
return object.__getattribute__(self, name)
__setattribute__ = __setattr__
def __setattr__(self,name, value):
if name in object.__getattribute__(self, '__swig_setmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if value == None:
sbol_attribute.clear()
elif type(value) == list:
if sbol_attribute.getUpperBound() == '1':
raise TypeError('The ' + sbol_attribute.getTypeURI() + ' property does not accept list arguments')
sbol_attribute.clear()
for val in value:
sbol_attribute.add(val)
else:
sbol_attribute.set(value)
elif sbol_attribute.getUpperBound() == '1':
if len(sbol_attribute) > 0:
sbol_obj = sbol_attribute.get()
doc = sbol_obj.doc
sbol_attribute.remove()
if not doc:
sbol_obj.thisown = True
elif not doc.find(sbol_obj.identity):
sbol_obj.thisown = True
if not value == None:
sbol_attribute.set(value)
value.thisown = False
else:
self.__class__.__setattribute__(self, name, value)
def __repr__(self):
return self.__class__.__name__
__swig_destroy__ = _libsbol.delete_SmallMoleculeInhibitionInteraction
__del__ = lambda self: None
SmallMoleculeInhibitionInteraction_swigregister = _libsbol.SmallMoleculeInhibitionInteraction_swigregister
SmallMoleculeInhibitionInteraction_swigregister(SmallMoleculeInhibitionInteraction)
class GeneProductionInteraction(Interaction):
__swig_setmethods__ = {}
for _s in [Interaction]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, GeneProductionInteraction, name, value)
__swig_getmethods__ = {}
for _s in [Interaction]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, GeneProductionInteraction, name)
__repr__ = _swig_repr
def __init__(self, uri, gene, product):
this = _libsbol.new_GeneProductionInteraction(uri, gene, product)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_setmethods__["gene"] = _libsbol.GeneProductionInteraction_gene_set
__swig_getmethods__["gene"] = _libsbol.GeneProductionInteraction_gene_get
if _newclass:
gene = _swig_property(_libsbol.GeneProductionInteraction_gene_get, _libsbol.GeneProductionInteraction_gene_set)
__swig_setmethods__["product"] = _libsbol.GeneProductionInteraction_product_set
__swig_getmethods__["product"] = _libsbol.GeneProductionInteraction_product_get
if _newclass:
product = _swig_property(_libsbol.GeneProductionInteraction_product_get, _libsbol.GeneProductionInteraction_product_set)
def __getattribute__(self,name):
if name in object.__getattribute__(self, '__swig_getmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if sbol_attribute.getUpperBound() != '1':
return sbol_attribute.getAll()
else:
try:
return sbol_attribute.get()
except LookupError:
return None
return None
elif sbol_attribute.getUpperBound() == '1':
try:
return sbol_attribute.get()
except:
return None
return object.__getattribute__(self, name)
__setattribute__ = __setattr__
def __setattr__(self,name, value):
if name in object.__getattribute__(self, '__swig_setmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if value == None:
sbol_attribute.clear()
elif type(value) == list:
if sbol_attribute.getUpperBound() == '1':
raise TypeError('The ' + sbol_attribute.getTypeURI() + ' property does not accept list arguments')
sbol_attribute.clear()
for val in value:
sbol_attribute.add(val)
else:
sbol_attribute.set(value)
elif sbol_attribute.getUpperBound() == '1':
if len(sbol_attribute) > 0:
sbol_obj = sbol_attribute.get()
doc = sbol_obj.doc
sbol_attribute.remove()
if not doc:
sbol_obj.thisown = True
elif not doc.find(sbol_obj.identity):
sbol_obj.thisown = True
if not value == None:
sbol_attribute.set(value)
value.thisown = False
else:
self.__class__.__setattribute__(self, name, value)
def __repr__(self):
return self.__class__.__name__
__swig_destroy__ = _libsbol.delete_GeneProductionInteraction
__del__ = lambda self: None
GeneProductionInteraction_swigregister = _libsbol.GeneProductionInteraction_swigregister
GeneProductionInteraction_swigregister(GeneProductionInteraction)
class TranscriptionalActivationInteraction(Interaction):
__swig_setmethods__ = {}
for _s in [Interaction]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, TranscriptionalActivationInteraction, name, value)
__swig_getmethods__ = {}
for _s in [Interaction]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, TranscriptionalActivationInteraction, name)
__repr__ = _swig_repr
def __init__(self, uri, activator, target_promoter):
this = _libsbol.new_TranscriptionalActivationInteraction(uri, activator, target_promoter)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_setmethods__["activator"] = _libsbol.TranscriptionalActivationInteraction_activator_set
__swig_getmethods__["activator"] = _libsbol.TranscriptionalActivationInteraction_activator_get
if _newclass:
activator = _swig_property(_libsbol.TranscriptionalActivationInteraction_activator_get, _libsbol.TranscriptionalActivationInteraction_activator_set)
__swig_setmethods__["targetPromoter"] = _libsbol.TranscriptionalActivationInteraction_targetPromoter_set
__swig_getmethods__["targetPromoter"] = _libsbol.TranscriptionalActivationInteraction_targetPromoter_get
if _newclass:
targetPromoter = _swig_property(_libsbol.TranscriptionalActivationInteraction_targetPromoter_get, _libsbol.TranscriptionalActivationInteraction_targetPromoter_set)
def __getattribute__(self,name):
if name in object.__getattribute__(self, '__swig_getmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if sbol_attribute.getUpperBound() != '1':
return sbol_attribute.getAll()
else:
try:
return sbol_attribute.get()
except LookupError:
return None
return None
elif sbol_attribute.getUpperBound() == '1':
try:
return sbol_attribute.get()
except:
return None
return object.__getattribute__(self, name)
__setattribute__ = __setattr__
def __setattr__(self,name, value):
if name in object.__getattribute__(self, '__swig_setmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if value == None:
sbol_attribute.clear()
elif type(value) == list:
if sbol_attribute.getUpperBound() == '1':
raise TypeError('The ' + sbol_attribute.getTypeURI() + ' property does not accept list arguments')
sbol_attribute.clear()
for val in value:
sbol_attribute.add(val)
else:
sbol_attribute.set(value)
elif sbol_attribute.getUpperBound() == '1':
if len(sbol_attribute) > 0:
sbol_obj = sbol_attribute.get()
doc = sbol_obj.doc
sbol_attribute.remove()
if not doc:
sbol_obj.thisown = True
elif not doc.find(sbol_obj.identity):
sbol_obj.thisown = True
if not value == None:
sbol_attribute.set(value)
value.thisown = False
else:
self.__class__.__setattribute__(self, name, value)
def __repr__(self):
return self.__class__.__name__
__swig_destroy__ = _libsbol.delete_TranscriptionalActivationInteraction
__del__ = lambda self: None
TranscriptionalActivationInteraction_swigregister = _libsbol.TranscriptionalActivationInteraction_swigregister
TranscriptionalActivationInteraction_swigregister(TranscriptionalActivationInteraction)
class SmallMoleculeActivationInteraction(Interaction):
__swig_setmethods__ = {}
for _s in [Interaction]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, SmallMoleculeActivationInteraction, name, value)
__swig_getmethods__ = {}
for _s in [Interaction]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, SmallMoleculeActivationInteraction, name)
__repr__ = _swig_repr
def __init__(self, uri, ligand, transcription_factor):
this = _libsbol.new_SmallMoleculeActivationInteraction(uri, ligand, transcription_factor)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_setmethods__["ligand"] = _libsbol.SmallMoleculeActivationInteraction_ligand_set
__swig_getmethods__["ligand"] = _libsbol.SmallMoleculeActivationInteraction_ligand_get
if _newclass:
ligand = _swig_property(_libsbol.SmallMoleculeActivationInteraction_ligand_get, _libsbol.SmallMoleculeActivationInteraction_ligand_set)
__swig_setmethods__["transcriptionFactor"] = _libsbol.SmallMoleculeActivationInteraction_transcriptionFactor_set
__swig_getmethods__["transcriptionFactor"] = _libsbol.SmallMoleculeActivationInteraction_transcriptionFactor_get
if _newclass:
transcriptionFactor = _swig_property(_libsbol.SmallMoleculeActivationInteraction_transcriptionFactor_get, _libsbol.SmallMoleculeActivationInteraction_transcriptionFactor_set)
def __getattribute__(self,name):
if name in object.__getattribute__(self, '__swig_getmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if sbol_attribute.getUpperBound() != '1':
return sbol_attribute.getAll()
else:
try:
return sbol_attribute.get()
except LookupError:
return None
return None
elif sbol_attribute.getUpperBound() == '1':
try:
return sbol_attribute.get()
except:
return None
return object.__getattribute__(self, name)
__setattribute__ = __setattr__
def __setattr__(self,name, value):
if name in object.__getattribute__(self, '__swig_setmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if value == None:
sbol_attribute.clear()
elif type(value) == list:
if sbol_attribute.getUpperBound() == '1':
raise TypeError('The ' + sbol_attribute.getTypeURI() + ' property does not accept list arguments')
sbol_attribute.clear()
for val in value:
sbol_attribute.add(val)
else:
sbol_attribute.set(value)
elif sbol_attribute.getUpperBound() == '1':
if len(sbol_attribute) > 0:
sbol_obj = sbol_attribute.get()
doc = sbol_obj.doc
sbol_attribute.remove()
if not doc:
sbol_obj.thisown = True
elif not doc.find(sbol_obj.identity):
sbol_obj.thisown = True
if not value == None:
sbol_attribute.set(value)
value.thisown = False
else:
self.__class__.__setattribute__(self, name, value)
def __repr__(self):
return self.__class__.__name__
__swig_destroy__ = _libsbol.delete_SmallMoleculeActivationInteraction
__del__ = lambda self: None
SmallMoleculeActivationInteraction_swigregister = _libsbol.SmallMoleculeActivationInteraction_swigregister
SmallMoleculeActivationInteraction_swigregister(SmallMoleculeActivationInteraction)
class EnzymeCatalysisInteraction(Interaction):
__swig_setmethods__ = {}
for _s in [Interaction]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, EnzymeCatalysisInteraction, name, value)
__swig_getmethods__ = {}
for _s in [Interaction]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, EnzymeCatalysisInteraction, name)
__repr__ = _swig_repr
__swig_setmethods__["enzyme"] = _libsbol.EnzymeCatalysisInteraction_enzyme_set
__swig_getmethods__["enzyme"] = _libsbol.EnzymeCatalysisInteraction_enzyme_get
if _newclass:
enzyme = _swig_property(_libsbol.EnzymeCatalysisInteraction_enzyme_get, _libsbol.EnzymeCatalysisInteraction_enzyme_set)
__swig_setmethods__["substrates"] = _libsbol.EnzymeCatalysisInteraction_substrates_set
__swig_getmethods__["substrates"] = _libsbol.EnzymeCatalysisInteraction_substrates_get
if _newclass:
substrates = _swig_property(_libsbol.EnzymeCatalysisInteraction_substrates_get, _libsbol.EnzymeCatalysisInteraction_substrates_set)
__swig_setmethods__["products"] = _libsbol.EnzymeCatalysisInteraction_products_set
__swig_getmethods__["products"] = _libsbol.EnzymeCatalysisInteraction_products_get
if _newclass:
products = _swig_property(_libsbol.EnzymeCatalysisInteraction_products_get, _libsbol.EnzymeCatalysisInteraction_products_set)
__swig_setmethods__["cofactors"] = _libsbol.EnzymeCatalysisInteraction_cofactors_set
__swig_getmethods__["cofactors"] = _libsbol.EnzymeCatalysisInteraction_cofactors_get
if _newclass:
cofactors = _swig_property(_libsbol.EnzymeCatalysisInteraction_cofactors_get, _libsbol.EnzymeCatalysisInteraction_cofactors_set)
__swig_setmethods__["sideproducts"] = _libsbol.EnzymeCatalysisInteraction_sideproducts_set
__swig_getmethods__["sideproducts"] = _libsbol.EnzymeCatalysisInteraction_sideproducts_get
if _newclass:
sideproducts = _swig_property(_libsbol.EnzymeCatalysisInteraction_sideproducts_get, _libsbol.EnzymeCatalysisInteraction_sideproducts_set)
def __getattribute__(self,name):
if name in object.__getattribute__(self, '__swig_getmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if sbol_attribute.getUpperBound() != '1':
return sbol_attribute.getAll()
else:
try:
return sbol_attribute.get()
except LookupError:
return None
return None
elif sbol_attribute.getUpperBound() == '1':
try:
return sbol_attribute.get()
except:
return None
return object.__getattribute__(self, name)
__setattribute__ = __setattr__
def __setattr__(self,name, value):
if name in object.__getattribute__(self, '__swig_setmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if value == None:
sbol_attribute.clear()
elif type(value) == list:
if sbol_attribute.getUpperBound() == '1':
raise TypeError('The ' + sbol_attribute.getTypeURI() + ' property does not accept list arguments')
sbol_attribute.clear()
for val in value:
sbol_attribute.add(val)
else:
sbol_attribute.set(value)
elif sbol_attribute.getUpperBound() == '1':
if len(sbol_attribute) > 0:
sbol_obj = sbol_attribute.get()
doc = sbol_obj.doc
sbol_attribute.remove()
if not doc:
sbol_obj.thisown = True
elif not doc.find(sbol_obj.identity):
sbol_obj.thisown = True
if not value == None:
sbol_attribute.set(value)
value.thisown = False
else:
self.__class__.__setattribute__(self, name, value)
def __repr__(self):
return self.__class__.__name__
def __init__(self, *args):
this = _libsbol.new_EnzymeCatalysisInteraction(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete_EnzymeCatalysisInteraction
__del__ = lambda self: None
EnzymeCatalysisInteraction_swigregister = _libsbol.EnzymeCatalysisInteraction_swigregister
EnzymeCatalysisInteraction_swigregister(EnzymeCatalysisInteraction)
class SearchQuery(TopLevel):
__swig_setmethods__ = {}
for _s in [TopLevel]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, SearchQuery, name, value)
__swig_getmethods__ = {}
for _s in [TopLevel]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, SearchQuery, name)
__repr__ = _swig_repr
def __init__(self, *args):
this = _libsbol.new_SearchQuery(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_setmethods__["objectType"] = _libsbol.SearchQuery_objectType_set
__swig_getmethods__["objectType"] = _libsbol.SearchQuery_objectType_get
if _newclass:
objectType = _swig_property(_libsbol.SearchQuery_objectType_get, _libsbol.SearchQuery_objectType_set)
__swig_setmethods__["limit"] = _libsbol.SearchQuery_limit_set
__swig_getmethods__["limit"] = _libsbol.SearchQuery_limit_get
if _newclass:
limit = _swig_property(_libsbol.SearchQuery_limit_get, _libsbol.SearchQuery_limit_set)
__swig_setmethods__["offset"] = _libsbol.SearchQuery_offset_set
__swig_getmethods__["offset"] = _libsbol.SearchQuery_offset_get
if _newclass:
offset = _swig_property(_libsbol.SearchQuery_offset_get, _libsbol.SearchQuery_offset_set)
__swig_destroy__ = _libsbol.delete_SearchQuery
__del__ = lambda self: None
def __getattribute__(self,name):
if name in object.__getattribute__(self, '__swig_getmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if sbol_attribute.getUpperBound() != '1':
return sbol_attribute.getAll()
else:
try:
return sbol_attribute.get()
except LookupError:
return None
return None
elif sbol_attribute.getUpperBound() == '1':
try:
return sbol_attribute.get()
except:
return None
return object.__getattribute__(self, name)
__setattribute__ = __setattr__
def __setattr__(self,name, value):
if name in object.__getattribute__(self, '__swig_setmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if value == None:
sbol_attribute.clear()
elif type(value) == list:
if sbol_attribute.getUpperBound() == '1':
raise TypeError('The ' + sbol_attribute.getTypeURI() + ' property does not accept list arguments')
sbol_attribute.clear()
for val in value:
sbol_attribute.add(val)
else:
sbol_attribute.set(value)
elif sbol_attribute.getUpperBound() == '1':
if len(sbol_attribute) > 0:
sbol_obj = sbol_attribute.get()
doc = sbol_obj.doc
sbol_attribute.remove()
if not doc:
sbol_obj.thisown = True
elif not doc.find(sbol_obj.identity):
sbol_obj.thisown = True
if not value == None:
sbol_attribute.set(value)
value.thisown = False
else:
self.__class__.__setattribute__(self, name, value)
def __repr__(self):
return self.__class__.__name__
def __getitem__(self, uri):
return _libsbol.SearchQuery___getitem__(self, uri)
SearchQuery_swigregister = _libsbol.SearchQuery_swigregister
SearchQuery_swigregister(SearchQuery)
class SearchResponse(TopLevel):
__swig_setmethods__ = {}
for _s in [TopLevel]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, SearchResponse, name, value)
__swig_getmethods__ = {}
for _s in [TopLevel]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, SearchResponse, name)
__repr__ = _swig_repr
__swig_setmethods__["records"] = _libsbol.SearchResponse_records_set
__swig_getmethods__["records"] = _libsbol.SearchResponse_records_get
if _newclass:
records = _swig_property(_libsbol.SearchResponse_records_get, _libsbol.SearchResponse_records_set)
def extend(self, response):
return _libsbol.SearchResponse_extend(self, response)
def __init__(self):
this = _libsbol.new_SearchResponse()
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete_SearchResponse
__del__ = lambda self: None
def end(self):
return _libsbol.SearchResponse_end(self)
__swig_setmethods__["python_iter"] = _libsbol.SearchResponse_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.SearchResponse_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.SearchResponse_python_iter_get, _libsbol.SearchResponse_python_iter_set)
def __getitem__(self, i):
return _libsbol.SearchResponse___getitem__(self, i)
def __len__(self):
return _libsbol.SearchResponse___len__(self)
def __iter__(self):
return _libsbol.SearchResponse___iter__(self)
def next(self):
return _libsbol.SearchResponse_next(self)
def __next__(self):
return _libsbol.SearchResponse___next__(self)
SearchResponse_swigregister = _libsbol.SearchResponse_swigregister
SearchResponse_swigregister(SearchResponse)
class PartShop(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, PartShop, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, PartShop, name)
__repr__ = _swig_repr
def __init__(self, url):
this = _libsbol.new_PartShop(url)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def pull(self, *args):
"""
Retrieve an object from an online resource
Parameters
----------
* `uri` :
The identity of the SBOL object you want to retrieve
* `doc` :
The Document to which SBOL data will be added
"""
return _libsbol.PartShop_pull(self, *args)
def searchRootCollections(self):
val = _libsbol.PartShop_searchRootCollections(self)
true = True
false = False
exec('val = ' + val)
return val
return val
def searchSubCollections(self, uri):
val = _libsbol.PartShop_searchSubCollections(self, uri)
true = True
false = False
exec('val = ' + val)
return val
return val
def search(self, *args):
"""
An advanced search that allows the user to specify an arbitrary number of search criteria as key/value pairs. Metadata is return as a list of object metadata in dictionary format.
Parameters
----------
* `q` :
A SearchQuery object populated with search fields and values specified as key/value pairs
"""
val = _libsbol.PartShop_search(self, *args)
if val[0] == '[' :
exec('val = ' + val)
return val
else :
return val
return val
def searchCount(self, *args):
return _libsbol.PartShop_searchCount(self, *args)
def submit(self, *args):
"""
Submit your SBOL data to a SynBioHub instance. In order to submit to a PartShop, you must login first. Register on [SynBioHub](http://synbiohub.org) to obtain account credentials.
* `doc` :
The Document to submit
* `overwrite` :
An integer code: 0(default) - do not overwrite, 1 - overwrite, 2 - merge
"""
val = _libsbol.PartShop_submit(self, *args)
if val[0] == '[' :
exec('val = ' + val)
return val
else :
return val
return val
def login(self, email, password):
"""
In order to submit to a PartShop, you must login first. Register on [SynBioHub](http://synbiohub.org) to obtain account credentials.
Parameters
----------
* `email` :
The email associated with the user's SynBioHub account
* `password` :
The user's password
"""
return _libsbol.PartShop_login(self, email, password)
def getURL(self):
return _libsbol.PartShop_getURL(self)
def attachFile(self, topleveluri, filename):
return _libsbol.PartShop_attachFile(self, topleveluri, filename)
def downloadAttachment(self, *args):
return _libsbol.PartShop_downloadAttachment(self, *args)
def pullComponentDefinition(self, uri, doc, recursive=True):
"""
Retrieve an object from an online resource
Parameters
----------
* `uri` :
The identity of the SBOL object you want to retrieve
* `doc` :
The Document to which SBOL data will be added
"""
return _libsbol.PartShop_pullComponentDefinition(self, uri, doc, recursive)
def pullCollection(self, uri, doc, recursive=True):
"""
Retrieve an object from an online resource
Parameters
----------
* `uri` :
The identity of the SBOL object you want to retrieve
* `doc` :
The Document to which SBOL data will be added
"""
return _libsbol.PartShop_pullCollection(self, uri, doc, recursive)
def pullSequence(self, uri, doc, recursive=True):
"""
Retrieve an object from an online resource
Parameters
----------
* `uri` :
The identity of the SBOL object you want to retrieve
* `doc` :
The Document to which SBOL data will be added
"""
return _libsbol.PartShop_pullSequence(self, uri, doc, recursive)
def countComponentDefinition(self):
"""
Return the count of objects contained in a PartShop
"""
return _libsbol.PartShop_countComponentDefinition(self)
def countCollection(self):
"""
Return the count of objects contained in a PartShop
"""
return _libsbol.PartShop_countCollection(self)
__swig_destroy__ = _libsbol.delete_PartShop
__del__ = lambda self: None
PartShop_swigregister = _libsbol.PartShop_swigregister
PartShop_swigregister(PartShop)
[docs]class Document(Identified):
"""
Read and write SBOL using a Document class. The Document is a container for
Components, Modules, and all other SBOLObjects.
"""
__swig_setmethods__ = {}
for _s in [Identified]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, Document, name, value)
__swig_getmethods__ = {}
for _s in [Identified]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, Document, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Construct a Document. The Document is a container for Components, Modules, and
all other SBOLObjects.
"""
this = _libsbol.new_Document(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete_Document
__del__ = lambda self: None
__swig_setmethods__["SBOLObjects"] = _libsbol.Document_SBOLObjects_set
__swig_getmethods__["SBOLObjects"] = _libsbol.Document_SBOLObjects_get
if _newclass:
SBOLObjects = _swig_property(_libsbol.Document_SBOLObjects_get, _libsbol.Document_SBOLObjects_set)
def getTopLevel(self, arg2):
return _libsbol.Document_getTopLevel(self, arg2)
def getWorld(self):
return _libsbol.Document_getWorld(self)
__swig_setmethods__["designs"] = _libsbol.Document_designs_set
__swig_getmethods__["designs"] = _libsbol.Document_designs_get
if _newclass:
designs = _swig_property(_libsbol.Document_designs_get, _libsbol.Document_designs_set)
__swig_setmethods__["builds"] = _libsbol.Document_builds_set
__swig_getmethods__["builds"] = _libsbol.Document_builds_get
if _newclass:
builds = _swig_property(_libsbol.Document_builds_get, _libsbol.Document_builds_set)
__swig_setmethods__["tests"] = _libsbol.Document_tests_set
__swig_getmethods__["tests"] = _libsbol.Document_tests_get
if _newclass:
tests = _swig_property(_libsbol.Document_tests_get, _libsbol.Document_tests_set)
__swig_setmethods__["analyses"] = _libsbol.Document_analyses_set
__swig_getmethods__["analyses"] = _libsbol.Document_analyses_get
if _newclass:
analyses = _swig_property(_libsbol.Document_analyses_get, _libsbol.Document_analyses_set)
__swig_setmethods__["componentDefinitions"] = _libsbol.Document_componentDefinitions_set
__swig_getmethods__["componentDefinitions"] = _libsbol.Document_componentDefinitions_get
if _newclass:
componentDefinitions = _swig_property(_libsbol.Document_componentDefinitions_get, _libsbol.Document_componentDefinitions_set)
__swig_setmethods__["moduleDefinitions"] = _libsbol.Document_moduleDefinitions_set
__swig_getmethods__["moduleDefinitions"] = _libsbol.Document_moduleDefinitions_get
if _newclass:
moduleDefinitions = _swig_property(_libsbol.Document_moduleDefinitions_get, _libsbol.Document_moduleDefinitions_set)
__swig_setmethods__["models"] = _libsbol.Document_models_set
__swig_getmethods__["models"] = _libsbol.Document_models_get
if _newclass:
models = _swig_property(_libsbol.Document_models_get, _libsbol.Document_models_set)
__swig_setmethods__["sequences"] = _libsbol.Document_sequences_set
__swig_getmethods__["sequences"] = _libsbol.Document_sequences_get
if _newclass:
sequences = _swig_property(_libsbol.Document_sequences_get, _libsbol.Document_sequences_set)
__swig_setmethods__["collections"] = _libsbol.Document_collections_set
__swig_getmethods__["collections"] = _libsbol.Document_collections_get
if _newclass:
collections = _swig_property(_libsbol.Document_collections_get, _libsbol.Document_collections_set)
__swig_setmethods__["activities"] = _libsbol.Document_activities_set
__swig_getmethods__["activities"] = _libsbol.Document_activities_get
if _newclass:
activities = _swig_property(_libsbol.Document_activities_get, _libsbol.Document_activities_set)
__swig_setmethods__["plans"] = _libsbol.Document_plans_set
__swig_getmethods__["plans"] = _libsbol.Document_plans_get
if _newclass:
plans = _swig_property(_libsbol.Document_plans_get, _libsbol.Document_plans_set)
__swig_setmethods__["agents"] = _libsbol.Document_agents_set
__swig_getmethods__["agents"] = _libsbol.Document_agents_get
if _newclass:
agents = _swig_property(_libsbol.Document_agents_get, _libsbol.Document_agents_set)
__swig_setmethods__["attachments"] = _libsbol.Document_attachments_set
__swig_getmethods__["attachments"] = _libsbol.Document_attachments_get
if _newclass:
attachments = _swig_property(_libsbol.Document_attachments_get, _libsbol.Document_attachments_set)
__swig_setmethods__["combinatorialderivations"] = _libsbol.Document_combinatorialderivations_set
__swig_getmethods__["combinatorialderivations"] = _libsbol.Document_combinatorialderivations_get
if _newclass:
combinatorialderivations = _swig_property(_libsbol.Document_combinatorialderivations_get, _libsbol.Document_combinatorialderivations_set)
__swig_setmethods__["implementations"] = _libsbol.Document_implementations_set
__swig_getmethods__["implementations"] = _libsbol.Document_implementations_get
if _newclass:
implementations = _swig_property(_libsbol.Document_implementations_get, _libsbol.Document_implementations_set)
__swig_setmethods__["sampleRosters"] = _libsbol.Document_sampleRosters_set
__swig_getmethods__["sampleRosters"] = _libsbol.Document_sampleRosters_get
if _newclass:
sampleRosters = _swig_property(_libsbol.Document_sampleRosters_get, _libsbol.Document_sampleRosters_set)
__swig_setmethods__["citations"] = _libsbol.Document_citations_set
__swig_getmethods__["citations"] = _libsbol.Document_citations_get
if _newclass:
citations = _swig_property(_libsbol.Document_citations_get, _libsbol.Document_citations_set)
__swig_setmethods__["keywords"] = _libsbol.Document_keywords_set
__swig_getmethods__["keywords"] = _libsbol.Document_keywords_get
if _newclass:
keywords = _swig_property(_libsbol.Document_keywords_get, _libsbol.Document_keywords_set)
[docs] def write(self, filename):
"""
Serialize all objects in this Document to an RDF/XML file.
Parameters
----------
* `filename` :
The full name of the file you want to write (including file extension)
Returns
-------
A string with the validation results, or empty string if validation is disabled
"""
return _libsbol.Document_write(self, filename)
[docs] def read(self, filename):
"""
Read an RDF/XML file and attach the SBOL objects to this Document.
Existing contents of the Document will be wiped.
Parameters
----------
* `filename` :
The full name of the file you want to read (including file extension)
"""
return _libsbol.Document_read(self, filename)
def readString(self, sbol):
return _libsbol.Document_readString(self, sbol)
def writeString(self):
return _libsbol.Document_writeString(self)
[docs] def append(self, filename):
"""
Read an RDF/XML file and attach the SBOL objects to this Document.
New objects will be added to the existing contents of the Document
Parameters
----------
* `filename` :
The full name of the file you want to read (including file extension)
"""
return _libsbol.Document_append(self, filename)
[docs] def request_validation(self, sbol):
"""
Submit this Document to the online validator.
Returns
-------
The validation results
"""
return _libsbol.Document_request_validation(self, sbol)
def request_comparison(self, diff_file):
return _libsbol.Document_request_comparison(self, diff_file)
def query_repository(self, command):
return _libsbol.Document_query_repository(self, command)
def search_metadata(self, role, type, name, collection):
return _libsbol.Document_search_metadata(self, role, type, name, collection)
def generate(self, world, sbol_serializer, sbol_buffer, sbol_buffer_len, ios, base_uri):
return _libsbol.Document_generate(self, world, sbol_serializer, sbol_buffer, sbol_buffer_len, ios, base_uri)
[docs] def validate(self):
"""
Run validation on this Document.
Returns
-------
The validation results
"""
return _libsbol.Document_validate(self)
[docs] def copy(self, ns, doc=None):
"""
"""
return _libsbol.Document_copy(self, ns, doc)
def __len__(self):
return _libsbol.Document___len__(self)
def __str__(self):
return _libsbol.Document___str__(self)
def summary(self):
return _libsbol.Document_summary(self)
def end(self):
return _libsbol.Document_end(self)
__swig_setmethods__["python_iter"] = _libsbol.Document_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.Document_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.Document_python_iter_get, _libsbol.Document_python_iter_set)
[docs] def find(self, uri):
"""
Search recursively for an SBOLObject in this Document that matches the uri.
Parameters
----------
* `uri` :
The identity of the object to search for
Returns
-------
A pointer to the SBOLObject, or NULL if an object with this identity doesn't
exist
"""
return _libsbol.Document_find(self, uri)
def parse_annotation_objects(self):
return _libsbol.Document_parse_annotation_objects(self)
def parse_extension_objects(self):
return _libsbol.Document_parse_extension_objects(self)
[docs] def find_property(self, uri):
"""
Search this object recursively to see if it contains a member property with the
given RDF type.
Parameters
----------
* `uri` :
The RDF type of the property to search for.
Returns
-------
A pointer to the object that contains a member property with the specified RDF
type, NULL otherwise
"""
return _libsbol.Document_find_property(self, uri)
def find_reference(self, uri):
return _libsbol.Document_find_reference(self, uri)
[docs] def getNamespaces(self):
"""
Returns
-------
A vector of namespaces Get namespaces contained in this Document
"""
return _libsbol.Document_getNamespaces(self)
[docs] def addNamespace(self, *args):
"""
Add a new namespace to this Document.
Parameters
----------
* `ns` :
The namespace, eg. http://sbols.org/v2#
* `prefix` :
The namespace prefix, eg. sbol
"""
return _libsbol.Document_addNamespace(self, *args)
[docs] def getComponentDefinition(self, uri):
"""
Retrieve an object from the Document.
Parameters
----------
* `uri` :
The identity of the SBOL object you want to retrieve
templateparam
-------------
* `SBOLClass` :
The type of SBOL object
"""
return _libsbol.Document_getComponentDefinition(self, uri)
[docs] def addComponentDefinition(self, *args):
"""
Adds a component definition or a list of component definitions to a sbol::Document object.
Parameters
----------
* `componentDefinition` :
ComponentDefinition object or a list of ComponentDefinition objects
"""
val = _libsbol.Document_addComponentDefinition(self, *args)
if type(args[0]) is list:
for obj in args[0]:
obj.thisown = False
else:
args[0].thisown = False
return val
[docs] def getModuleDefinition(self, uri):
"""
Retrieve an object from the Document.
Parameters
----------
* `uri` :
The identity of the SBOL object you want to retrieve
templateparam
-------------
* `SBOLClass` :
The type of SBOL object
"""
return _libsbol.Document_getModuleDefinition(self, uri)
[docs] def addModuleDefinition(self, *args):
"""
Adds a module definition or a list of module definitions to a sbol::Document object.
Parameters
----------
* `moduleDefinition` :
ModuleDefinition object or a list of ModuleDefinition objects
"""
val = _libsbol.Document_addModuleDefinition(self, *args)
if type(args[0]) is list:
for obj in args[0]:
obj.thisown = False
else:
args[0].thisown = False
return val
[docs] def getSequence(self, uri):
"""
Retrieve an object from the Document.
Parameters
----------
* `uri` :
The identity of the SBOL object you want to retrieve
templateparam
-------------
* `SBOLClass` :
The type of SBOL object
"""
return _libsbol.Document_getSequence(self, uri)
[docs] def addSequence(self, *args):
"""
Adds a sequence or a list of sequences to a sbol::Document object.
Parameters
----------
* `sequence` :
Sequence object or a list of Sequence objects
"""
val = _libsbol.Document_addSequence(self, *args)
if type(args[0]) is list:
for obj in args[0]:
obj.thisown = False
else:
args[0].thisown = False
return val
[docs] def getModel(self, uri):
"""
Retrieve an object from the Document.
Parameters
----------
* `uri` :
The identity of the SBOL object you want to retrieve
templateparam
-------------
* `SBOLClass` :
The type of SBOL object
"""
return _libsbol.Document_getModel(self, uri)
def addModel(self, *args):
val = _libsbol.Document_addModel(self, *args)
if type(args[0]) is list:
for obj in args[0]:
obj.thisown = False
else:
args[0].thisown = False
return val
[docs] def getCollection(self, uri):
"""
Retrieve an object from the Document.
Parameters
----------
* `uri` :
The identity of the SBOL object you want to retrieve
templateparam
-------------
* `SBOLClass` :
The type of SBOL object
"""
return _libsbol.Document_getCollection(self, uri)
def addCollection(self, *args):
val = _libsbol.Document_addCollection(self, *args)
if type(args[0]) is list:
for obj in args[0]:
obj.thisown = False
else:
args[0].thisown = False
return val
[docs] def getActivity(self, uri):
"""
Retrieve an object from the Document.
Parameters
----------
* `uri` :
The identity of the SBOL object you want to retrieve
templateparam
-------------
* `SBOLClass` :
The type of SBOL object
"""
return _libsbol.Document_getActivity(self, uri)
def addActivity(self, *args):
val = _libsbol.Document_addActivity(self, *args)
if type(args[0]) is list:
for obj in args[0]:
obj.thisown = False
else:
args[0].thisown = False
return val
[docs] def getPlan(self, uri):
"""
Retrieve an object from the Document.
Parameters
----------
* `uri` :
The identity of the SBOL object you want to retrieve
templateparam
-------------
* `SBOLClass` :
The type of SBOL object
"""
return _libsbol.Document_getPlan(self, uri)
def addPlan(self, *args):
val = _libsbol.Document_addPlan(self, *args)
if type(args[0]) is list:
for obj in args[0]:
obj.thisown = False
else:
args[0].thisown = False
return val
[docs] def getAgent(self, uri):
"""
Retrieve an object from the Document.
Parameters
----------
* `uri` :
The identity of the SBOL object you want to retrieve
templateparam
-------------
* `SBOLClass` :
The type of SBOL object
"""
return _libsbol.Document_getAgent(self, uri)
def addAgent(self, *args):
val = _libsbol.Document_addAgent(self, *args)
if type(args[0]) is list:
for obj in args[0]:
obj.thisown = False
else:
args[0].thisown = False
return val
[docs] def getAttachment(self, uri):
"""
Retrieve an object from the Document.
Parameters
----------
* `uri` :
The identity of the SBOL object you want to retrieve
templateparam
-------------
* `SBOLClass` :
The type of SBOL object
"""
return _libsbol.Document_getAttachment(self, uri)
def addAttachment(self, *args):
val = _libsbol.Document_addAttachment(self, *args)
if type(args[0]) is list:
for obj in args[0]:
obj.thisown = False
else:
args[0].thisown = False
return val
[docs] def getImplementation(self, uri):
"""
Retrieve an object from the Document.
Parameters
----------
* `uri` :
The identity of the SBOL object you want to retrieve
templateparam
-------------
* `SBOLClass` :
The type of SBOL object
"""
return _libsbol.Document_getImplementation(self, uri)
def addImplementation(self, *args):
val = _libsbol.Document_addImplementation(self, *args)
if type(args[0]) is list:
for obj in args[0]:
obj.thisown = False
else:
args[0].thisown = False
return val
[docs] def getCombinatorialDerivation(self, uri):
"""
Retrieve an object from the Document.
Parameters
----------
* `uri` :
The identity of the SBOL object you want to retrieve
templateparam
-------------
* `SBOLClass` :
The type of SBOL object
"""
return _libsbol.Document_getCombinatorialDerivation(self, uri)
def addCombinatorialDerivation(self, *args):
val = _libsbol.Document_addCombinatorialDerivation(self, *args)
if type(args[0]) is list:
for obj in args[0]:
obj.thisown = False
else:
args[0].thisown = False
return val
[docs] def getDesign(self, uri):
"""
Retrieve an object from the Document.
Parameters
----------
* `uri` :
The identity of the SBOL object you want to retrieve
templateparam
-------------
* `SBOLClass` :
The type of SBOL object
"""
return _libsbol.Document_getDesign(self, uri)
def addDesign(self, *args):
val = _libsbol.Document_addDesign(self, *args)
if type(args[0]) is list:
for obj in args[0]:
obj.thisown = False
else:
args[0].thisown = False
return val
[docs] def getBuild(self, uri):
"""
Retrieve an object from the Document.
Parameters
----------
* `uri` :
The identity of the SBOL object you want to retrieve
templateparam
-------------
* `SBOLClass` :
The type of SBOL object
"""
return _libsbol.Document_getBuild(self, uri)
def addBuild(self, *args):
val = _libsbol.Document_addBuild(self, *args)
if type(args[0]) is list:
for obj in args[0]:
obj.thisown = False
else:
args[0].thisown = False
return val
[docs] def getTest(self, uri):
"""
Retrieve an object from the Document.
Parameters
----------
* `uri` :
The identity of the SBOL object you want to retrieve
templateparam
-------------
* `SBOLClass` :
The type of SBOL object
"""
return _libsbol.Document_getTest(self, uri)
def addTest(self, *args):
val = _libsbol.Document_addTest(self, *args)
if type(args[0]) is list:
for obj in args[0]:
obj.thisown = False
else:
args[0].thisown = False
return val
[docs] def getAnalysis(self, uri):
"""
Retrieve an object from the Document.
Parameters
----------
* `uri` :
The identity of the SBOL object you want to retrieve
templateparam
-------------
* `SBOLClass` :
The type of SBOL object
"""
return _libsbol.Document_getAnalysis(self, uri)
def addAnalysis(self, *args):
val = _libsbol.Document_addAnalysis(self, *args)
if type(args[0]) is list:
for obj in args[0]:
obj.thisown = False
else:
args[0].thisown = False
return val
[docs] def getSampleRoster(self, uri):
"""
Retrieve an object from the Document.
Parameters
----------
* `uri` :
The identity of the SBOL object you want to retrieve
templateparam
-------------
* `SBOLClass` :
The type of SBOL object
"""
return _libsbol.Document_getSampleRoster(self, uri)
def addSampleRoster(self, *args):
val = _libsbol.Document_addSampleRoster(self, *args)
if type(args[0]) is list:
for obj in args[0]:
obj.thisown = False
else:
args[0].thisown = False
return val
def __getattribute__(self,name):
if name in object.__getattribute__(self, '__swig_getmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if sbol_attribute.getUpperBound() != '1':
return sbol_attribute.getAll()
else:
try:
return sbol_attribute.get()
except LookupError:
return None
return None
elif sbol_attribute.getUpperBound() == '1':
try:
return sbol_attribute.get()
except:
return None
return object.__getattribute__(self, name)
__setattribute__ = __setattr__
def __setattr__(self,name, value):
if name in object.__getattribute__(self, '__swig_setmethods__').keys():
sbol_attribute = object.__getattribute__(self, name)
if not 'Owned' in sbol_attribute.__class__.__name__:
if value == None:
sbol_attribute.clear()
elif type(value) == list:
if sbol_attribute.getUpperBound() == '1':
raise TypeError('The ' + sbol_attribute.getTypeURI() + ' property does not accept list arguments')
sbol_attribute.clear()
for val in value:
sbol_attribute.add(val)
else:
sbol_attribute.set(value)
elif sbol_attribute.getUpperBound() == '1':
if len(sbol_attribute) > 0:
sbol_obj = sbol_attribute.get()
doc = sbol_obj.doc
sbol_attribute.remove()
if not doc:
sbol_obj.thisown = True
elif not doc.find(sbol_obj.identity):
sbol_obj.thisown = True
if not value == None:
sbol_attribute.set(value)
value.thisown = False
else:
self.__class__.__setattribute__(self, name, value)
def __repr__(self):
return self.__class__.__name__
def getExtensionObject(self, id):
return _libsbol.Document_getExtensionObject(self, id)
def addExtensionObject(self, py_obj):
return _libsbol.Document_addExtensionObject(self, py_obj)
def __iter__(self):
return _libsbol.Document___iter__(self)
def next(self):
return _libsbol.Document_next(self)
def __next__(self):
return _libsbol.Document___next__(self)
Document_swigregister = _libsbol.Document_swigregister
Document_swigregister(Document)
cvar = _libsbol.cvar
def raptor_error_handler(user_data, message):
return _libsbol.raptor_error_handler(user_data, message)
raptor_error_handler = _libsbol.raptor_error_handler
def convert_ntriples_encoding_to_ascii(s):
return _libsbol.convert_ntriples_encoding_to_ascii(s)
convert_ntriples_encoding_to_ascii = _libsbol.convert_ntriples_encoding_to_ascii
def cut_sbol_resource(xml_string, resource_id):
return _libsbol.cut_sbol_resource(xml_string, resource_id)
cut_sbol_resource = _libsbol.cut_sbol_resource
def replace_reference_to_resource(xml_string, property_name, resource_id, replacement_text):
return _libsbol.replace_reference_to_resource(xml_string, property_name, resource_id, replacement_text)
replace_reference_to_resource = _libsbol.replace_reference_to_resource
def seek_element(xml_buffer, uri):
return _libsbol.seek_element(xml_buffer, uri)
seek_element = _libsbol.seek_element
def seek_property_element(xml_buffer, property_name):
return _libsbol.seek_property_element(xml_buffer, property_name)
seek_property_element = _libsbol.seek_property_element
def seek_next_element(xml_buffer):
return _libsbol.seek_next_element(xml_buffer)
seek_next_element = _libsbol.seek_next_element
def seek_new_line(xml_buffer):
return _libsbol.seek_new_line(xml_buffer)
seek_new_line = _libsbol.seek_new_line
def seek_end_of_line(xml_buffer):
return _libsbol.seek_end_of_line(xml_buffer)
seek_end_of_line = _libsbol.seek_end_of_line
def seek_end_of_element(xml_buffer):
return _libsbol.seek_end_of_element(xml_buffer)
seek_end_of_element = _libsbol.seek_end_of_element
def seek_end_of_node(xml_buffer, uri):
return _libsbol.seek_end_of_node(xml_buffer, uri)
seek_end_of_node = _libsbol.seek_end_of_node
def seek_resource(xml_buffer, qname, resource_uri):
return _libsbol.seek_resource(xml_buffer, qname, resource_uri)
seek_resource = _libsbol.seek_resource
def is_open_node(xml_buffer):
return _libsbol.is_open_node(xml_buffer)
is_open_node = _libsbol.is_open_node
def indent(text, indentation):
return _libsbol.indent(text, indentation)
indent = _libsbol.indent
def get_qname(xml_buffer):
return _libsbol.get_qname(xml_buffer)
get_qname = _libsbol.get_qname
def get_local_part(qname):
return _libsbol.get_local_part(qname)
get_local_part = _libsbol.get_local_part
def get_prefix(qname):
return _libsbol.get_prefix(qname)
get_prefix = _libsbol.get_prefix
def parse_element(xml_buffer):
return _libsbol.parse_element(xml_buffer)
parse_element = _libsbol.parse_element
class OwnedPythonObject(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, OwnedPythonObject, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, OwnedPythonObject, name)
__repr__ = _swig_repr
def __init__(self, sbol_owner, sbol_uri, constructor, lower_bound, upper_bound, first_obj=None):
this = _libsbol.new_OwnedPythonObject(sbol_owner, sbol_uri, constructor, lower_bound, upper_bound, first_obj)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def set(self, py_obj):
val = _libsbol.OwnedPythonObject_set(self, py_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
def add(self, py_obj):
val = _libsbol.OwnedPythonObject_add(self, py_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
def get(self, uri):
return _libsbol.OwnedPythonObject_get(self, uri)
def create(self, uri):
val = _libsbol.OwnedPythonObject_create(self, uri)
val.thisown = False
return val
def __getitem__(self, *args):
return _libsbol.OwnedPythonObject___getitem__(self, *args)
def __setitem__(self, uri, py_obj):
return _libsbol.OwnedPythonObject___setitem__(self, uri, py_obj)
def __iter__(self):
return _libsbol.OwnedPythonObject___iter__(self)
def next(self):
return _libsbol.OwnedPythonObject_next(self)
def __next__(self):
return _libsbol.OwnedPythonObject___next__(self)
def __len__(self):
return _libsbol.OwnedPythonObject___len__(self)
__swig_destroy__ = _libsbol.delete_OwnedPythonObject
__del__ = lambda self: None
OwnedPythonObject_swigregister = _libsbol.OwnedPythonObject_swigregister
OwnedPythonObject_swigregister(OwnedPythonObject)
class LocationVector(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, LocationVector, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, LocationVector, name)
__repr__ = _swig_repr
def iterator(self):
return _libsbol.LocationVector_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self):
return _libsbol.LocationVector___nonzero__(self)
def __bool__(self):
return _libsbol.LocationVector___bool__(self)
def __len__(self):
return _libsbol.LocationVector___len__(self)
def __getslice__(self, i, j):
return _libsbol.LocationVector___getslice__(self, i, j)
def __setslice__(self, *args):
return _libsbol.LocationVector___setslice__(self, *args)
def __delslice__(self, i, j):
return _libsbol.LocationVector___delslice__(self, i, j)
def __delitem__(self, *args):
return _libsbol.LocationVector___delitem__(self, *args)
def __getitem__(self, *args):
return _libsbol.LocationVector___getitem__(self, *args)
def __setitem__(self, *args):
return _libsbol.LocationVector___setitem__(self, *args)
def pop(self):
return _libsbol.LocationVector_pop(self)
def append(self, x):
return _libsbol.LocationVector_append(self, x)
def empty(self):
return _libsbol.LocationVector_empty(self)
def size(self):
return _libsbol.LocationVector_size(self)
def swap(self, v):
return _libsbol.LocationVector_swap(self, v)
def begin(self):
return _libsbol.LocationVector_begin(self)
def end(self):
return _libsbol.LocationVector_end(self)
def rbegin(self):
return _libsbol.LocationVector_rbegin(self)
def rend(self):
return _libsbol.LocationVector_rend(self)
def clear(self):
return _libsbol.LocationVector_clear(self)
def get_allocator(self):
return _libsbol.LocationVector_get_allocator(self)
def pop_back(self):
return _libsbol.LocationVector_pop_back(self)
def erase(self, *args):
return _libsbol.LocationVector_erase(self, *args)
def __init__(self, *args):
this = _libsbol.new_LocationVector(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def push_back(self, x):
return _libsbol.LocationVector_push_back(self, x)
def front(self):
return _libsbol.LocationVector_front(self)
def back(self):
return _libsbol.LocationVector_back(self)
def assign(self, n, x):
return _libsbol.LocationVector_assign(self, n, x)
def resize(self, *args):
return _libsbol.LocationVector_resize(self, *args)
def insert(self, *args):
return _libsbol.LocationVector_insert(self, *args)
def reserve(self, n):
return _libsbol.LocationVector_reserve(self, n)
def capacity(self):
return _libsbol.LocationVector_capacity(self)
__swig_destroy__ = _libsbol.delete_LocationVector
__del__ = lambda self: None
LocationVector_swigregister = _libsbol.LocationVector_swigregister
LocationVector_swigregister(LocationVector)
[docs]class LocationProperty(_object):
"""
Member properties of all SBOL objects are defined using a Property object.
The Property class provides a generic interface for accessing SBOL objects. At a
low level, the Property class converts SBOL data structures into RDF triples.
templateparam
-------------
* `The` :
SBOL specification currently supports string, URI, and integer literal
values.
"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, LocationProperty, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, LocationProperty, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Parameters
----------
* `type_uri` :
An RDF hash URI for this property, consisting of a namespace followed by an
identifier. For example, Properties of SBOLObjects use URIs of the form
http://sbols.org/v2#somePropertyName, where the identifier somePropertyName
determines the appearance of XML nodes in an SBOL file. Alternatively,
annotations in a custom namespace can be provided using a similarly formed
hash URI in another namespace.
* `property_owner` :
All Property objects must have a pointer back to its parent SBOLObject of
which it is a member
* `initial_value` :
The initial value of the Property
* `validation_rules` :
A vector of externally defined ValidationRules. The vector contains pointers
to functions which correspond to the validation rules listed in the appendix
of the formal SBOL specification document. ValidationRules are automatically
checked every time a setter or adder method is called and when Documents are
read and written.
"""
this = _libsbol.new_LocationProperty(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete_LocationProperty
__del__ = lambda self: None
[docs] def getTypeURI(self):
"""
Returns
-------
The uniform resource identifier that describes the RDF-type of this SBOL Object
"""
return _libsbol.LocationProperty_getTypeURI(self)
[docs] def getOwner(self):
"""
"""
return _libsbol.LocationProperty_getOwner(self)
[docs] def set(self, *args):
"""
Basic setter for SBOL Property.
Parameters
----------
* `new_value` :
A new integer value for the property, which is converted to a raw string
during serialization.
"""
val = _libsbol.LocationProperty_set(self, *args)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, new_value):
"""
Appends the new value to a list of values, for properties that allow it.
Parameters
----------
* `new_value` :
A new string which will be added to a list of values.
"""
val = _libsbol.LocationProperty_add(self, new_value)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def remove(self, index=0):
"""
Remove a Property from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.LocationProperty_remove(self, index)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.LocationProperty_clear(self)
[docs] def write(self):
"""
"""
return _libsbol.LocationProperty_write(self)
def find(self, query):
return _libsbol.LocationProperty_find(self, query)
def getLowerBound(self):
return _libsbol.LocationProperty_getLowerBound(self)
def getUpperBound(self):
return _libsbol.LocationProperty_getUpperBound(self)
[docs] def validate(self, arg=None):
"""
"""
return _libsbol.LocationProperty_validate(self, arg)
def copy(self, target_property):
return _libsbol.LocationProperty_copy(self, target_property)
__swig_setmethods__["python_iter"] = _libsbol.LocationProperty_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.LocationProperty_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.LocationProperty_python_iter_get, _libsbol.LocationProperty_python_iter_set)
def addValidationRule(self, *args):
return _libsbol.LocationProperty_addValidationRule(self, *args)
LocationProperty_swigregister = _libsbol.LocationProperty_swigregister
LocationProperty_swigregister(LocationProperty)
[docs]class OwnedLocation(LocationProperty):
"""
A container property that contains child objects.
Creates a composition out of two or more classes. In the SBOL specification,
compositional relationships are indicated in class diagrams by arrows with black
diamonds. A compositional relationship means that deleting the parent object
will delete the child objects, and adding the parent object to a Document will
also add the child object. Owned objects are stored in arbitrary order.
templateparam
-------------
* `SBOLClass` :
The type of child SBOL object contained by this Property
"""
__swig_setmethods__ = {}
for _s in [LocationProperty]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, OwnedLocation, name, value)
__swig_getmethods__ = {}
for _s in [LocationProperty]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, OwnedLocation, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
"""
this = _libsbol.new_OwnedLocation(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
[docs] def set(self, sbol_obj):
"""
Basic setter for OwnedObject SBOL IntProperty.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Assigns a child object to
this OwnedObject container property. This method always overwrites the first
SBOLObject in the container. appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
* `sbol_obj` :
The child object Sets the first object in the container
"""
val = _libsbol.OwnedLocation_set(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, sbol_obj):
"""
Appends the new value to a list of values, for properties that allow it.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Adds a child object to the
parent object. This method always appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
"""
val = _libsbol.OwnedLocation_add(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def get(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedLocation_get(self, *args)
[docs] def getAll(self):
"""
Retrieve a vector of objects from the OwnedObject.
"""
val = _libsbol.OwnedLocation_getAll(self)
val = list(val)
return val
[docs] def remove(self, *args):
"""
Remove an object from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.OwnedLocation_remove(self, *args)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.OwnedLocation_clear(self)
[docs] def create(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedLocation_create(self, uri)
val.thisown = False
return val
def define(self, definition_object):
return _libsbol.OwnedLocation_define(self, definition_object)
def find(self, uri):
return _libsbol.OwnedLocation_find(self, uri)
__swig_setmethods__["python_iter"] = _libsbol.OwnedLocation_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.OwnedLocation_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.OwnedLocation_python_iter_get, _libsbol.OwnedLocation_python_iter_set)
def __iter__(self):
return _libsbol.OwnedLocation___iter__(self)
def next(self):
return _libsbol.OwnedLocation_next(self)
def __next__(self):
return _libsbol.OwnedLocation___next__(self)
def __len__(self):
return _libsbol.OwnedLocation___len__(self)
[docs] def createRange(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedLocation_createRange(self, uri)
val.thisown = False
return val
[docs] def getRange(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedLocation_getRange(self, *args)
[docs] def createCut(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedLocation_createCut(self, uri)
val.thisown = False
return val
[docs] def getCut(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedLocation_getCut(self, *args)
[docs] def createGenericLocation(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedLocation_createGenericLocation(self, uri)
val.thisown = False
return val
[docs] def getGenericLocation(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedLocation_getGenericLocation(self, *args)
def __setitem__(self, uri, py_obj):
return _libsbol.OwnedLocation___setitem__(self, uri, py_obj)
def __getitem__(self, *args):
return _libsbol.OwnedLocation___getitem__(self, *args)
__swig_destroy__ = _libsbol.delete_OwnedLocation
__del__ = lambda self: None
OwnedLocation_swigregister = _libsbol.OwnedLocation_swigregister
OwnedLocation_swigregister(OwnedLocation)
class MapsToVector(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, MapsToVector, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, MapsToVector, name)
__repr__ = _swig_repr
def iterator(self):
return _libsbol.MapsToVector_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self):
return _libsbol.MapsToVector___nonzero__(self)
def __bool__(self):
return _libsbol.MapsToVector___bool__(self)
def __len__(self):
return _libsbol.MapsToVector___len__(self)
def __getslice__(self, i, j):
return _libsbol.MapsToVector___getslice__(self, i, j)
def __setslice__(self, *args):
return _libsbol.MapsToVector___setslice__(self, *args)
def __delslice__(self, i, j):
return _libsbol.MapsToVector___delslice__(self, i, j)
def __delitem__(self, *args):
return _libsbol.MapsToVector___delitem__(self, *args)
def __getitem__(self, *args):
return _libsbol.MapsToVector___getitem__(self, *args)
def __setitem__(self, *args):
return _libsbol.MapsToVector___setitem__(self, *args)
def pop(self):
return _libsbol.MapsToVector_pop(self)
def append(self, x):
return _libsbol.MapsToVector_append(self, x)
def empty(self):
return _libsbol.MapsToVector_empty(self)
def size(self):
return _libsbol.MapsToVector_size(self)
def swap(self, v):
return _libsbol.MapsToVector_swap(self, v)
def begin(self):
return _libsbol.MapsToVector_begin(self)
def end(self):
return _libsbol.MapsToVector_end(self)
def rbegin(self):
return _libsbol.MapsToVector_rbegin(self)
def rend(self):
return _libsbol.MapsToVector_rend(self)
def clear(self):
return _libsbol.MapsToVector_clear(self)
def get_allocator(self):
return _libsbol.MapsToVector_get_allocator(self)
def pop_back(self):
return _libsbol.MapsToVector_pop_back(self)
def erase(self, *args):
return _libsbol.MapsToVector_erase(self, *args)
def __init__(self, *args):
this = _libsbol.new_MapsToVector(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def push_back(self, x):
return _libsbol.MapsToVector_push_back(self, x)
def front(self):
return _libsbol.MapsToVector_front(self)
def back(self):
return _libsbol.MapsToVector_back(self)
def assign(self, n, x):
return _libsbol.MapsToVector_assign(self, n, x)
def resize(self, *args):
return _libsbol.MapsToVector_resize(self, *args)
def insert(self, *args):
return _libsbol.MapsToVector_insert(self, *args)
def reserve(self, n):
return _libsbol.MapsToVector_reserve(self, n)
def capacity(self):
return _libsbol.MapsToVector_capacity(self)
__swig_destroy__ = _libsbol.delete_MapsToVector
__del__ = lambda self: None
MapsToVector_swigregister = _libsbol.MapsToVector_swigregister
MapsToVector_swigregister(MapsToVector)
[docs]class MapsToProperty(_object):
"""
Member properties of all SBOL objects are defined using a Property object.
The Property class provides a generic interface for accessing SBOL objects. At a
low level, the Property class converts SBOL data structures into RDF triples.
templateparam
-------------
* `The` :
SBOL specification currently supports string, URI, and integer literal
values.
"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, MapsToProperty, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, MapsToProperty, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Parameters
----------
* `type_uri` :
An RDF hash URI for this property, consisting of a namespace followed by an
identifier. For example, Properties of SBOLObjects use URIs of the form
http://sbols.org/v2#somePropertyName, where the identifier somePropertyName
determines the appearance of XML nodes in an SBOL file. Alternatively,
annotations in a custom namespace can be provided using a similarly formed
hash URI in another namespace.
* `property_owner` :
All Property objects must have a pointer back to its parent SBOLObject of
which it is a member
* `initial_value` :
The initial value of the Property
* `validation_rules` :
A vector of externally defined ValidationRules. The vector contains pointers
to functions which correspond to the validation rules listed in the appendix
of the formal SBOL specification document. ValidationRules are automatically
checked every time a setter or adder method is called and when Documents are
read and written.
"""
this = _libsbol.new_MapsToProperty(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete_MapsToProperty
__del__ = lambda self: None
[docs] def getTypeURI(self):
"""
Returns
-------
The uniform resource identifier that describes the RDF-type of this SBOL Object
"""
return _libsbol.MapsToProperty_getTypeURI(self)
[docs] def getOwner(self):
"""
"""
return _libsbol.MapsToProperty_getOwner(self)
[docs] def set(self, *args):
"""
Basic setter for SBOL Property.
Parameters
----------
* `new_value` :
A new integer value for the property, which is converted to a raw string
during serialization.
"""
val = _libsbol.MapsToProperty_set(self, *args)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, new_value):
"""
Appends the new value to a list of values, for properties that allow it.
Parameters
----------
* `new_value` :
A new string which will be added to a list of values.
"""
val = _libsbol.MapsToProperty_add(self, new_value)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def remove(self, index=0):
"""
Remove a Property from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.MapsToProperty_remove(self, index)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.MapsToProperty_clear(self)
[docs] def write(self):
"""
"""
return _libsbol.MapsToProperty_write(self)
def find(self, query):
return _libsbol.MapsToProperty_find(self, query)
def getLowerBound(self):
return _libsbol.MapsToProperty_getLowerBound(self)
def getUpperBound(self):
return _libsbol.MapsToProperty_getUpperBound(self)
[docs] def validate(self, arg=None):
"""
"""
return _libsbol.MapsToProperty_validate(self, arg)
def copy(self, target_property):
return _libsbol.MapsToProperty_copy(self, target_property)
__swig_setmethods__["python_iter"] = _libsbol.MapsToProperty_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.MapsToProperty_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.MapsToProperty_python_iter_get, _libsbol.MapsToProperty_python_iter_set)
def addValidationRule(self, *args):
return _libsbol.MapsToProperty_addValidationRule(self, *args)
MapsToProperty_swigregister = _libsbol.MapsToProperty_swigregister
MapsToProperty_swigregister(MapsToProperty)
[docs]class OwnedMapsTo(MapsToProperty):
"""
A container property that contains child objects.
Creates a composition out of two or more classes. In the SBOL specification,
compositional relationships are indicated in class diagrams by arrows with black
diamonds. A compositional relationship means that deleting the parent object
will delete the child objects, and adding the parent object to a Document will
also add the child object. Owned objects are stored in arbitrary order.
templateparam
-------------
* `SBOLClass` :
The type of child SBOL object contained by this Property
"""
__swig_setmethods__ = {}
for _s in [MapsToProperty]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, OwnedMapsTo, name, value)
__swig_getmethods__ = {}
for _s in [MapsToProperty]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, OwnedMapsTo, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
"""
this = _libsbol.new_OwnedMapsTo(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
[docs] def set(self, sbol_obj):
"""
Basic setter for OwnedObject SBOL IntProperty.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Assigns a child object to
this OwnedObject container property. This method always overwrites the first
SBOLObject in the container. appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
* `sbol_obj` :
The child object Sets the first object in the container
"""
val = _libsbol.OwnedMapsTo_set(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, sbol_obj):
"""
Appends the new value to a list of values, for properties that allow it.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Adds a child object to the
parent object. This method always appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
"""
val = _libsbol.OwnedMapsTo_add(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def get(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedMapsTo_get(self, *args)
[docs] def getAll(self):
"""
Retrieve a vector of objects from the OwnedObject.
"""
val = _libsbol.OwnedMapsTo_getAll(self)
val = list(val)
return val
[docs] def remove(self, *args):
"""
Remove an object from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.OwnedMapsTo_remove(self, *args)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.OwnedMapsTo_clear(self)
[docs] def create(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedMapsTo_create(self, uri)
val.thisown = False
return val
def define(self, definition_object):
return _libsbol.OwnedMapsTo_define(self, definition_object)
def find(self, uri):
return _libsbol.OwnedMapsTo_find(self, uri)
__swig_setmethods__["python_iter"] = _libsbol.OwnedMapsTo_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.OwnedMapsTo_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.OwnedMapsTo_python_iter_get, _libsbol.OwnedMapsTo_python_iter_set)
def __iter__(self):
return _libsbol.OwnedMapsTo___iter__(self)
def next(self):
return _libsbol.OwnedMapsTo_next(self)
def __next__(self):
return _libsbol.OwnedMapsTo___next__(self)
def __len__(self):
return _libsbol.OwnedMapsTo___len__(self)
[docs] def createRange(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedMapsTo_createRange(self, uri)
val.thisown = False
return val
[docs] def getRange(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedMapsTo_getRange(self, *args)
[docs] def createCut(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedMapsTo_createCut(self, uri)
val.thisown = False
return val
[docs] def getCut(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedMapsTo_getCut(self, *args)
[docs] def createGenericLocation(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedMapsTo_createGenericLocation(self, uri)
val.thisown = False
return val
[docs] def getGenericLocation(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedMapsTo_getGenericLocation(self, *args)
def __getitem__(self, *args):
return _libsbol.OwnedMapsTo___getitem__(self, *args)
def __setitem__(self, uri, py_obj):
return _libsbol.OwnedMapsTo___setitem__(self, uri, py_obj)
__swig_destroy__ = _libsbol.delete_OwnedMapsTo
__del__ = lambda self: None
OwnedMapsTo_swigregister = _libsbol.OwnedMapsTo_swigregister
OwnedMapsTo_swigregister(OwnedMapsTo)
class SequenceConstraintVector(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, SequenceConstraintVector, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, SequenceConstraintVector, name)
__repr__ = _swig_repr
def iterator(self):
return _libsbol.SequenceConstraintVector_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self):
return _libsbol.SequenceConstraintVector___nonzero__(self)
def __bool__(self):
return _libsbol.SequenceConstraintVector___bool__(self)
def __len__(self):
return _libsbol.SequenceConstraintVector___len__(self)
def __getslice__(self, i, j):
return _libsbol.SequenceConstraintVector___getslice__(self, i, j)
def __setslice__(self, *args):
return _libsbol.SequenceConstraintVector___setslice__(self, *args)
def __delslice__(self, i, j):
return _libsbol.SequenceConstraintVector___delslice__(self, i, j)
def __delitem__(self, *args):
return _libsbol.SequenceConstraintVector___delitem__(self, *args)
def __getitem__(self, *args):
return _libsbol.SequenceConstraintVector___getitem__(self, *args)
def __setitem__(self, *args):
return _libsbol.SequenceConstraintVector___setitem__(self, *args)
def pop(self):
return _libsbol.SequenceConstraintVector_pop(self)
def append(self, x):
return _libsbol.SequenceConstraintVector_append(self, x)
def empty(self):
return _libsbol.SequenceConstraintVector_empty(self)
def size(self):
return _libsbol.SequenceConstraintVector_size(self)
def swap(self, v):
return _libsbol.SequenceConstraintVector_swap(self, v)
def begin(self):
return _libsbol.SequenceConstraintVector_begin(self)
def end(self):
return _libsbol.SequenceConstraintVector_end(self)
def rbegin(self):
return _libsbol.SequenceConstraintVector_rbegin(self)
def rend(self):
return _libsbol.SequenceConstraintVector_rend(self)
def clear(self):
return _libsbol.SequenceConstraintVector_clear(self)
def get_allocator(self):
return _libsbol.SequenceConstraintVector_get_allocator(self)
def pop_back(self):
return _libsbol.SequenceConstraintVector_pop_back(self)
def erase(self, *args):
return _libsbol.SequenceConstraintVector_erase(self, *args)
def __init__(self, *args):
this = _libsbol.new_SequenceConstraintVector(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def push_back(self, x):
return _libsbol.SequenceConstraintVector_push_back(self, x)
def front(self):
return _libsbol.SequenceConstraintVector_front(self)
def back(self):
return _libsbol.SequenceConstraintVector_back(self)
def assign(self, n, x):
return _libsbol.SequenceConstraintVector_assign(self, n, x)
def resize(self, *args):
return _libsbol.SequenceConstraintVector_resize(self, *args)
def insert(self, *args):
return _libsbol.SequenceConstraintVector_insert(self, *args)
def reserve(self, n):
return _libsbol.SequenceConstraintVector_reserve(self, n)
def capacity(self):
return _libsbol.SequenceConstraintVector_capacity(self)
__swig_destroy__ = _libsbol.delete_SequenceConstraintVector
__del__ = lambda self: None
SequenceConstraintVector_swigregister = _libsbol.SequenceConstraintVector_swigregister
SequenceConstraintVector_swigregister(SequenceConstraintVector)
[docs]class SequenceConstraintProperty(_object):
"""
Member properties of all SBOL objects are defined using a Property object.
The Property class provides a generic interface for accessing SBOL objects. At a
low level, the Property class converts SBOL data structures into RDF triples.
templateparam
-------------
* `The` :
SBOL specification currently supports string, URI, and integer literal
values.
"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, SequenceConstraintProperty, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, SequenceConstraintProperty, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Parameters
----------
* `type_uri` :
An RDF hash URI for this property, consisting of a namespace followed by an
identifier. For example, Properties of SBOLObjects use URIs of the form
http://sbols.org/v2#somePropertyName, where the identifier somePropertyName
determines the appearance of XML nodes in an SBOL file. Alternatively,
annotations in a custom namespace can be provided using a similarly formed
hash URI in another namespace.
* `property_owner` :
All Property objects must have a pointer back to its parent SBOLObject of
which it is a member
* `initial_value` :
The initial value of the Property
* `validation_rules` :
A vector of externally defined ValidationRules. The vector contains pointers
to functions which correspond to the validation rules listed in the appendix
of the formal SBOL specification document. ValidationRules are automatically
checked every time a setter or adder method is called and when Documents are
read and written.
"""
this = _libsbol.new_SequenceConstraintProperty(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete_SequenceConstraintProperty
__del__ = lambda self: None
[docs] def getTypeURI(self):
"""
Returns
-------
The uniform resource identifier that describes the RDF-type of this SBOL Object
"""
return _libsbol.SequenceConstraintProperty_getTypeURI(self)
[docs] def getOwner(self):
"""
"""
return _libsbol.SequenceConstraintProperty_getOwner(self)
[docs] def set(self, *args):
"""
Basic setter for SBOL Property.
Parameters
----------
* `new_value` :
A new integer value for the property, which is converted to a raw string
during serialization.
"""
val = _libsbol.SequenceConstraintProperty_set(self, *args)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, new_value):
"""
Appends the new value to a list of values, for properties that allow it.
Parameters
----------
* `new_value` :
A new string which will be added to a list of values.
"""
val = _libsbol.SequenceConstraintProperty_add(self, new_value)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def remove(self, index=0):
"""
Remove a Property from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.SequenceConstraintProperty_remove(self, index)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.SequenceConstraintProperty_clear(self)
[docs] def write(self):
"""
"""
return _libsbol.SequenceConstraintProperty_write(self)
def find(self, query):
return _libsbol.SequenceConstraintProperty_find(self, query)
def getLowerBound(self):
return _libsbol.SequenceConstraintProperty_getLowerBound(self)
def getUpperBound(self):
return _libsbol.SequenceConstraintProperty_getUpperBound(self)
[docs] def validate(self, arg=None):
"""
"""
return _libsbol.SequenceConstraintProperty_validate(self, arg)
def copy(self, target_property):
return _libsbol.SequenceConstraintProperty_copy(self, target_property)
__swig_setmethods__["python_iter"] = _libsbol.SequenceConstraintProperty_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.SequenceConstraintProperty_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.SequenceConstraintProperty_python_iter_get, _libsbol.SequenceConstraintProperty_python_iter_set)
def addValidationRule(self, *args):
return _libsbol.SequenceConstraintProperty_addValidationRule(self, *args)
SequenceConstraintProperty_swigregister = _libsbol.SequenceConstraintProperty_swigregister
SequenceConstraintProperty_swigregister(SequenceConstraintProperty)
[docs]class OwnedSequenceConstraint(SequenceConstraintProperty):
"""
A container property that contains child objects.
Creates a composition out of two or more classes. In the SBOL specification,
compositional relationships are indicated in class diagrams by arrows with black
diamonds. A compositional relationship means that deleting the parent object
will delete the child objects, and adding the parent object to a Document will
also add the child object. Owned objects are stored in arbitrary order.
templateparam
-------------
* `SBOLClass` :
The type of child SBOL object contained by this Property
"""
__swig_setmethods__ = {}
for _s in [SequenceConstraintProperty]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, OwnedSequenceConstraint, name, value)
__swig_getmethods__ = {}
for _s in [SequenceConstraintProperty]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, OwnedSequenceConstraint, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
"""
this = _libsbol.new_OwnedSequenceConstraint(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
[docs] def set(self, sbol_obj):
"""
Basic setter for OwnedObject SBOL IntProperty.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Assigns a child object to
this OwnedObject container property. This method always overwrites the first
SBOLObject in the container. appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
* `sbol_obj` :
The child object Sets the first object in the container
"""
val = _libsbol.OwnedSequenceConstraint_set(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, sbol_obj):
"""
Appends the new value to a list of values, for properties that allow it.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Adds a child object to the
parent object. This method always appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
"""
val = _libsbol.OwnedSequenceConstraint_add(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def get(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedSequenceConstraint_get(self, *args)
[docs] def getAll(self):
"""
Retrieve a vector of objects from the OwnedObject.
"""
val = _libsbol.OwnedSequenceConstraint_getAll(self)
val = list(val)
return val
[docs] def remove(self, *args):
"""
Remove an object from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.OwnedSequenceConstraint_remove(self, *args)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.OwnedSequenceConstraint_clear(self)
[docs] def create(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedSequenceConstraint_create(self, uri)
val.thisown = False
return val
def define(self, definition_object):
return _libsbol.OwnedSequenceConstraint_define(self, definition_object)
def find(self, uri):
return _libsbol.OwnedSequenceConstraint_find(self, uri)
__swig_setmethods__["python_iter"] = _libsbol.OwnedSequenceConstraint_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.OwnedSequenceConstraint_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.OwnedSequenceConstraint_python_iter_get, _libsbol.OwnedSequenceConstraint_python_iter_set)
def __iter__(self):
return _libsbol.OwnedSequenceConstraint___iter__(self)
def next(self):
return _libsbol.OwnedSequenceConstraint_next(self)
def __next__(self):
return _libsbol.OwnedSequenceConstraint___next__(self)
def __len__(self):
return _libsbol.OwnedSequenceConstraint___len__(self)
[docs] def createRange(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedSequenceConstraint_createRange(self, uri)
val.thisown = False
return val
[docs] def getRange(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedSequenceConstraint_getRange(self, *args)
[docs] def createCut(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedSequenceConstraint_createCut(self, uri)
val.thisown = False
return val
[docs] def getCut(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedSequenceConstraint_getCut(self, *args)
[docs] def createGenericLocation(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedSequenceConstraint_createGenericLocation(self, uri)
val.thisown = False
return val
[docs] def getGenericLocation(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedSequenceConstraint_getGenericLocation(self, *args)
def __getitem__(self, *args):
return _libsbol.OwnedSequenceConstraint___getitem__(self, *args)
def __setitem__(self, uri, py_obj):
return _libsbol.OwnedSequenceConstraint___setitem__(self, uri, py_obj)
__swig_destroy__ = _libsbol.delete_OwnedSequenceConstraint
__del__ = lambda self: None
OwnedSequenceConstraint_swigregister = _libsbol.OwnedSequenceConstraint_swigregister
OwnedSequenceConstraint_swigregister(OwnedSequenceConstraint)
class SequenceAnnotationVector(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, SequenceAnnotationVector, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, SequenceAnnotationVector, name)
__repr__ = _swig_repr
def iterator(self):
return _libsbol.SequenceAnnotationVector_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self):
return _libsbol.SequenceAnnotationVector___nonzero__(self)
def __bool__(self):
return _libsbol.SequenceAnnotationVector___bool__(self)
def __len__(self):
return _libsbol.SequenceAnnotationVector___len__(self)
def __getslice__(self, i, j):
return _libsbol.SequenceAnnotationVector___getslice__(self, i, j)
def __setslice__(self, *args):
return _libsbol.SequenceAnnotationVector___setslice__(self, *args)
def __delslice__(self, i, j):
return _libsbol.SequenceAnnotationVector___delslice__(self, i, j)
def __delitem__(self, *args):
return _libsbol.SequenceAnnotationVector___delitem__(self, *args)
def __getitem__(self, *args):
return _libsbol.SequenceAnnotationVector___getitem__(self, *args)
def __setitem__(self, *args):
return _libsbol.SequenceAnnotationVector___setitem__(self, *args)
def pop(self):
return _libsbol.SequenceAnnotationVector_pop(self)
def append(self, x):
return _libsbol.SequenceAnnotationVector_append(self, x)
def empty(self):
return _libsbol.SequenceAnnotationVector_empty(self)
def size(self):
return _libsbol.SequenceAnnotationVector_size(self)
def swap(self, v):
return _libsbol.SequenceAnnotationVector_swap(self, v)
def begin(self):
return _libsbol.SequenceAnnotationVector_begin(self)
def end(self):
return _libsbol.SequenceAnnotationVector_end(self)
def rbegin(self):
return _libsbol.SequenceAnnotationVector_rbegin(self)
def rend(self):
return _libsbol.SequenceAnnotationVector_rend(self)
def clear(self):
return _libsbol.SequenceAnnotationVector_clear(self)
def get_allocator(self):
return _libsbol.SequenceAnnotationVector_get_allocator(self)
def pop_back(self):
return _libsbol.SequenceAnnotationVector_pop_back(self)
def erase(self, *args):
return _libsbol.SequenceAnnotationVector_erase(self, *args)
def __init__(self, *args):
this = _libsbol.new_SequenceAnnotationVector(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def push_back(self, x):
return _libsbol.SequenceAnnotationVector_push_back(self, x)
def front(self):
return _libsbol.SequenceAnnotationVector_front(self)
def back(self):
return _libsbol.SequenceAnnotationVector_back(self)
def assign(self, n, x):
return _libsbol.SequenceAnnotationVector_assign(self, n, x)
def resize(self, *args):
return _libsbol.SequenceAnnotationVector_resize(self, *args)
def insert(self, *args):
return _libsbol.SequenceAnnotationVector_insert(self, *args)
def reserve(self, n):
return _libsbol.SequenceAnnotationVector_reserve(self, n)
def capacity(self):
return _libsbol.SequenceAnnotationVector_capacity(self)
__swig_destroy__ = _libsbol.delete_SequenceAnnotationVector
__del__ = lambda self: None
SequenceAnnotationVector_swigregister = _libsbol.SequenceAnnotationVector_swigregister
SequenceAnnotationVector_swigregister(SequenceAnnotationVector)
[docs]class SequenceAnnotationProperty(_object):
"""
Member properties of all SBOL objects are defined using a Property object.
The Property class provides a generic interface for accessing SBOL objects. At a
low level, the Property class converts SBOL data structures into RDF triples.
templateparam
-------------
* `The` :
SBOL specification currently supports string, URI, and integer literal
values.
"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, SequenceAnnotationProperty, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, SequenceAnnotationProperty, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Parameters
----------
* `type_uri` :
An RDF hash URI for this property, consisting of a namespace followed by an
identifier. For example, Properties of SBOLObjects use URIs of the form
http://sbols.org/v2#somePropertyName, where the identifier somePropertyName
determines the appearance of XML nodes in an SBOL file. Alternatively,
annotations in a custom namespace can be provided using a similarly formed
hash URI in another namespace.
* `property_owner` :
All Property objects must have a pointer back to its parent SBOLObject of
which it is a member
* `initial_value` :
The initial value of the Property
* `validation_rules` :
A vector of externally defined ValidationRules. The vector contains pointers
to functions which correspond to the validation rules listed in the appendix
of the formal SBOL specification document. ValidationRules are automatically
checked every time a setter or adder method is called and when Documents are
read and written.
"""
this = _libsbol.new_SequenceAnnotationProperty(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete_SequenceAnnotationProperty
__del__ = lambda self: None
[docs] def getTypeURI(self):
"""
Returns
-------
The uniform resource identifier that describes the RDF-type of this SBOL Object
"""
return _libsbol.SequenceAnnotationProperty_getTypeURI(self)
[docs] def getOwner(self):
"""
"""
return _libsbol.SequenceAnnotationProperty_getOwner(self)
[docs] def set(self, *args):
"""
Basic setter for SBOL Property.
Parameters
----------
* `new_value` :
A new integer value for the property, which is converted to a raw string
during serialization.
"""
val = _libsbol.SequenceAnnotationProperty_set(self, *args)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, new_value):
"""
Appends the new value to a list of values, for properties that allow it.
Parameters
----------
* `new_value` :
A new string which will be added to a list of values.
"""
val = _libsbol.SequenceAnnotationProperty_add(self, new_value)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def remove(self, index=0):
"""
Remove a Property from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.SequenceAnnotationProperty_remove(self, index)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.SequenceAnnotationProperty_clear(self)
[docs] def write(self):
"""
"""
return _libsbol.SequenceAnnotationProperty_write(self)
def find(self, query):
return _libsbol.SequenceAnnotationProperty_find(self, query)
def getLowerBound(self):
return _libsbol.SequenceAnnotationProperty_getLowerBound(self)
def getUpperBound(self):
return _libsbol.SequenceAnnotationProperty_getUpperBound(self)
[docs] def validate(self, arg=None):
"""
"""
return _libsbol.SequenceAnnotationProperty_validate(self, arg)
def copy(self, target_property):
return _libsbol.SequenceAnnotationProperty_copy(self, target_property)
__swig_setmethods__["python_iter"] = _libsbol.SequenceAnnotationProperty_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.SequenceAnnotationProperty_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.SequenceAnnotationProperty_python_iter_get, _libsbol.SequenceAnnotationProperty_python_iter_set)
def addValidationRule(self, *args):
return _libsbol.SequenceAnnotationProperty_addValidationRule(self, *args)
SequenceAnnotationProperty_swigregister = _libsbol.SequenceAnnotationProperty_swigregister
SequenceAnnotationProperty_swigregister(SequenceAnnotationProperty)
[docs]class OwnedSequenceAnnotation(SequenceAnnotationProperty):
"""
A container property that contains child objects.
Creates a composition out of two or more classes. In the SBOL specification,
compositional relationships are indicated in class diagrams by arrows with black
diamonds. A compositional relationship means that deleting the parent object
will delete the child objects, and adding the parent object to a Document will
also add the child object. Owned objects are stored in arbitrary order.
templateparam
-------------
* `SBOLClass` :
The type of child SBOL object contained by this Property
"""
__swig_setmethods__ = {}
for _s in [SequenceAnnotationProperty]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, OwnedSequenceAnnotation, name, value)
__swig_getmethods__ = {}
for _s in [SequenceAnnotationProperty]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, OwnedSequenceAnnotation, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
"""
this = _libsbol.new_OwnedSequenceAnnotation(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
[docs] def set(self, sbol_obj):
"""
Basic setter for OwnedObject SBOL IntProperty.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Assigns a child object to
this OwnedObject container property. This method always overwrites the first
SBOLObject in the container. appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
* `sbol_obj` :
The child object Sets the first object in the container
"""
val = _libsbol.OwnedSequenceAnnotation_set(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, sbol_obj):
"""
Appends the new value to a list of values, for properties that allow it.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Adds a child object to the
parent object. This method always appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
"""
val = _libsbol.OwnedSequenceAnnotation_add(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def get(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedSequenceAnnotation_get(self, *args)
[docs] def getAll(self):
"""
Retrieve a vector of objects from the OwnedObject.
"""
val = _libsbol.OwnedSequenceAnnotation_getAll(self)
val = list(val)
return val
[docs] def remove(self, *args):
"""
Remove an object from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.OwnedSequenceAnnotation_remove(self, *args)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.OwnedSequenceAnnotation_clear(self)
[docs] def create(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedSequenceAnnotation_create(self, uri)
val.thisown = False
return val
def define(self, definition_object):
return _libsbol.OwnedSequenceAnnotation_define(self, definition_object)
def find(self, uri):
return _libsbol.OwnedSequenceAnnotation_find(self, uri)
__swig_setmethods__["python_iter"] = _libsbol.OwnedSequenceAnnotation_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.OwnedSequenceAnnotation_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.OwnedSequenceAnnotation_python_iter_get, _libsbol.OwnedSequenceAnnotation_python_iter_set)
def __iter__(self):
return _libsbol.OwnedSequenceAnnotation___iter__(self)
def next(self):
return _libsbol.OwnedSequenceAnnotation_next(self)
def __next__(self):
return _libsbol.OwnedSequenceAnnotation___next__(self)
def __len__(self):
return _libsbol.OwnedSequenceAnnotation___len__(self)
[docs] def createRange(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedSequenceAnnotation_createRange(self, uri)
val.thisown = False
return val
[docs] def getRange(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedSequenceAnnotation_getRange(self, *args)
[docs] def createCut(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedSequenceAnnotation_createCut(self, uri)
val.thisown = False
return val
[docs] def getCut(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedSequenceAnnotation_getCut(self, *args)
[docs] def createGenericLocation(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedSequenceAnnotation_createGenericLocation(self, uri)
val.thisown = False
return val
[docs] def getGenericLocation(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedSequenceAnnotation_getGenericLocation(self, *args)
def __getitem__(self, *args):
return _libsbol.OwnedSequenceAnnotation___getitem__(self, *args)
def __setitem__(self, uri, py_obj):
return _libsbol.OwnedSequenceAnnotation___setitem__(self, uri, py_obj)
__swig_destroy__ = _libsbol.delete_OwnedSequenceAnnotation
__del__ = lambda self: None
OwnedSequenceAnnotation_swigregister = _libsbol.OwnedSequenceAnnotation_swigregister
OwnedSequenceAnnotation_swigregister(OwnedSequenceAnnotation)
class ComponentVector(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, ComponentVector, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, ComponentVector, name)
__repr__ = _swig_repr
def iterator(self):
return _libsbol.ComponentVector_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self):
return _libsbol.ComponentVector___nonzero__(self)
def __bool__(self):
return _libsbol.ComponentVector___bool__(self)
def __len__(self):
return _libsbol.ComponentVector___len__(self)
def __getslice__(self, i, j):
return _libsbol.ComponentVector___getslice__(self, i, j)
def __setslice__(self, *args):
return _libsbol.ComponentVector___setslice__(self, *args)
def __delslice__(self, i, j):
return _libsbol.ComponentVector___delslice__(self, i, j)
def __delitem__(self, *args):
return _libsbol.ComponentVector___delitem__(self, *args)
def __getitem__(self, *args):
return _libsbol.ComponentVector___getitem__(self, *args)
def __setitem__(self, *args):
return _libsbol.ComponentVector___setitem__(self, *args)
def pop(self):
return _libsbol.ComponentVector_pop(self)
def append(self, x):
return _libsbol.ComponentVector_append(self, x)
def empty(self):
return _libsbol.ComponentVector_empty(self)
def size(self):
return _libsbol.ComponentVector_size(self)
def swap(self, v):
return _libsbol.ComponentVector_swap(self, v)
def begin(self):
return _libsbol.ComponentVector_begin(self)
def end(self):
return _libsbol.ComponentVector_end(self)
def rbegin(self):
return _libsbol.ComponentVector_rbegin(self)
def rend(self):
return _libsbol.ComponentVector_rend(self)
def clear(self):
return _libsbol.ComponentVector_clear(self)
def get_allocator(self):
return _libsbol.ComponentVector_get_allocator(self)
def pop_back(self):
return _libsbol.ComponentVector_pop_back(self)
def erase(self, *args):
return _libsbol.ComponentVector_erase(self, *args)
def __init__(self, *args):
this = _libsbol.new_ComponentVector(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def push_back(self, x):
return _libsbol.ComponentVector_push_back(self, x)
def front(self):
return _libsbol.ComponentVector_front(self)
def back(self):
return _libsbol.ComponentVector_back(self)
def assign(self, n, x):
return _libsbol.ComponentVector_assign(self, n, x)
def resize(self, *args):
return _libsbol.ComponentVector_resize(self, *args)
def insert(self, *args):
return _libsbol.ComponentVector_insert(self, *args)
def reserve(self, n):
return _libsbol.ComponentVector_reserve(self, n)
def capacity(self):
return _libsbol.ComponentVector_capacity(self)
__swig_destroy__ = _libsbol.delete_ComponentVector
__del__ = lambda self: None
ComponentVector_swigregister = _libsbol.ComponentVector_swigregister
ComponentVector_swigregister(ComponentVector)
[docs]class ComponentProperty(_object):
"""
Member properties of all SBOL objects are defined using a Property object.
The Property class provides a generic interface for accessing SBOL objects. At a
low level, the Property class converts SBOL data structures into RDF triples.
templateparam
-------------
* `The` :
SBOL specification currently supports string, URI, and integer literal
values.
"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, ComponentProperty, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, ComponentProperty, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Parameters
----------
* `type_uri` :
An RDF hash URI for this property, consisting of a namespace followed by an
identifier. For example, Properties of SBOLObjects use URIs of the form
http://sbols.org/v2#somePropertyName, where the identifier somePropertyName
determines the appearance of XML nodes in an SBOL file. Alternatively,
annotations in a custom namespace can be provided using a similarly formed
hash URI in another namespace.
* `property_owner` :
All Property objects must have a pointer back to its parent SBOLObject of
which it is a member
* `initial_value` :
The initial value of the Property
* `validation_rules` :
A vector of externally defined ValidationRules. The vector contains pointers
to functions which correspond to the validation rules listed in the appendix
of the formal SBOL specification document. ValidationRules are automatically
checked every time a setter or adder method is called and when Documents are
read and written.
"""
this = _libsbol.new_ComponentProperty(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete_ComponentProperty
__del__ = lambda self: None
[docs] def getTypeURI(self):
"""
Returns
-------
The uniform resource identifier that describes the RDF-type of this SBOL Object
"""
return _libsbol.ComponentProperty_getTypeURI(self)
[docs] def getOwner(self):
"""
"""
return _libsbol.ComponentProperty_getOwner(self)
[docs] def set(self, *args):
"""
Basic setter for SBOL Property.
Parameters
----------
* `new_value` :
A new integer value for the property, which is converted to a raw string
during serialization.
"""
val = _libsbol.ComponentProperty_set(self, *args)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, new_value):
"""
Appends the new value to a list of values, for properties that allow it.
Parameters
----------
* `new_value` :
A new string which will be added to a list of values.
"""
val = _libsbol.ComponentProperty_add(self, new_value)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def remove(self, index=0):
"""
Remove a Property from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.ComponentProperty_remove(self, index)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.ComponentProperty_clear(self)
[docs] def write(self):
"""
"""
return _libsbol.ComponentProperty_write(self)
def find(self, query):
return _libsbol.ComponentProperty_find(self, query)
def getLowerBound(self):
return _libsbol.ComponentProperty_getLowerBound(self)
def getUpperBound(self):
return _libsbol.ComponentProperty_getUpperBound(self)
[docs] def validate(self, arg=None):
"""
"""
return _libsbol.ComponentProperty_validate(self, arg)
def copy(self, target_property):
return _libsbol.ComponentProperty_copy(self, target_property)
__swig_setmethods__["python_iter"] = _libsbol.ComponentProperty_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.ComponentProperty_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.ComponentProperty_python_iter_get, _libsbol.ComponentProperty_python_iter_set)
def addValidationRule(self, *args):
return _libsbol.ComponentProperty_addValidationRule(self, *args)
ComponentProperty_swigregister = _libsbol.ComponentProperty_swigregister
ComponentProperty_swigregister(ComponentProperty)
[docs]class OwnedComponent(ComponentProperty):
"""
A container property that contains child objects.
Creates a composition out of two or more classes. In the SBOL specification,
compositional relationships are indicated in class diagrams by arrows with black
diamonds. A compositional relationship means that deleting the parent object
will delete the child objects, and adding the parent object to a Document will
also add the child object. Owned objects are stored in arbitrary order.
templateparam
-------------
* `SBOLClass` :
The type of child SBOL object contained by this Property
"""
__swig_setmethods__ = {}
for _s in [ComponentProperty]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, OwnedComponent, name, value)
__swig_getmethods__ = {}
for _s in [ComponentProperty]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, OwnedComponent, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
"""
this = _libsbol.new_OwnedComponent(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
[docs] def set(self, sbol_obj):
"""
Basic setter for OwnedObject SBOL IntProperty.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Assigns a child object to
this OwnedObject container property. This method always overwrites the first
SBOLObject in the container. appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
* `sbol_obj` :
The child object Sets the first object in the container
"""
val = _libsbol.OwnedComponent_set(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, sbol_obj):
"""
Appends the new value to a list of values, for properties that allow it.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Adds a child object to the
parent object. This method always appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
"""
val = _libsbol.OwnedComponent_add(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def get(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedComponent_get(self, *args)
[docs] def getAll(self):
"""
Retrieve a vector of objects from the OwnedObject.
"""
val = _libsbol.OwnedComponent_getAll(self)
val = list(val)
return val
[docs] def remove(self, *args):
"""
Remove an object from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.OwnedComponent_remove(self, *args)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.OwnedComponent_clear(self)
[docs] def create(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedComponent_create(self, uri)
val.thisown = False
return val
def define(self, definition_object):
return _libsbol.OwnedComponent_define(self, definition_object)
def find(self, uri):
return _libsbol.OwnedComponent_find(self, uri)
__swig_setmethods__["python_iter"] = _libsbol.OwnedComponent_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.OwnedComponent_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.OwnedComponent_python_iter_get, _libsbol.OwnedComponent_python_iter_set)
def __iter__(self):
return _libsbol.OwnedComponent___iter__(self)
def next(self):
return _libsbol.OwnedComponent_next(self)
def __next__(self):
return _libsbol.OwnedComponent___next__(self)
def __len__(self):
return _libsbol.OwnedComponent___len__(self)
[docs] def createRange(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedComponent_createRange(self, uri)
val.thisown = False
return val
[docs] def getRange(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedComponent_getRange(self, *args)
[docs] def createCut(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedComponent_createCut(self, uri)
val.thisown = False
return val
[docs] def getCut(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedComponent_getCut(self, *args)
[docs] def createGenericLocation(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedComponent_createGenericLocation(self, uri)
val.thisown = False
return val
[docs] def getGenericLocation(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedComponent_getGenericLocation(self, *args)
def __getitem__(self, *args):
return _libsbol.OwnedComponent___getitem__(self, *args)
def __setitem__(self, uri, py_obj):
return _libsbol.OwnedComponent___setitem__(self, uri, py_obj)
__swig_destroy__ = _libsbol.delete_OwnedComponent
__del__ = lambda self: None
OwnedComponent_swigregister = _libsbol.OwnedComponent_swigregister
OwnedComponent_swigregister(OwnedComponent)
class ParticipationVector(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, ParticipationVector, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, ParticipationVector, name)
__repr__ = _swig_repr
def iterator(self):
return _libsbol.ParticipationVector_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self):
return _libsbol.ParticipationVector___nonzero__(self)
def __bool__(self):
return _libsbol.ParticipationVector___bool__(self)
def __len__(self):
return _libsbol.ParticipationVector___len__(self)
def __getslice__(self, i, j):
return _libsbol.ParticipationVector___getslice__(self, i, j)
def __setslice__(self, *args):
return _libsbol.ParticipationVector___setslice__(self, *args)
def __delslice__(self, i, j):
return _libsbol.ParticipationVector___delslice__(self, i, j)
def __delitem__(self, *args):
return _libsbol.ParticipationVector___delitem__(self, *args)
def __getitem__(self, *args):
return _libsbol.ParticipationVector___getitem__(self, *args)
def __setitem__(self, *args):
return _libsbol.ParticipationVector___setitem__(self, *args)
def pop(self):
return _libsbol.ParticipationVector_pop(self)
def append(self, x):
return _libsbol.ParticipationVector_append(self, x)
def empty(self):
return _libsbol.ParticipationVector_empty(self)
def size(self):
return _libsbol.ParticipationVector_size(self)
def swap(self, v):
return _libsbol.ParticipationVector_swap(self, v)
def begin(self):
return _libsbol.ParticipationVector_begin(self)
def end(self):
return _libsbol.ParticipationVector_end(self)
def rbegin(self):
return _libsbol.ParticipationVector_rbegin(self)
def rend(self):
return _libsbol.ParticipationVector_rend(self)
def clear(self):
return _libsbol.ParticipationVector_clear(self)
def get_allocator(self):
return _libsbol.ParticipationVector_get_allocator(self)
def pop_back(self):
return _libsbol.ParticipationVector_pop_back(self)
def erase(self, *args):
return _libsbol.ParticipationVector_erase(self, *args)
def __init__(self, *args):
this = _libsbol.new_ParticipationVector(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def push_back(self, x):
return _libsbol.ParticipationVector_push_back(self, x)
def front(self):
return _libsbol.ParticipationVector_front(self)
def back(self):
return _libsbol.ParticipationVector_back(self)
def assign(self, n, x):
return _libsbol.ParticipationVector_assign(self, n, x)
def resize(self, *args):
return _libsbol.ParticipationVector_resize(self, *args)
def insert(self, *args):
return _libsbol.ParticipationVector_insert(self, *args)
def reserve(self, n):
return _libsbol.ParticipationVector_reserve(self, n)
def capacity(self):
return _libsbol.ParticipationVector_capacity(self)
__swig_destroy__ = _libsbol.delete_ParticipationVector
__del__ = lambda self: None
ParticipationVector_swigregister = _libsbol.ParticipationVector_swigregister
ParticipationVector_swigregister(ParticipationVector)
[docs]class ParticipationProperty(_object):
"""
Member properties of all SBOL objects are defined using a Property object.
The Property class provides a generic interface for accessing SBOL objects. At a
low level, the Property class converts SBOL data structures into RDF triples.
templateparam
-------------
* `The` :
SBOL specification currently supports string, URI, and integer literal
values.
"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, ParticipationProperty, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, ParticipationProperty, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Parameters
----------
* `type_uri` :
An RDF hash URI for this property, consisting of a namespace followed by an
identifier. For example, Properties of SBOLObjects use URIs of the form
http://sbols.org/v2#somePropertyName, where the identifier somePropertyName
determines the appearance of XML nodes in an SBOL file. Alternatively,
annotations in a custom namespace can be provided using a similarly formed
hash URI in another namespace.
* `property_owner` :
All Property objects must have a pointer back to its parent SBOLObject of
which it is a member
* `initial_value` :
The initial value of the Property
* `validation_rules` :
A vector of externally defined ValidationRules. The vector contains pointers
to functions which correspond to the validation rules listed in the appendix
of the formal SBOL specification document. ValidationRules are automatically
checked every time a setter or adder method is called and when Documents are
read and written.
"""
this = _libsbol.new_ParticipationProperty(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete_ParticipationProperty
__del__ = lambda self: None
[docs] def getTypeURI(self):
"""
Returns
-------
The uniform resource identifier that describes the RDF-type of this SBOL Object
"""
return _libsbol.ParticipationProperty_getTypeURI(self)
[docs] def getOwner(self):
"""
"""
return _libsbol.ParticipationProperty_getOwner(self)
[docs] def set(self, *args):
"""
Basic setter for SBOL Property.
Parameters
----------
* `new_value` :
A new integer value for the property, which is converted to a raw string
during serialization.
"""
val = _libsbol.ParticipationProperty_set(self, *args)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, new_value):
"""
Appends the new value to a list of values, for properties that allow it.
Parameters
----------
* `new_value` :
A new string which will be added to a list of values.
"""
val = _libsbol.ParticipationProperty_add(self, new_value)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def remove(self, index=0):
"""
Remove a Property from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.ParticipationProperty_remove(self, index)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.ParticipationProperty_clear(self)
[docs] def write(self):
"""
"""
return _libsbol.ParticipationProperty_write(self)
def find(self, query):
return _libsbol.ParticipationProperty_find(self, query)
def getLowerBound(self):
return _libsbol.ParticipationProperty_getLowerBound(self)
def getUpperBound(self):
return _libsbol.ParticipationProperty_getUpperBound(self)
[docs] def validate(self, arg=None):
"""
"""
return _libsbol.ParticipationProperty_validate(self, arg)
def copy(self, target_property):
return _libsbol.ParticipationProperty_copy(self, target_property)
__swig_setmethods__["python_iter"] = _libsbol.ParticipationProperty_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.ParticipationProperty_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.ParticipationProperty_python_iter_get, _libsbol.ParticipationProperty_python_iter_set)
def addValidationRule(self, *args):
return _libsbol.ParticipationProperty_addValidationRule(self, *args)
ParticipationProperty_swigregister = _libsbol.ParticipationProperty_swigregister
ParticipationProperty_swigregister(ParticipationProperty)
[docs]class OwnedParticipation(ParticipationProperty):
"""
A container property that contains child objects.
Creates a composition out of two or more classes. In the SBOL specification,
compositional relationships are indicated in class diagrams by arrows with black
diamonds. A compositional relationship means that deleting the parent object
will delete the child objects, and adding the parent object to a Document will
also add the child object. Owned objects are stored in arbitrary order.
templateparam
-------------
* `SBOLClass` :
The type of child SBOL object contained by this Property
"""
__swig_setmethods__ = {}
for _s in [ParticipationProperty]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, OwnedParticipation, name, value)
__swig_getmethods__ = {}
for _s in [ParticipationProperty]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, OwnedParticipation, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
"""
this = _libsbol.new_OwnedParticipation(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
[docs] def set(self, sbol_obj):
"""
Basic setter for OwnedObject SBOL IntProperty.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Assigns a child object to
this OwnedObject container property. This method always overwrites the first
SBOLObject in the container. appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
* `sbol_obj` :
The child object Sets the first object in the container
"""
val = _libsbol.OwnedParticipation_set(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, sbol_obj):
"""
Appends the new value to a list of values, for properties that allow it.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Adds a child object to the
parent object. This method always appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
"""
val = _libsbol.OwnedParticipation_add(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def get(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedParticipation_get(self, *args)
[docs] def getAll(self):
"""
Retrieve a vector of objects from the OwnedObject.
"""
val = _libsbol.OwnedParticipation_getAll(self)
val = list(val)
return val
[docs] def remove(self, *args):
"""
Remove an object from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.OwnedParticipation_remove(self, *args)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.OwnedParticipation_clear(self)
[docs] def create(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedParticipation_create(self, uri)
val.thisown = False
return val
def define(self, definition_object):
return _libsbol.OwnedParticipation_define(self, definition_object)
def find(self, uri):
return _libsbol.OwnedParticipation_find(self, uri)
__swig_setmethods__["python_iter"] = _libsbol.OwnedParticipation_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.OwnedParticipation_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.OwnedParticipation_python_iter_get, _libsbol.OwnedParticipation_python_iter_set)
def __iter__(self):
return _libsbol.OwnedParticipation___iter__(self)
def next(self):
return _libsbol.OwnedParticipation_next(self)
def __next__(self):
return _libsbol.OwnedParticipation___next__(self)
def __len__(self):
return _libsbol.OwnedParticipation___len__(self)
[docs] def createRange(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedParticipation_createRange(self, uri)
val.thisown = False
return val
[docs] def getRange(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedParticipation_getRange(self, *args)
[docs] def createCut(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedParticipation_createCut(self, uri)
val.thisown = False
return val
[docs] def getCut(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedParticipation_getCut(self, *args)
[docs] def createGenericLocation(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedParticipation_createGenericLocation(self, uri)
val.thisown = False
return val
[docs] def getGenericLocation(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedParticipation_getGenericLocation(self, *args)
def __getitem__(self, *args):
return _libsbol.OwnedParticipation___getitem__(self, *args)
def __setitem__(self, uri, py_obj):
return _libsbol.OwnedParticipation___setitem__(self, uri, py_obj)
__swig_destroy__ = _libsbol.delete_OwnedParticipation
__del__ = lambda self: None
OwnedParticipation_swigregister = _libsbol.OwnedParticipation_swigregister
OwnedParticipation_swigregister(OwnedParticipation)
class ModuleVector(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, ModuleVector, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, ModuleVector, name)
__repr__ = _swig_repr
def iterator(self):
return _libsbol.ModuleVector_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self):
return _libsbol.ModuleVector___nonzero__(self)
def __bool__(self):
return _libsbol.ModuleVector___bool__(self)
def __len__(self):
return _libsbol.ModuleVector___len__(self)
def __getslice__(self, i, j):
return _libsbol.ModuleVector___getslice__(self, i, j)
def __setslice__(self, *args):
return _libsbol.ModuleVector___setslice__(self, *args)
def __delslice__(self, i, j):
return _libsbol.ModuleVector___delslice__(self, i, j)
def __delitem__(self, *args):
return _libsbol.ModuleVector___delitem__(self, *args)
def __getitem__(self, *args):
return _libsbol.ModuleVector___getitem__(self, *args)
def __setitem__(self, *args):
return _libsbol.ModuleVector___setitem__(self, *args)
def pop(self):
return _libsbol.ModuleVector_pop(self)
def append(self, x):
return _libsbol.ModuleVector_append(self, x)
def empty(self):
return _libsbol.ModuleVector_empty(self)
def size(self):
return _libsbol.ModuleVector_size(self)
def swap(self, v):
return _libsbol.ModuleVector_swap(self, v)
def begin(self):
return _libsbol.ModuleVector_begin(self)
def end(self):
return _libsbol.ModuleVector_end(self)
def rbegin(self):
return _libsbol.ModuleVector_rbegin(self)
def rend(self):
return _libsbol.ModuleVector_rend(self)
def clear(self):
return _libsbol.ModuleVector_clear(self)
def get_allocator(self):
return _libsbol.ModuleVector_get_allocator(self)
def pop_back(self):
return _libsbol.ModuleVector_pop_back(self)
def erase(self, *args):
return _libsbol.ModuleVector_erase(self, *args)
def __init__(self, *args):
this = _libsbol.new_ModuleVector(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def push_back(self, x):
return _libsbol.ModuleVector_push_back(self, x)
def front(self):
return _libsbol.ModuleVector_front(self)
def back(self):
return _libsbol.ModuleVector_back(self)
def assign(self, n, x):
return _libsbol.ModuleVector_assign(self, n, x)
def resize(self, *args):
return _libsbol.ModuleVector_resize(self, *args)
def insert(self, *args):
return _libsbol.ModuleVector_insert(self, *args)
def reserve(self, n):
return _libsbol.ModuleVector_reserve(self, n)
def capacity(self):
return _libsbol.ModuleVector_capacity(self)
__swig_destroy__ = _libsbol.delete_ModuleVector
__del__ = lambda self: None
ModuleVector_swigregister = _libsbol.ModuleVector_swigregister
ModuleVector_swigregister(ModuleVector)
[docs]class ModuleProperty(_object):
"""
Member properties of all SBOL objects are defined using a Property object.
The Property class provides a generic interface for accessing SBOL objects. At a
low level, the Property class converts SBOL data structures into RDF triples.
templateparam
-------------
* `The` :
SBOL specification currently supports string, URI, and integer literal
values.
"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, ModuleProperty, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, ModuleProperty, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Parameters
----------
* `type_uri` :
An RDF hash URI for this property, consisting of a namespace followed by an
identifier. For example, Properties of SBOLObjects use URIs of the form
http://sbols.org/v2#somePropertyName, where the identifier somePropertyName
determines the appearance of XML nodes in an SBOL file. Alternatively,
annotations in a custom namespace can be provided using a similarly formed
hash URI in another namespace.
* `property_owner` :
All Property objects must have a pointer back to its parent SBOLObject of
which it is a member
* `initial_value` :
The initial value of the Property
* `validation_rules` :
A vector of externally defined ValidationRules. The vector contains pointers
to functions which correspond to the validation rules listed in the appendix
of the formal SBOL specification document. ValidationRules are automatically
checked every time a setter or adder method is called and when Documents are
read and written.
"""
this = _libsbol.new_ModuleProperty(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete_ModuleProperty
__del__ = lambda self: None
[docs] def getTypeURI(self):
"""
Returns
-------
The uniform resource identifier that describes the RDF-type of this SBOL Object
"""
return _libsbol.ModuleProperty_getTypeURI(self)
[docs] def getOwner(self):
"""
"""
return _libsbol.ModuleProperty_getOwner(self)
[docs] def set(self, *args):
"""
Basic setter for SBOL Property.
Parameters
----------
* `new_value` :
A new integer value for the property, which is converted to a raw string
during serialization.
"""
val = _libsbol.ModuleProperty_set(self, *args)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, new_value):
"""
Appends the new value to a list of values, for properties that allow it.
Parameters
----------
* `new_value` :
A new string which will be added to a list of values.
"""
val = _libsbol.ModuleProperty_add(self, new_value)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def remove(self, index=0):
"""
Remove a Property from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.ModuleProperty_remove(self, index)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.ModuleProperty_clear(self)
[docs] def write(self):
"""
"""
return _libsbol.ModuleProperty_write(self)
def find(self, query):
return _libsbol.ModuleProperty_find(self, query)
def getLowerBound(self):
return _libsbol.ModuleProperty_getLowerBound(self)
def getUpperBound(self):
return _libsbol.ModuleProperty_getUpperBound(self)
[docs] def validate(self, arg=None):
"""
"""
return _libsbol.ModuleProperty_validate(self, arg)
def copy(self, target_property):
return _libsbol.ModuleProperty_copy(self, target_property)
__swig_setmethods__["python_iter"] = _libsbol.ModuleProperty_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.ModuleProperty_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.ModuleProperty_python_iter_get, _libsbol.ModuleProperty_python_iter_set)
def addValidationRule(self, *args):
return _libsbol.ModuleProperty_addValidationRule(self, *args)
ModuleProperty_swigregister = _libsbol.ModuleProperty_swigregister
ModuleProperty_swigregister(ModuleProperty)
[docs]class OwnedModule(ModuleProperty):
"""
A container property that contains child objects.
Creates a composition out of two or more classes. In the SBOL specification,
compositional relationships are indicated in class diagrams by arrows with black
diamonds. A compositional relationship means that deleting the parent object
will delete the child objects, and adding the parent object to a Document will
also add the child object. Owned objects are stored in arbitrary order.
templateparam
-------------
* `SBOLClass` :
The type of child SBOL object contained by this Property
"""
__swig_setmethods__ = {}
for _s in [ModuleProperty]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, OwnedModule, name, value)
__swig_getmethods__ = {}
for _s in [ModuleProperty]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, OwnedModule, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
"""
this = _libsbol.new_OwnedModule(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
[docs] def set(self, sbol_obj):
"""
Basic setter for OwnedObject SBOL IntProperty.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Assigns a child object to
this OwnedObject container property. This method always overwrites the first
SBOLObject in the container. appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
* `sbol_obj` :
The child object Sets the first object in the container
"""
val = _libsbol.OwnedModule_set(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, sbol_obj):
"""
Appends the new value to a list of values, for properties that allow it.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Adds a child object to the
parent object. This method always appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
"""
val = _libsbol.OwnedModule_add(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def get(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedModule_get(self, *args)
[docs] def getAll(self):
"""
Retrieve a vector of objects from the OwnedObject.
"""
val = _libsbol.OwnedModule_getAll(self)
val = list(val)
return val
[docs] def remove(self, *args):
"""
Remove an object from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.OwnedModule_remove(self, *args)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.OwnedModule_clear(self)
[docs] def create(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedModule_create(self, uri)
val.thisown = False
return val
def define(self, definition_object):
return _libsbol.OwnedModule_define(self, definition_object)
def find(self, uri):
return _libsbol.OwnedModule_find(self, uri)
__swig_setmethods__["python_iter"] = _libsbol.OwnedModule_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.OwnedModule_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.OwnedModule_python_iter_get, _libsbol.OwnedModule_python_iter_set)
def __iter__(self):
return _libsbol.OwnedModule___iter__(self)
def next(self):
return _libsbol.OwnedModule_next(self)
def __next__(self):
return _libsbol.OwnedModule___next__(self)
def __len__(self):
return _libsbol.OwnedModule___len__(self)
[docs] def createRange(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedModule_createRange(self, uri)
val.thisown = False
return val
[docs] def getRange(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedModule_getRange(self, *args)
[docs] def createCut(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedModule_createCut(self, uri)
val.thisown = False
return val
[docs] def getCut(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedModule_getCut(self, *args)
[docs] def createGenericLocation(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedModule_createGenericLocation(self, uri)
val.thisown = False
return val
[docs] def getGenericLocation(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedModule_getGenericLocation(self, *args)
def __getitem__(self, *args):
return _libsbol.OwnedModule___getitem__(self, *args)
def __setitem__(self, uri, py_obj):
return _libsbol.OwnedModule___setitem__(self, uri, py_obj)
__swig_destroy__ = _libsbol.delete_OwnedModule
__del__ = lambda self: None
OwnedModule_swigregister = _libsbol.OwnedModule_swigregister
OwnedModule_swigregister(OwnedModule)
class InteractionVector(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, InteractionVector, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, InteractionVector, name)
__repr__ = _swig_repr
def iterator(self):
return _libsbol.InteractionVector_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self):
return _libsbol.InteractionVector___nonzero__(self)
def __bool__(self):
return _libsbol.InteractionVector___bool__(self)
def __len__(self):
return _libsbol.InteractionVector___len__(self)
def __getslice__(self, i, j):
return _libsbol.InteractionVector___getslice__(self, i, j)
def __setslice__(self, *args):
return _libsbol.InteractionVector___setslice__(self, *args)
def __delslice__(self, i, j):
return _libsbol.InteractionVector___delslice__(self, i, j)
def __delitem__(self, *args):
return _libsbol.InteractionVector___delitem__(self, *args)
def __getitem__(self, *args):
return _libsbol.InteractionVector___getitem__(self, *args)
def __setitem__(self, *args):
return _libsbol.InteractionVector___setitem__(self, *args)
def pop(self):
return _libsbol.InteractionVector_pop(self)
def append(self, x):
return _libsbol.InteractionVector_append(self, x)
def empty(self):
return _libsbol.InteractionVector_empty(self)
def size(self):
return _libsbol.InteractionVector_size(self)
def swap(self, v):
return _libsbol.InteractionVector_swap(self, v)
def begin(self):
return _libsbol.InteractionVector_begin(self)
def end(self):
return _libsbol.InteractionVector_end(self)
def rbegin(self):
return _libsbol.InteractionVector_rbegin(self)
def rend(self):
return _libsbol.InteractionVector_rend(self)
def clear(self):
return _libsbol.InteractionVector_clear(self)
def get_allocator(self):
return _libsbol.InteractionVector_get_allocator(self)
def pop_back(self):
return _libsbol.InteractionVector_pop_back(self)
def erase(self, *args):
return _libsbol.InteractionVector_erase(self, *args)
def __init__(self, *args):
this = _libsbol.new_InteractionVector(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def push_back(self, x):
return _libsbol.InteractionVector_push_back(self, x)
def front(self):
return _libsbol.InteractionVector_front(self)
def back(self):
return _libsbol.InteractionVector_back(self)
def assign(self, n, x):
return _libsbol.InteractionVector_assign(self, n, x)
def resize(self, *args):
return _libsbol.InteractionVector_resize(self, *args)
def insert(self, *args):
return _libsbol.InteractionVector_insert(self, *args)
def reserve(self, n):
return _libsbol.InteractionVector_reserve(self, n)
def capacity(self):
return _libsbol.InteractionVector_capacity(self)
__swig_destroy__ = _libsbol.delete_InteractionVector
__del__ = lambda self: None
InteractionVector_swigregister = _libsbol.InteractionVector_swigregister
InteractionVector_swigregister(InteractionVector)
[docs]class InteractionProperty(_object):
"""
Member properties of all SBOL objects are defined using a Property object.
The Property class provides a generic interface for accessing SBOL objects. At a
low level, the Property class converts SBOL data structures into RDF triples.
templateparam
-------------
* `The` :
SBOL specification currently supports string, URI, and integer literal
values.
"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, InteractionProperty, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, InteractionProperty, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Parameters
----------
* `type_uri` :
An RDF hash URI for this property, consisting of a namespace followed by an
identifier. For example, Properties of SBOLObjects use URIs of the form
http://sbols.org/v2#somePropertyName, where the identifier somePropertyName
determines the appearance of XML nodes in an SBOL file. Alternatively,
annotations in a custom namespace can be provided using a similarly formed
hash URI in another namespace.
* `property_owner` :
All Property objects must have a pointer back to its parent SBOLObject of
which it is a member
* `initial_value` :
The initial value of the Property
* `validation_rules` :
A vector of externally defined ValidationRules. The vector contains pointers
to functions which correspond to the validation rules listed in the appendix
of the formal SBOL specification document. ValidationRules are automatically
checked every time a setter or adder method is called and when Documents are
read and written.
"""
this = _libsbol.new_InteractionProperty(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete_InteractionProperty
__del__ = lambda self: None
[docs] def getTypeURI(self):
"""
Returns
-------
The uniform resource identifier that describes the RDF-type of this SBOL Object
"""
return _libsbol.InteractionProperty_getTypeURI(self)
[docs] def getOwner(self):
"""
"""
return _libsbol.InteractionProperty_getOwner(self)
[docs] def set(self, *args):
"""
Basic setter for SBOL Property.
Parameters
----------
* `new_value` :
A new integer value for the property, which is converted to a raw string
during serialization.
"""
val = _libsbol.InteractionProperty_set(self, *args)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, new_value):
"""
Appends the new value to a list of values, for properties that allow it.
Parameters
----------
* `new_value` :
A new string which will be added to a list of values.
"""
val = _libsbol.InteractionProperty_add(self, new_value)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def remove(self, index=0):
"""
Remove a Property from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.InteractionProperty_remove(self, index)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.InteractionProperty_clear(self)
[docs] def write(self):
"""
"""
return _libsbol.InteractionProperty_write(self)
def find(self, query):
return _libsbol.InteractionProperty_find(self, query)
def getLowerBound(self):
return _libsbol.InteractionProperty_getLowerBound(self)
def getUpperBound(self):
return _libsbol.InteractionProperty_getUpperBound(self)
[docs] def validate(self, arg=None):
"""
"""
return _libsbol.InteractionProperty_validate(self, arg)
def copy(self, target_property):
return _libsbol.InteractionProperty_copy(self, target_property)
__swig_setmethods__["python_iter"] = _libsbol.InteractionProperty_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.InteractionProperty_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.InteractionProperty_python_iter_get, _libsbol.InteractionProperty_python_iter_set)
def addValidationRule(self, *args):
return _libsbol.InteractionProperty_addValidationRule(self, *args)
InteractionProperty_swigregister = _libsbol.InteractionProperty_swigregister
InteractionProperty_swigregister(InteractionProperty)
[docs]class OwnedInteraction(InteractionProperty):
"""
A container property that contains child objects.
Creates a composition out of two or more classes. In the SBOL specification,
compositional relationships are indicated in class diagrams by arrows with black
diamonds. A compositional relationship means that deleting the parent object
will delete the child objects, and adding the parent object to a Document will
also add the child object. Owned objects are stored in arbitrary order.
templateparam
-------------
* `SBOLClass` :
The type of child SBOL object contained by this Property
"""
__swig_setmethods__ = {}
for _s in [InteractionProperty]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, OwnedInteraction, name, value)
__swig_getmethods__ = {}
for _s in [InteractionProperty]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, OwnedInteraction, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
"""
this = _libsbol.new_OwnedInteraction(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
[docs] def set(self, sbol_obj):
"""
Basic setter for OwnedObject SBOL IntProperty.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Assigns a child object to
this OwnedObject container property. This method always overwrites the first
SBOLObject in the container. appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
* `sbol_obj` :
The child object Sets the first object in the container
"""
val = _libsbol.OwnedInteraction_set(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, sbol_obj):
"""
Appends the new value to a list of values, for properties that allow it.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Adds a child object to the
parent object. This method always appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
"""
val = _libsbol.OwnedInteraction_add(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def get(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedInteraction_get(self, *args)
[docs] def getAll(self):
"""
Retrieve a vector of objects from the OwnedObject.
"""
val = _libsbol.OwnedInteraction_getAll(self)
val = list(val)
return val
[docs] def remove(self, *args):
"""
Remove an object from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.OwnedInteraction_remove(self, *args)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.OwnedInteraction_clear(self)
[docs] def create(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedInteraction_create(self, uri)
val.thisown = False
return val
def define(self, definition_object):
return _libsbol.OwnedInteraction_define(self, definition_object)
def find(self, uri):
return _libsbol.OwnedInteraction_find(self, uri)
__swig_setmethods__["python_iter"] = _libsbol.OwnedInteraction_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.OwnedInteraction_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.OwnedInteraction_python_iter_get, _libsbol.OwnedInteraction_python_iter_set)
def __iter__(self):
return _libsbol.OwnedInteraction___iter__(self)
def next(self):
return _libsbol.OwnedInteraction_next(self)
def __next__(self):
return _libsbol.OwnedInteraction___next__(self)
def __len__(self):
return _libsbol.OwnedInteraction___len__(self)
[docs] def createRange(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedInteraction_createRange(self, uri)
val.thisown = False
return val
[docs] def getRange(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedInteraction_getRange(self, *args)
[docs] def createCut(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedInteraction_createCut(self, uri)
val.thisown = False
return val
[docs] def getCut(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedInteraction_getCut(self, *args)
[docs] def createGenericLocation(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedInteraction_createGenericLocation(self, uri)
val.thisown = False
return val
[docs] def getGenericLocation(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedInteraction_getGenericLocation(self, *args)
def __setitem__(self, uri, py_obj):
return _libsbol.OwnedInteraction___setitem__(self, uri, py_obj)
def __getitem__(self, *args):
return _libsbol.OwnedInteraction___getitem__(self, *args)
__swig_destroy__ = _libsbol.delete_OwnedInteraction
__del__ = lambda self: None
OwnedInteraction_swigregister = _libsbol.OwnedInteraction_swigregister
OwnedInteraction_swigregister(OwnedInteraction)
class FunctionalComponentVector(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, FunctionalComponentVector, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, FunctionalComponentVector, name)
__repr__ = _swig_repr
def iterator(self):
return _libsbol.FunctionalComponentVector_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self):
return _libsbol.FunctionalComponentVector___nonzero__(self)
def __bool__(self):
return _libsbol.FunctionalComponentVector___bool__(self)
def __len__(self):
return _libsbol.FunctionalComponentVector___len__(self)
def __getslice__(self, i, j):
return _libsbol.FunctionalComponentVector___getslice__(self, i, j)
def __setslice__(self, *args):
return _libsbol.FunctionalComponentVector___setslice__(self, *args)
def __delslice__(self, i, j):
return _libsbol.FunctionalComponentVector___delslice__(self, i, j)
def __delitem__(self, *args):
return _libsbol.FunctionalComponentVector___delitem__(self, *args)
def __getitem__(self, *args):
return _libsbol.FunctionalComponentVector___getitem__(self, *args)
def __setitem__(self, *args):
return _libsbol.FunctionalComponentVector___setitem__(self, *args)
def pop(self):
return _libsbol.FunctionalComponentVector_pop(self)
def append(self, x):
return _libsbol.FunctionalComponentVector_append(self, x)
def empty(self):
return _libsbol.FunctionalComponentVector_empty(self)
def size(self):
return _libsbol.FunctionalComponentVector_size(self)
def swap(self, v):
return _libsbol.FunctionalComponentVector_swap(self, v)
def begin(self):
return _libsbol.FunctionalComponentVector_begin(self)
def end(self):
return _libsbol.FunctionalComponentVector_end(self)
def rbegin(self):
return _libsbol.FunctionalComponentVector_rbegin(self)
def rend(self):
return _libsbol.FunctionalComponentVector_rend(self)
def clear(self):
return _libsbol.FunctionalComponentVector_clear(self)
def get_allocator(self):
return _libsbol.FunctionalComponentVector_get_allocator(self)
def pop_back(self):
return _libsbol.FunctionalComponentVector_pop_back(self)
def erase(self, *args):
return _libsbol.FunctionalComponentVector_erase(self, *args)
def __init__(self, *args):
this = _libsbol.new_FunctionalComponentVector(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def push_back(self, x):
return _libsbol.FunctionalComponentVector_push_back(self, x)
def front(self):
return _libsbol.FunctionalComponentVector_front(self)
def back(self):
return _libsbol.FunctionalComponentVector_back(self)
def assign(self, n, x):
return _libsbol.FunctionalComponentVector_assign(self, n, x)
def resize(self, *args):
return _libsbol.FunctionalComponentVector_resize(self, *args)
def insert(self, *args):
return _libsbol.FunctionalComponentVector_insert(self, *args)
def reserve(self, n):
return _libsbol.FunctionalComponentVector_reserve(self, n)
def capacity(self):
return _libsbol.FunctionalComponentVector_capacity(self)
__swig_destroy__ = _libsbol.delete_FunctionalComponentVector
__del__ = lambda self: None
FunctionalComponentVector_swigregister = _libsbol.FunctionalComponentVector_swigregister
FunctionalComponentVector_swigregister(FunctionalComponentVector)
[docs]class FunctionalComponentProperty(_object):
"""
Member properties of all SBOL objects are defined using a Property object.
The Property class provides a generic interface for accessing SBOL objects. At a
low level, the Property class converts SBOL data structures into RDF triples.
templateparam
-------------
* `The` :
SBOL specification currently supports string, URI, and integer literal
values.
"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, FunctionalComponentProperty, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, FunctionalComponentProperty, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Parameters
----------
* `type_uri` :
An RDF hash URI for this property, consisting of a namespace followed by an
identifier. For example, Properties of SBOLObjects use URIs of the form
http://sbols.org/v2#somePropertyName, where the identifier somePropertyName
determines the appearance of XML nodes in an SBOL file. Alternatively,
annotations in a custom namespace can be provided using a similarly formed
hash URI in another namespace.
* `property_owner` :
All Property objects must have a pointer back to its parent SBOLObject of
which it is a member
* `initial_value` :
The initial value of the Property
* `validation_rules` :
A vector of externally defined ValidationRules. The vector contains pointers
to functions which correspond to the validation rules listed in the appendix
of the formal SBOL specification document. ValidationRules are automatically
checked every time a setter or adder method is called and when Documents are
read and written.
"""
this = _libsbol.new_FunctionalComponentProperty(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete_FunctionalComponentProperty
__del__ = lambda self: None
[docs] def getTypeURI(self):
"""
Returns
-------
The uniform resource identifier that describes the RDF-type of this SBOL Object
"""
return _libsbol.FunctionalComponentProperty_getTypeURI(self)
[docs] def getOwner(self):
"""
"""
return _libsbol.FunctionalComponentProperty_getOwner(self)
[docs] def set(self, *args):
"""
Basic setter for SBOL Property.
Parameters
----------
* `new_value` :
A new integer value for the property, which is converted to a raw string
during serialization.
"""
val = _libsbol.FunctionalComponentProperty_set(self, *args)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, new_value):
"""
Appends the new value to a list of values, for properties that allow it.
Parameters
----------
* `new_value` :
A new string which will be added to a list of values.
"""
val = _libsbol.FunctionalComponentProperty_add(self, new_value)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def remove(self, index=0):
"""
Remove a Property from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.FunctionalComponentProperty_remove(self, index)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.FunctionalComponentProperty_clear(self)
[docs] def write(self):
"""
"""
return _libsbol.FunctionalComponentProperty_write(self)
def find(self, query):
return _libsbol.FunctionalComponentProperty_find(self, query)
def getLowerBound(self):
return _libsbol.FunctionalComponentProperty_getLowerBound(self)
def getUpperBound(self):
return _libsbol.FunctionalComponentProperty_getUpperBound(self)
[docs] def validate(self, arg=None):
"""
"""
return _libsbol.FunctionalComponentProperty_validate(self, arg)
def copy(self, target_property):
return _libsbol.FunctionalComponentProperty_copy(self, target_property)
__swig_setmethods__["python_iter"] = _libsbol.FunctionalComponentProperty_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.FunctionalComponentProperty_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.FunctionalComponentProperty_python_iter_get, _libsbol.FunctionalComponentProperty_python_iter_set)
def addValidationRule(self, *args):
return _libsbol.FunctionalComponentProperty_addValidationRule(self, *args)
FunctionalComponentProperty_swigregister = _libsbol.FunctionalComponentProperty_swigregister
FunctionalComponentProperty_swigregister(FunctionalComponentProperty)
[docs]class OwnedFunctionalComponent(FunctionalComponentProperty):
"""
A container property that contains child objects.
Creates a composition out of two or more classes. In the SBOL specification,
compositional relationships are indicated in class diagrams by arrows with black
diamonds. A compositional relationship means that deleting the parent object
will delete the child objects, and adding the parent object to a Document will
also add the child object. Owned objects are stored in arbitrary order.
templateparam
-------------
* `SBOLClass` :
The type of child SBOL object contained by this Property
"""
__swig_setmethods__ = {}
for _s in [FunctionalComponentProperty]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, OwnedFunctionalComponent, name, value)
__swig_getmethods__ = {}
for _s in [FunctionalComponentProperty]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, OwnedFunctionalComponent, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
"""
this = _libsbol.new_OwnedFunctionalComponent(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
[docs] def set(self, sbol_obj):
"""
Basic setter for OwnedObject SBOL IntProperty.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Assigns a child object to
this OwnedObject container property. This method always overwrites the first
SBOLObject in the container. appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
* `sbol_obj` :
The child object Sets the first object in the container
"""
val = _libsbol.OwnedFunctionalComponent_set(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, sbol_obj):
"""
Appends the new value to a list of values, for properties that allow it.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Adds a child object to the
parent object. This method always appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
"""
val = _libsbol.OwnedFunctionalComponent_add(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def get(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedFunctionalComponent_get(self, *args)
[docs] def getAll(self):
"""
Retrieve a vector of objects from the OwnedObject.
"""
val = _libsbol.OwnedFunctionalComponent_getAll(self)
val = list(val)
return val
[docs] def remove(self, *args):
"""
Remove an object from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.OwnedFunctionalComponent_remove(self, *args)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.OwnedFunctionalComponent_clear(self)
[docs] def create(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedFunctionalComponent_create(self, uri)
val.thisown = False
return val
def define(self, definition_object):
return _libsbol.OwnedFunctionalComponent_define(self, definition_object)
def find(self, uri):
return _libsbol.OwnedFunctionalComponent_find(self, uri)
__swig_setmethods__["python_iter"] = _libsbol.OwnedFunctionalComponent_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.OwnedFunctionalComponent_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.OwnedFunctionalComponent_python_iter_get, _libsbol.OwnedFunctionalComponent_python_iter_set)
def __iter__(self):
return _libsbol.OwnedFunctionalComponent___iter__(self)
def next(self):
return _libsbol.OwnedFunctionalComponent_next(self)
def __next__(self):
return _libsbol.OwnedFunctionalComponent___next__(self)
def __len__(self):
return _libsbol.OwnedFunctionalComponent___len__(self)
[docs] def createRange(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedFunctionalComponent_createRange(self, uri)
val.thisown = False
return val
[docs] def getRange(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedFunctionalComponent_getRange(self, *args)
[docs] def createCut(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedFunctionalComponent_createCut(self, uri)
val.thisown = False
return val
[docs] def getCut(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedFunctionalComponent_getCut(self, *args)
[docs] def createGenericLocation(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedFunctionalComponent_createGenericLocation(self, uri)
val.thisown = False
return val
[docs] def getGenericLocation(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedFunctionalComponent_getGenericLocation(self, *args)
def __getitem__(self, *args):
return _libsbol.OwnedFunctionalComponent___getitem__(self, *args)
def __setitem__(self, uri, py_obj):
return _libsbol.OwnedFunctionalComponent___setitem__(self, uri, py_obj)
__swig_destroy__ = _libsbol.delete_OwnedFunctionalComponent
__del__ = lambda self: None
OwnedFunctionalComponent_swigregister = _libsbol.OwnedFunctionalComponent_swigregister
OwnedFunctionalComponent_swigregister(OwnedFunctionalComponent)
class AssociationVector(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, AssociationVector, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, AssociationVector, name)
__repr__ = _swig_repr
def iterator(self):
return _libsbol.AssociationVector_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self):
return _libsbol.AssociationVector___nonzero__(self)
def __bool__(self):
return _libsbol.AssociationVector___bool__(self)
def __len__(self):
return _libsbol.AssociationVector___len__(self)
def __getslice__(self, i, j):
return _libsbol.AssociationVector___getslice__(self, i, j)
def __setslice__(self, *args):
return _libsbol.AssociationVector___setslice__(self, *args)
def __delslice__(self, i, j):
return _libsbol.AssociationVector___delslice__(self, i, j)
def __delitem__(self, *args):
return _libsbol.AssociationVector___delitem__(self, *args)
def __getitem__(self, *args):
return _libsbol.AssociationVector___getitem__(self, *args)
def __setitem__(self, *args):
return _libsbol.AssociationVector___setitem__(self, *args)
def pop(self):
return _libsbol.AssociationVector_pop(self)
def append(self, x):
return _libsbol.AssociationVector_append(self, x)
def empty(self):
return _libsbol.AssociationVector_empty(self)
def size(self):
return _libsbol.AssociationVector_size(self)
def swap(self, v):
return _libsbol.AssociationVector_swap(self, v)
def begin(self):
return _libsbol.AssociationVector_begin(self)
def end(self):
return _libsbol.AssociationVector_end(self)
def rbegin(self):
return _libsbol.AssociationVector_rbegin(self)
def rend(self):
return _libsbol.AssociationVector_rend(self)
def clear(self):
return _libsbol.AssociationVector_clear(self)
def get_allocator(self):
return _libsbol.AssociationVector_get_allocator(self)
def pop_back(self):
return _libsbol.AssociationVector_pop_back(self)
def erase(self, *args):
return _libsbol.AssociationVector_erase(self, *args)
def __init__(self, *args):
this = _libsbol.new_AssociationVector(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def push_back(self, x):
return _libsbol.AssociationVector_push_back(self, x)
def front(self):
return _libsbol.AssociationVector_front(self)
def back(self):
return _libsbol.AssociationVector_back(self)
def assign(self, n, x):
return _libsbol.AssociationVector_assign(self, n, x)
def resize(self, *args):
return _libsbol.AssociationVector_resize(self, *args)
def insert(self, *args):
return _libsbol.AssociationVector_insert(self, *args)
def reserve(self, n):
return _libsbol.AssociationVector_reserve(self, n)
def capacity(self):
return _libsbol.AssociationVector_capacity(self)
__swig_destroy__ = _libsbol.delete_AssociationVector
__del__ = lambda self: None
AssociationVector_swigregister = _libsbol.AssociationVector_swigregister
AssociationVector_swigregister(AssociationVector)
[docs]class AssociationProperty(_object):
"""
Member properties of all SBOL objects are defined using a Property object.
The Property class provides a generic interface for accessing SBOL objects. At a
low level, the Property class converts SBOL data structures into RDF triples.
templateparam
-------------
* `The` :
SBOL specification currently supports string, URI, and integer literal
values.
"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, AssociationProperty, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, AssociationProperty, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Parameters
----------
* `type_uri` :
An RDF hash URI for this property, consisting of a namespace followed by an
identifier. For example, Properties of SBOLObjects use URIs of the form
http://sbols.org/v2#somePropertyName, where the identifier somePropertyName
determines the appearance of XML nodes in an SBOL file. Alternatively,
annotations in a custom namespace can be provided using a similarly formed
hash URI in another namespace.
* `property_owner` :
All Property objects must have a pointer back to its parent SBOLObject of
which it is a member
* `initial_value` :
The initial value of the Property
* `validation_rules` :
A vector of externally defined ValidationRules. The vector contains pointers
to functions which correspond to the validation rules listed in the appendix
of the formal SBOL specification document. ValidationRules are automatically
checked every time a setter or adder method is called and when Documents are
read and written.
"""
this = _libsbol.new_AssociationProperty(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete_AssociationProperty
__del__ = lambda self: None
[docs] def getTypeURI(self):
"""
Returns
-------
The uniform resource identifier that describes the RDF-type of this SBOL Object
"""
return _libsbol.AssociationProperty_getTypeURI(self)
[docs] def getOwner(self):
"""
"""
return _libsbol.AssociationProperty_getOwner(self)
[docs] def set(self, *args):
"""
Basic setter for SBOL Property.
Parameters
----------
* `new_value` :
A new integer value for the property, which is converted to a raw string
during serialization.
"""
val = _libsbol.AssociationProperty_set(self, *args)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, new_value):
"""
Appends the new value to a list of values, for properties that allow it.
Parameters
----------
* `new_value` :
A new string which will be added to a list of values.
"""
val = _libsbol.AssociationProperty_add(self, new_value)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def remove(self, index=0):
"""
Remove a Property from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.AssociationProperty_remove(self, index)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.AssociationProperty_clear(self)
[docs] def write(self):
"""
"""
return _libsbol.AssociationProperty_write(self)
def find(self, query):
return _libsbol.AssociationProperty_find(self, query)
def getLowerBound(self):
return _libsbol.AssociationProperty_getLowerBound(self)
def getUpperBound(self):
return _libsbol.AssociationProperty_getUpperBound(self)
[docs] def validate(self, arg=None):
"""
"""
return _libsbol.AssociationProperty_validate(self, arg)
def copy(self, target_property):
return _libsbol.AssociationProperty_copy(self, target_property)
__swig_setmethods__["python_iter"] = _libsbol.AssociationProperty_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.AssociationProperty_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.AssociationProperty_python_iter_get, _libsbol.AssociationProperty_python_iter_set)
def addValidationRule(self, *args):
return _libsbol.AssociationProperty_addValidationRule(self, *args)
AssociationProperty_swigregister = _libsbol.AssociationProperty_swigregister
AssociationProperty_swigregister(AssociationProperty)
[docs]class OwnedAssociation(AssociationProperty):
"""
A container property that contains child objects.
Creates a composition out of two or more classes. In the SBOL specification,
compositional relationships are indicated in class diagrams by arrows with black
diamonds. A compositional relationship means that deleting the parent object
will delete the child objects, and adding the parent object to a Document will
also add the child object. Owned objects are stored in arbitrary order.
templateparam
-------------
* `SBOLClass` :
The type of child SBOL object contained by this Property
"""
__swig_setmethods__ = {}
for _s in [AssociationProperty]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, OwnedAssociation, name, value)
__swig_getmethods__ = {}
for _s in [AssociationProperty]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, OwnedAssociation, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
"""
this = _libsbol.new_OwnedAssociation(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
[docs] def set(self, sbol_obj):
"""
Basic setter for OwnedObject SBOL IntProperty.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Assigns a child object to
this OwnedObject container property. This method always overwrites the first
SBOLObject in the container. appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
* `sbol_obj` :
The child object Sets the first object in the container
"""
val = _libsbol.OwnedAssociation_set(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, sbol_obj):
"""
Appends the new value to a list of values, for properties that allow it.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Adds a child object to the
parent object. This method always appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
"""
val = _libsbol.OwnedAssociation_add(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def get(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedAssociation_get(self, *args)
[docs] def getAll(self):
"""
Retrieve a vector of objects from the OwnedObject.
"""
val = _libsbol.OwnedAssociation_getAll(self)
val = list(val)
return val
[docs] def remove(self, *args):
"""
Remove an object from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.OwnedAssociation_remove(self, *args)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.OwnedAssociation_clear(self)
[docs] def create(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedAssociation_create(self, uri)
val.thisown = False
return val
def define(self, definition_object):
return _libsbol.OwnedAssociation_define(self, definition_object)
def find(self, uri):
return _libsbol.OwnedAssociation_find(self, uri)
__swig_setmethods__["python_iter"] = _libsbol.OwnedAssociation_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.OwnedAssociation_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.OwnedAssociation_python_iter_get, _libsbol.OwnedAssociation_python_iter_set)
def __iter__(self):
return _libsbol.OwnedAssociation___iter__(self)
def next(self):
return _libsbol.OwnedAssociation_next(self)
def __next__(self):
return _libsbol.OwnedAssociation___next__(self)
def __len__(self):
return _libsbol.OwnedAssociation___len__(self)
[docs] def createRange(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedAssociation_createRange(self, uri)
val.thisown = False
return val
[docs] def getRange(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedAssociation_getRange(self, *args)
[docs] def createCut(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedAssociation_createCut(self, uri)
val.thisown = False
return val
[docs] def getCut(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedAssociation_getCut(self, *args)
[docs] def createGenericLocation(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedAssociation_createGenericLocation(self, uri)
val.thisown = False
return val
[docs] def getGenericLocation(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedAssociation_getGenericLocation(self, *args)
def __getitem__(self, *args):
return _libsbol.OwnedAssociation___getitem__(self, *args)
def __setitem__(self, uri, py_obj):
return _libsbol.OwnedAssociation___setitem__(self, uri, py_obj)
__swig_destroy__ = _libsbol.delete_OwnedAssociation
__del__ = lambda self: None
OwnedAssociation_swigregister = _libsbol.OwnedAssociation_swigregister
OwnedAssociation_swigregister(OwnedAssociation)
class UsageVector(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, UsageVector, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, UsageVector, name)
__repr__ = _swig_repr
def iterator(self):
return _libsbol.UsageVector_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self):
return _libsbol.UsageVector___nonzero__(self)
def __bool__(self):
return _libsbol.UsageVector___bool__(self)
def __len__(self):
return _libsbol.UsageVector___len__(self)
def __getslice__(self, i, j):
return _libsbol.UsageVector___getslice__(self, i, j)
def __setslice__(self, *args):
return _libsbol.UsageVector___setslice__(self, *args)
def __delslice__(self, i, j):
return _libsbol.UsageVector___delslice__(self, i, j)
def __delitem__(self, *args):
return _libsbol.UsageVector___delitem__(self, *args)
def __getitem__(self, *args):
return _libsbol.UsageVector___getitem__(self, *args)
def __setitem__(self, *args):
return _libsbol.UsageVector___setitem__(self, *args)
def pop(self):
return _libsbol.UsageVector_pop(self)
def append(self, x):
return _libsbol.UsageVector_append(self, x)
def empty(self):
return _libsbol.UsageVector_empty(self)
def size(self):
return _libsbol.UsageVector_size(self)
def swap(self, v):
return _libsbol.UsageVector_swap(self, v)
def begin(self):
return _libsbol.UsageVector_begin(self)
def end(self):
return _libsbol.UsageVector_end(self)
def rbegin(self):
return _libsbol.UsageVector_rbegin(self)
def rend(self):
return _libsbol.UsageVector_rend(self)
def clear(self):
return _libsbol.UsageVector_clear(self)
def get_allocator(self):
return _libsbol.UsageVector_get_allocator(self)
def pop_back(self):
return _libsbol.UsageVector_pop_back(self)
def erase(self, *args):
return _libsbol.UsageVector_erase(self, *args)
def __init__(self, *args):
this = _libsbol.new_UsageVector(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def push_back(self, x):
return _libsbol.UsageVector_push_back(self, x)
def front(self):
return _libsbol.UsageVector_front(self)
def back(self):
return _libsbol.UsageVector_back(self)
def assign(self, n, x):
return _libsbol.UsageVector_assign(self, n, x)
def resize(self, *args):
return _libsbol.UsageVector_resize(self, *args)
def insert(self, *args):
return _libsbol.UsageVector_insert(self, *args)
def reserve(self, n):
return _libsbol.UsageVector_reserve(self, n)
def capacity(self):
return _libsbol.UsageVector_capacity(self)
__swig_destroy__ = _libsbol.delete_UsageVector
__del__ = lambda self: None
UsageVector_swigregister = _libsbol.UsageVector_swigregister
UsageVector_swigregister(UsageVector)
[docs]class UsageProperty(_object):
"""
Member properties of all SBOL objects are defined using a Property object.
The Property class provides a generic interface for accessing SBOL objects. At a
low level, the Property class converts SBOL data structures into RDF triples.
templateparam
-------------
* `The` :
SBOL specification currently supports string, URI, and integer literal
values.
"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, UsageProperty, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, UsageProperty, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Parameters
----------
* `type_uri` :
An RDF hash URI for this property, consisting of a namespace followed by an
identifier. For example, Properties of SBOLObjects use URIs of the form
http://sbols.org/v2#somePropertyName, where the identifier somePropertyName
determines the appearance of XML nodes in an SBOL file. Alternatively,
annotations in a custom namespace can be provided using a similarly formed
hash URI in another namespace.
* `property_owner` :
All Property objects must have a pointer back to its parent SBOLObject of
which it is a member
* `initial_value` :
The initial value of the Property
* `validation_rules` :
A vector of externally defined ValidationRules. The vector contains pointers
to functions which correspond to the validation rules listed in the appendix
of the formal SBOL specification document. ValidationRules are automatically
checked every time a setter or adder method is called and when Documents are
read and written.
"""
this = _libsbol.new_UsageProperty(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete_UsageProperty
__del__ = lambda self: None
[docs] def getTypeURI(self):
"""
Returns
-------
The uniform resource identifier that describes the RDF-type of this SBOL Object
"""
return _libsbol.UsageProperty_getTypeURI(self)
[docs] def getOwner(self):
"""
"""
return _libsbol.UsageProperty_getOwner(self)
[docs] def set(self, *args):
"""
Basic setter for SBOL Property.
Parameters
----------
* `new_value` :
A new integer value for the property, which is converted to a raw string
during serialization.
"""
val = _libsbol.UsageProperty_set(self, *args)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, new_value):
"""
Appends the new value to a list of values, for properties that allow it.
Parameters
----------
* `new_value` :
A new string which will be added to a list of values.
"""
val = _libsbol.UsageProperty_add(self, new_value)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def remove(self, index=0):
"""
Remove a Property from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.UsageProperty_remove(self, index)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.UsageProperty_clear(self)
[docs] def write(self):
"""
"""
return _libsbol.UsageProperty_write(self)
def find(self, query):
return _libsbol.UsageProperty_find(self, query)
def getLowerBound(self):
return _libsbol.UsageProperty_getLowerBound(self)
def getUpperBound(self):
return _libsbol.UsageProperty_getUpperBound(self)
[docs] def validate(self, arg=None):
"""
"""
return _libsbol.UsageProperty_validate(self, arg)
def copy(self, target_property):
return _libsbol.UsageProperty_copy(self, target_property)
__swig_setmethods__["python_iter"] = _libsbol.UsageProperty_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.UsageProperty_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.UsageProperty_python_iter_get, _libsbol.UsageProperty_python_iter_set)
def addValidationRule(self, *args):
return _libsbol.UsageProperty_addValidationRule(self, *args)
UsageProperty_swigregister = _libsbol.UsageProperty_swigregister
UsageProperty_swigregister(UsageProperty)
[docs]class OwnedUsage(UsageProperty):
"""
A container property that contains child objects.
Creates a composition out of two or more classes. In the SBOL specification,
compositional relationships are indicated in class diagrams by arrows with black
diamonds. A compositional relationship means that deleting the parent object
will delete the child objects, and adding the parent object to a Document will
also add the child object. Owned objects are stored in arbitrary order.
templateparam
-------------
* `SBOLClass` :
The type of child SBOL object contained by this Property
"""
__swig_setmethods__ = {}
for _s in [UsageProperty]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, OwnedUsage, name, value)
__swig_getmethods__ = {}
for _s in [UsageProperty]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, OwnedUsage, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
"""
this = _libsbol.new_OwnedUsage(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
[docs] def set(self, sbol_obj):
"""
Basic setter for OwnedObject SBOL IntProperty.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Assigns a child object to
this OwnedObject container property. This method always overwrites the first
SBOLObject in the container. appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
* `sbol_obj` :
The child object Sets the first object in the container
"""
val = _libsbol.OwnedUsage_set(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, sbol_obj):
"""
Appends the new value to a list of values, for properties that allow it.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Adds a child object to the
parent object. This method always appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
"""
val = _libsbol.OwnedUsage_add(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def get(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedUsage_get(self, *args)
[docs] def getAll(self):
"""
Retrieve a vector of objects from the OwnedObject.
"""
val = _libsbol.OwnedUsage_getAll(self)
val = list(val)
return val
[docs] def remove(self, *args):
"""
Remove an object from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.OwnedUsage_remove(self, *args)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.OwnedUsage_clear(self)
[docs] def create(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedUsage_create(self, uri)
val.thisown = False
return val
def define(self, definition_object):
return _libsbol.OwnedUsage_define(self, definition_object)
def find(self, uri):
return _libsbol.OwnedUsage_find(self, uri)
__swig_setmethods__["python_iter"] = _libsbol.OwnedUsage_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.OwnedUsage_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.OwnedUsage_python_iter_get, _libsbol.OwnedUsage_python_iter_set)
def __iter__(self):
return _libsbol.OwnedUsage___iter__(self)
def next(self):
return _libsbol.OwnedUsage_next(self)
def __next__(self):
return _libsbol.OwnedUsage___next__(self)
def __len__(self):
return _libsbol.OwnedUsage___len__(self)
[docs] def createRange(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedUsage_createRange(self, uri)
val.thisown = False
return val
[docs] def getRange(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedUsage_getRange(self, *args)
[docs] def createCut(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedUsage_createCut(self, uri)
val.thisown = False
return val
[docs] def getCut(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedUsage_getCut(self, *args)
[docs] def createGenericLocation(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedUsage_createGenericLocation(self, uri)
val.thisown = False
return val
[docs] def getGenericLocation(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedUsage_getGenericLocation(self, *args)
def __getitem__(self, *args):
return _libsbol.OwnedUsage___getitem__(self, *args)
def __setitem__(self, uri, py_obj):
return _libsbol.OwnedUsage___setitem__(self, uri, py_obj)
__swig_destroy__ = _libsbol.delete_OwnedUsage
__del__ = lambda self: None
OwnedUsage_swigregister = _libsbol.OwnedUsage_swigregister
OwnedUsage_swigregister(OwnedUsage)
class VariableComponentVector(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, VariableComponentVector, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, VariableComponentVector, name)
__repr__ = _swig_repr
def iterator(self):
return _libsbol.VariableComponentVector_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self):
return _libsbol.VariableComponentVector___nonzero__(self)
def __bool__(self):
return _libsbol.VariableComponentVector___bool__(self)
def __len__(self):
return _libsbol.VariableComponentVector___len__(self)
def __getslice__(self, i, j):
return _libsbol.VariableComponentVector___getslice__(self, i, j)
def __setslice__(self, *args):
return _libsbol.VariableComponentVector___setslice__(self, *args)
def __delslice__(self, i, j):
return _libsbol.VariableComponentVector___delslice__(self, i, j)
def __delitem__(self, *args):
return _libsbol.VariableComponentVector___delitem__(self, *args)
def __getitem__(self, *args):
return _libsbol.VariableComponentVector___getitem__(self, *args)
def __setitem__(self, *args):
return _libsbol.VariableComponentVector___setitem__(self, *args)
def pop(self):
return _libsbol.VariableComponentVector_pop(self)
def append(self, x):
return _libsbol.VariableComponentVector_append(self, x)
def empty(self):
return _libsbol.VariableComponentVector_empty(self)
def size(self):
return _libsbol.VariableComponentVector_size(self)
def swap(self, v):
return _libsbol.VariableComponentVector_swap(self, v)
def begin(self):
return _libsbol.VariableComponentVector_begin(self)
def end(self):
return _libsbol.VariableComponentVector_end(self)
def rbegin(self):
return _libsbol.VariableComponentVector_rbegin(self)
def rend(self):
return _libsbol.VariableComponentVector_rend(self)
def clear(self):
return _libsbol.VariableComponentVector_clear(self)
def get_allocator(self):
return _libsbol.VariableComponentVector_get_allocator(self)
def pop_back(self):
return _libsbol.VariableComponentVector_pop_back(self)
def erase(self, *args):
return _libsbol.VariableComponentVector_erase(self, *args)
def __init__(self, *args):
this = _libsbol.new_VariableComponentVector(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def push_back(self, x):
return _libsbol.VariableComponentVector_push_back(self, x)
def front(self):
return _libsbol.VariableComponentVector_front(self)
def back(self):
return _libsbol.VariableComponentVector_back(self)
def assign(self, n, x):
return _libsbol.VariableComponentVector_assign(self, n, x)
def resize(self, *args):
return _libsbol.VariableComponentVector_resize(self, *args)
def insert(self, *args):
return _libsbol.VariableComponentVector_insert(self, *args)
def reserve(self, n):
return _libsbol.VariableComponentVector_reserve(self, n)
def capacity(self):
return _libsbol.VariableComponentVector_capacity(self)
__swig_destroy__ = _libsbol.delete_VariableComponentVector
__del__ = lambda self: None
VariableComponentVector_swigregister = _libsbol.VariableComponentVector_swigregister
VariableComponentVector_swigregister(VariableComponentVector)
[docs]class VariableComponentProperty(_object):
"""
Member properties of all SBOL objects are defined using a Property object.
The Property class provides a generic interface for accessing SBOL objects. At a
low level, the Property class converts SBOL data structures into RDF triples.
templateparam
-------------
* `The` :
SBOL specification currently supports string, URI, and integer literal
values.
"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, VariableComponentProperty, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, VariableComponentProperty, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Parameters
----------
* `type_uri` :
An RDF hash URI for this property, consisting of a namespace followed by an
identifier. For example, Properties of SBOLObjects use URIs of the form
http://sbols.org/v2#somePropertyName, where the identifier somePropertyName
determines the appearance of XML nodes in an SBOL file. Alternatively,
annotations in a custom namespace can be provided using a similarly formed
hash URI in another namespace.
* `property_owner` :
All Property objects must have a pointer back to its parent SBOLObject of
which it is a member
* `initial_value` :
The initial value of the Property
* `validation_rules` :
A vector of externally defined ValidationRules. The vector contains pointers
to functions which correspond to the validation rules listed in the appendix
of the formal SBOL specification document. ValidationRules are automatically
checked every time a setter or adder method is called and when Documents are
read and written.
"""
this = _libsbol.new_VariableComponentProperty(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete_VariableComponentProperty
__del__ = lambda self: None
[docs] def getTypeURI(self):
"""
Returns
-------
The uniform resource identifier that describes the RDF-type of this SBOL Object
"""
return _libsbol.VariableComponentProperty_getTypeURI(self)
[docs] def getOwner(self):
"""
"""
return _libsbol.VariableComponentProperty_getOwner(self)
[docs] def set(self, *args):
"""
Basic setter for SBOL Property.
Parameters
----------
* `new_value` :
A new integer value for the property, which is converted to a raw string
during serialization.
"""
val = _libsbol.VariableComponentProperty_set(self, *args)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, new_value):
"""
Appends the new value to a list of values, for properties that allow it.
Parameters
----------
* `new_value` :
A new string which will be added to a list of values.
"""
val = _libsbol.VariableComponentProperty_add(self, new_value)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def remove(self, index=0):
"""
Remove a Property from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.VariableComponentProperty_remove(self, index)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.VariableComponentProperty_clear(self)
[docs] def write(self):
"""
"""
return _libsbol.VariableComponentProperty_write(self)
def find(self, query):
return _libsbol.VariableComponentProperty_find(self, query)
def getLowerBound(self):
return _libsbol.VariableComponentProperty_getLowerBound(self)
def getUpperBound(self):
return _libsbol.VariableComponentProperty_getUpperBound(self)
[docs] def validate(self, arg=None):
"""
"""
return _libsbol.VariableComponentProperty_validate(self, arg)
def copy(self, target_property):
return _libsbol.VariableComponentProperty_copy(self, target_property)
__swig_setmethods__["python_iter"] = _libsbol.VariableComponentProperty_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.VariableComponentProperty_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.VariableComponentProperty_python_iter_get, _libsbol.VariableComponentProperty_python_iter_set)
def addValidationRule(self, *args):
return _libsbol.VariableComponentProperty_addValidationRule(self, *args)
VariableComponentProperty_swigregister = _libsbol.VariableComponentProperty_swigregister
VariableComponentProperty_swigregister(VariableComponentProperty)
[docs]class OwnedVariableComponent(VariableComponentProperty):
"""
A container property that contains child objects.
Creates a composition out of two or more classes. In the SBOL specification,
compositional relationships are indicated in class diagrams by arrows with black
diamonds. A compositional relationship means that deleting the parent object
will delete the child objects, and adding the parent object to a Document will
also add the child object. Owned objects are stored in arbitrary order.
templateparam
-------------
* `SBOLClass` :
The type of child SBOL object contained by this Property
"""
__swig_setmethods__ = {}
for _s in [VariableComponentProperty]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, OwnedVariableComponent, name, value)
__swig_getmethods__ = {}
for _s in [VariableComponentProperty]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, OwnedVariableComponent, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
"""
this = _libsbol.new_OwnedVariableComponent(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
[docs] def set(self, sbol_obj):
"""
Basic setter for OwnedObject SBOL IntProperty.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Assigns a child object to
this OwnedObject container property. This method always overwrites the first
SBOLObject in the container. appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
* `sbol_obj` :
The child object Sets the first object in the container
"""
val = _libsbol.OwnedVariableComponent_set(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, sbol_obj):
"""
Appends the new value to a list of values, for properties that allow it.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Adds a child object to the
parent object. This method always appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
"""
val = _libsbol.OwnedVariableComponent_add(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def get(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedVariableComponent_get(self, *args)
[docs] def getAll(self):
"""
Retrieve a vector of objects from the OwnedObject.
"""
val = _libsbol.OwnedVariableComponent_getAll(self)
val = list(val)
return val
[docs] def remove(self, *args):
"""
Remove an object from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.OwnedVariableComponent_remove(self, *args)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.OwnedVariableComponent_clear(self)
[docs] def create(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedVariableComponent_create(self, uri)
val.thisown = False
return val
def define(self, definition_object):
return _libsbol.OwnedVariableComponent_define(self, definition_object)
def find(self, uri):
return _libsbol.OwnedVariableComponent_find(self, uri)
__swig_setmethods__["python_iter"] = _libsbol.OwnedVariableComponent_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.OwnedVariableComponent_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.OwnedVariableComponent_python_iter_get, _libsbol.OwnedVariableComponent_python_iter_set)
def __iter__(self):
return _libsbol.OwnedVariableComponent___iter__(self)
def next(self):
return _libsbol.OwnedVariableComponent_next(self)
def __next__(self):
return _libsbol.OwnedVariableComponent___next__(self)
def __len__(self):
return _libsbol.OwnedVariableComponent___len__(self)
[docs] def createRange(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedVariableComponent_createRange(self, uri)
val.thisown = False
return val
[docs] def getRange(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedVariableComponent_getRange(self, *args)
[docs] def createCut(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedVariableComponent_createCut(self, uri)
val.thisown = False
return val
[docs] def getCut(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedVariableComponent_getCut(self, *args)
[docs] def createGenericLocation(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedVariableComponent_createGenericLocation(self, uri)
val.thisown = False
return val
[docs] def getGenericLocation(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedVariableComponent_getGenericLocation(self, *args)
def __getitem__(self, *args):
return _libsbol.OwnedVariableComponent___getitem__(self, *args)
def __setitem__(self, uri, py_obj):
return _libsbol.OwnedVariableComponent___setitem__(self, uri, py_obj)
__swig_destroy__ = _libsbol.delete_OwnedVariableComponent
__del__ = lambda self: None
OwnedVariableComponent_swigregister = _libsbol.OwnedVariableComponent_swigregister
OwnedVariableComponent_swigregister(OwnedVariableComponent)
class ComponentDefinitionVector(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, ComponentDefinitionVector, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, ComponentDefinitionVector, name)
__repr__ = _swig_repr
def iterator(self):
return _libsbol.ComponentDefinitionVector_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self):
return _libsbol.ComponentDefinitionVector___nonzero__(self)
def __bool__(self):
return _libsbol.ComponentDefinitionVector___bool__(self)
def __len__(self):
return _libsbol.ComponentDefinitionVector___len__(self)
def __getslice__(self, i, j):
return _libsbol.ComponentDefinitionVector___getslice__(self, i, j)
def __setslice__(self, *args):
return _libsbol.ComponentDefinitionVector___setslice__(self, *args)
def __delslice__(self, i, j):
return _libsbol.ComponentDefinitionVector___delslice__(self, i, j)
def __delitem__(self, *args):
return _libsbol.ComponentDefinitionVector___delitem__(self, *args)
def __getitem__(self, *args):
return _libsbol.ComponentDefinitionVector___getitem__(self, *args)
def __setitem__(self, *args):
return _libsbol.ComponentDefinitionVector___setitem__(self, *args)
def pop(self):
return _libsbol.ComponentDefinitionVector_pop(self)
def append(self, x):
return _libsbol.ComponentDefinitionVector_append(self, x)
def empty(self):
return _libsbol.ComponentDefinitionVector_empty(self)
def size(self):
return _libsbol.ComponentDefinitionVector_size(self)
def swap(self, v):
return _libsbol.ComponentDefinitionVector_swap(self, v)
def begin(self):
return _libsbol.ComponentDefinitionVector_begin(self)
def end(self):
return _libsbol.ComponentDefinitionVector_end(self)
def rbegin(self):
return _libsbol.ComponentDefinitionVector_rbegin(self)
def rend(self):
return _libsbol.ComponentDefinitionVector_rend(self)
def clear(self):
return _libsbol.ComponentDefinitionVector_clear(self)
def get_allocator(self):
return _libsbol.ComponentDefinitionVector_get_allocator(self)
def pop_back(self):
return _libsbol.ComponentDefinitionVector_pop_back(self)
def erase(self, *args):
return _libsbol.ComponentDefinitionVector_erase(self, *args)
def __init__(self, *args):
this = _libsbol.new_ComponentDefinitionVector(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def push_back(self, x):
return _libsbol.ComponentDefinitionVector_push_back(self, x)
def front(self):
return _libsbol.ComponentDefinitionVector_front(self)
def back(self):
return _libsbol.ComponentDefinitionVector_back(self)
def assign(self, n, x):
return _libsbol.ComponentDefinitionVector_assign(self, n, x)
def resize(self, *args):
return _libsbol.ComponentDefinitionVector_resize(self, *args)
def insert(self, *args):
return _libsbol.ComponentDefinitionVector_insert(self, *args)
def reserve(self, n):
return _libsbol.ComponentDefinitionVector_reserve(self, n)
def capacity(self):
return _libsbol.ComponentDefinitionVector_capacity(self)
__swig_destroy__ = _libsbol.delete_ComponentDefinitionVector
__del__ = lambda self: None
ComponentDefinitionVector_swigregister = _libsbol.ComponentDefinitionVector_swigregister
ComponentDefinitionVector_swigregister(ComponentDefinitionVector)
[docs]class ComponentDefinitionProperty(_object):
"""
Member properties of all SBOL objects are defined using a Property object.
The Property class provides a generic interface for accessing SBOL objects. At a
low level, the Property class converts SBOL data structures into RDF triples.
templateparam
-------------
* `The` :
SBOL specification currently supports string, URI, and integer literal
values.
"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, ComponentDefinitionProperty, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, ComponentDefinitionProperty, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Parameters
----------
* `type_uri` :
An RDF hash URI for this property, consisting of a namespace followed by an
identifier. For example, Properties of SBOLObjects use URIs of the form
http://sbols.org/v2#somePropertyName, where the identifier somePropertyName
determines the appearance of XML nodes in an SBOL file. Alternatively,
annotations in a custom namespace can be provided using a similarly formed
hash URI in another namespace.
* `property_owner` :
All Property objects must have a pointer back to its parent SBOLObject of
which it is a member
* `initial_value` :
The initial value of the Property
* `validation_rules` :
A vector of externally defined ValidationRules. The vector contains pointers
to functions which correspond to the validation rules listed in the appendix
of the formal SBOL specification document. ValidationRules are automatically
checked every time a setter or adder method is called and when Documents are
read and written.
"""
this = _libsbol.new_ComponentDefinitionProperty(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete_ComponentDefinitionProperty
__del__ = lambda self: None
[docs] def getTypeURI(self):
"""
Returns
-------
The uniform resource identifier that describes the RDF-type of this SBOL Object
"""
return _libsbol.ComponentDefinitionProperty_getTypeURI(self)
[docs] def getOwner(self):
"""
"""
return _libsbol.ComponentDefinitionProperty_getOwner(self)
[docs] def set(self, *args):
"""
Basic setter for SBOL Property.
Parameters
----------
* `new_value` :
A new integer value for the property, which is converted to a raw string
during serialization.
"""
val = _libsbol.ComponentDefinitionProperty_set(self, *args)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, new_value):
"""
Appends the new value to a list of values, for properties that allow it.
Parameters
----------
* `new_value` :
A new string which will be added to a list of values.
"""
val = _libsbol.ComponentDefinitionProperty_add(self, new_value)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def remove(self, index=0):
"""
Remove a Property from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.ComponentDefinitionProperty_remove(self, index)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.ComponentDefinitionProperty_clear(self)
[docs] def write(self):
"""
"""
return _libsbol.ComponentDefinitionProperty_write(self)
def find(self, query):
return _libsbol.ComponentDefinitionProperty_find(self, query)
def getLowerBound(self):
return _libsbol.ComponentDefinitionProperty_getLowerBound(self)
def getUpperBound(self):
return _libsbol.ComponentDefinitionProperty_getUpperBound(self)
[docs] def validate(self, arg=None):
"""
"""
return _libsbol.ComponentDefinitionProperty_validate(self, arg)
def copy(self, target_property):
return _libsbol.ComponentDefinitionProperty_copy(self, target_property)
__swig_setmethods__["python_iter"] = _libsbol.ComponentDefinitionProperty_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.ComponentDefinitionProperty_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.ComponentDefinitionProperty_python_iter_get, _libsbol.ComponentDefinitionProperty_python_iter_set)
def addValidationRule(self, *args):
return _libsbol.ComponentDefinitionProperty_addValidationRule(self, *args)
ComponentDefinitionProperty_swigregister = _libsbol.ComponentDefinitionProperty_swigregister
ComponentDefinitionProperty_swigregister(ComponentDefinitionProperty)
[docs]class OwnedComponentDefinition(ComponentDefinitionProperty):
"""
A container property that contains child objects.
Creates a composition out of two or more classes. In the SBOL specification,
compositional relationships are indicated in class diagrams by arrows with black
diamonds. A compositional relationship means that deleting the parent object
will delete the child objects, and adding the parent object to a Document will
also add the child object. Owned objects are stored in arbitrary order.
templateparam
-------------
* `SBOLClass` :
The type of child SBOL object contained by this Property
"""
__swig_setmethods__ = {}
for _s in [ComponentDefinitionProperty]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, OwnedComponentDefinition, name, value)
__swig_getmethods__ = {}
for _s in [ComponentDefinitionProperty]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, OwnedComponentDefinition, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
"""
this = _libsbol.new_OwnedComponentDefinition(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
[docs] def set(self, sbol_obj):
"""
Basic setter for OwnedObject SBOL IntProperty.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Assigns a child object to
this OwnedObject container property. This method always overwrites the first
SBOLObject in the container. appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
* `sbol_obj` :
The child object Sets the first object in the container
"""
val = _libsbol.OwnedComponentDefinition_set(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, sbol_obj):
"""
Appends the new value to a list of values, for properties that allow it.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Adds a child object to the
parent object. This method always appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
"""
val = _libsbol.OwnedComponentDefinition_add(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def get(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedComponentDefinition_get(self, *args)
[docs] def getAll(self):
"""
Retrieve a vector of objects from the OwnedObject.
"""
val = _libsbol.OwnedComponentDefinition_getAll(self)
val = list(val)
return val
[docs] def remove(self, *args):
"""
Remove an object from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.OwnedComponentDefinition_remove(self, *args)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.OwnedComponentDefinition_clear(self)
[docs] def create(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedComponentDefinition_create(self, uri)
val.thisown = False
return val
def define(self, definition_object):
return _libsbol.OwnedComponentDefinition_define(self, definition_object)
def find(self, uri):
return _libsbol.OwnedComponentDefinition_find(self, uri)
__swig_setmethods__["python_iter"] = _libsbol.OwnedComponentDefinition_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.OwnedComponentDefinition_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.OwnedComponentDefinition_python_iter_get, _libsbol.OwnedComponentDefinition_python_iter_set)
def __iter__(self):
return _libsbol.OwnedComponentDefinition___iter__(self)
def next(self):
return _libsbol.OwnedComponentDefinition_next(self)
def __next__(self):
return _libsbol.OwnedComponentDefinition___next__(self)
def __len__(self):
return _libsbol.OwnedComponentDefinition___len__(self)
[docs] def createRange(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedComponentDefinition_createRange(self, uri)
val.thisown = False
return val
[docs] def getRange(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedComponentDefinition_getRange(self, *args)
[docs] def createCut(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedComponentDefinition_createCut(self, uri)
val.thisown = False
return val
[docs] def getCut(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedComponentDefinition_getCut(self, *args)
[docs] def createGenericLocation(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedComponentDefinition_createGenericLocation(self, uri)
val.thisown = False
return val
[docs] def getGenericLocation(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedComponentDefinition_getGenericLocation(self, *args)
def __getitem__(self, *args):
return _libsbol.OwnedComponentDefinition___getitem__(self, *args)
def __setitem__(self, uri, py_obj):
return _libsbol.OwnedComponentDefinition___setitem__(self, uri, py_obj)
__swig_destroy__ = _libsbol.delete_OwnedComponentDefinition
__del__ = lambda self: None
OwnedComponentDefinition_swigregister = _libsbol.OwnedComponentDefinition_swigregister
OwnedComponentDefinition_swigregister(OwnedComponentDefinition)
class ModuleDefinitionVector(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, ModuleDefinitionVector, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, ModuleDefinitionVector, name)
__repr__ = _swig_repr
def iterator(self):
return _libsbol.ModuleDefinitionVector_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self):
return _libsbol.ModuleDefinitionVector___nonzero__(self)
def __bool__(self):
return _libsbol.ModuleDefinitionVector___bool__(self)
def __len__(self):
return _libsbol.ModuleDefinitionVector___len__(self)
def __getslice__(self, i, j):
return _libsbol.ModuleDefinitionVector___getslice__(self, i, j)
def __setslice__(self, *args):
return _libsbol.ModuleDefinitionVector___setslice__(self, *args)
def __delslice__(self, i, j):
return _libsbol.ModuleDefinitionVector___delslice__(self, i, j)
def __delitem__(self, *args):
return _libsbol.ModuleDefinitionVector___delitem__(self, *args)
def __getitem__(self, *args):
return _libsbol.ModuleDefinitionVector___getitem__(self, *args)
def __setitem__(self, *args):
return _libsbol.ModuleDefinitionVector___setitem__(self, *args)
def pop(self):
return _libsbol.ModuleDefinitionVector_pop(self)
def append(self, x):
return _libsbol.ModuleDefinitionVector_append(self, x)
def empty(self):
return _libsbol.ModuleDefinitionVector_empty(self)
def size(self):
return _libsbol.ModuleDefinitionVector_size(self)
def swap(self, v):
return _libsbol.ModuleDefinitionVector_swap(self, v)
def begin(self):
return _libsbol.ModuleDefinitionVector_begin(self)
def end(self):
return _libsbol.ModuleDefinitionVector_end(self)
def rbegin(self):
return _libsbol.ModuleDefinitionVector_rbegin(self)
def rend(self):
return _libsbol.ModuleDefinitionVector_rend(self)
def clear(self):
return _libsbol.ModuleDefinitionVector_clear(self)
def get_allocator(self):
return _libsbol.ModuleDefinitionVector_get_allocator(self)
def pop_back(self):
return _libsbol.ModuleDefinitionVector_pop_back(self)
def erase(self, *args):
return _libsbol.ModuleDefinitionVector_erase(self, *args)
def __init__(self, *args):
this = _libsbol.new_ModuleDefinitionVector(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def push_back(self, x):
return _libsbol.ModuleDefinitionVector_push_back(self, x)
def front(self):
return _libsbol.ModuleDefinitionVector_front(self)
def back(self):
return _libsbol.ModuleDefinitionVector_back(self)
def assign(self, n, x):
return _libsbol.ModuleDefinitionVector_assign(self, n, x)
def resize(self, *args):
return _libsbol.ModuleDefinitionVector_resize(self, *args)
def insert(self, *args):
return _libsbol.ModuleDefinitionVector_insert(self, *args)
def reserve(self, n):
return _libsbol.ModuleDefinitionVector_reserve(self, n)
def capacity(self):
return _libsbol.ModuleDefinitionVector_capacity(self)
__swig_destroy__ = _libsbol.delete_ModuleDefinitionVector
__del__ = lambda self: None
ModuleDefinitionVector_swigregister = _libsbol.ModuleDefinitionVector_swigregister
ModuleDefinitionVector_swigregister(ModuleDefinitionVector)
[docs]class ModuleDefinitionProperty(_object):
"""
Member properties of all SBOL objects are defined using a Property object.
The Property class provides a generic interface for accessing SBOL objects. At a
low level, the Property class converts SBOL data structures into RDF triples.
templateparam
-------------
* `The` :
SBOL specification currently supports string, URI, and integer literal
values.
"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, ModuleDefinitionProperty, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, ModuleDefinitionProperty, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Parameters
----------
* `type_uri` :
An RDF hash URI for this property, consisting of a namespace followed by an
identifier. For example, Properties of SBOLObjects use URIs of the form
http://sbols.org/v2#somePropertyName, where the identifier somePropertyName
determines the appearance of XML nodes in an SBOL file. Alternatively,
annotations in a custom namespace can be provided using a similarly formed
hash URI in another namespace.
* `property_owner` :
All Property objects must have a pointer back to its parent SBOLObject of
which it is a member
* `initial_value` :
The initial value of the Property
* `validation_rules` :
A vector of externally defined ValidationRules. The vector contains pointers
to functions which correspond to the validation rules listed in the appendix
of the formal SBOL specification document. ValidationRules are automatically
checked every time a setter or adder method is called and when Documents are
read and written.
"""
this = _libsbol.new_ModuleDefinitionProperty(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete_ModuleDefinitionProperty
__del__ = lambda self: None
[docs] def getTypeURI(self):
"""
Returns
-------
The uniform resource identifier that describes the RDF-type of this SBOL Object
"""
return _libsbol.ModuleDefinitionProperty_getTypeURI(self)
[docs] def getOwner(self):
"""
"""
return _libsbol.ModuleDefinitionProperty_getOwner(self)
[docs] def set(self, *args):
"""
Basic setter for SBOL Property.
Parameters
----------
* `new_value` :
A new integer value for the property, which is converted to a raw string
during serialization.
"""
val = _libsbol.ModuleDefinitionProperty_set(self, *args)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, new_value):
"""
Appends the new value to a list of values, for properties that allow it.
Parameters
----------
* `new_value` :
A new string which will be added to a list of values.
"""
val = _libsbol.ModuleDefinitionProperty_add(self, new_value)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def remove(self, index=0):
"""
Remove a Property from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.ModuleDefinitionProperty_remove(self, index)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.ModuleDefinitionProperty_clear(self)
[docs] def write(self):
"""
"""
return _libsbol.ModuleDefinitionProperty_write(self)
def find(self, query):
return _libsbol.ModuleDefinitionProperty_find(self, query)
def getLowerBound(self):
return _libsbol.ModuleDefinitionProperty_getLowerBound(self)
def getUpperBound(self):
return _libsbol.ModuleDefinitionProperty_getUpperBound(self)
[docs] def validate(self, arg=None):
"""
"""
return _libsbol.ModuleDefinitionProperty_validate(self, arg)
def copy(self, target_property):
return _libsbol.ModuleDefinitionProperty_copy(self, target_property)
__swig_setmethods__["python_iter"] = _libsbol.ModuleDefinitionProperty_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.ModuleDefinitionProperty_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.ModuleDefinitionProperty_python_iter_get, _libsbol.ModuleDefinitionProperty_python_iter_set)
def addValidationRule(self, *args):
return _libsbol.ModuleDefinitionProperty_addValidationRule(self, *args)
ModuleDefinitionProperty_swigregister = _libsbol.ModuleDefinitionProperty_swigregister
ModuleDefinitionProperty_swigregister(ModuleDefinitionProperty)
[docs]class OwnedModuleDefinition(ModuleDefinitionProperty):
"""
A container property that contains child objects.
Creates a composition out of two or more classes. In the SBOL specification,
compositional relationships are indicated in class diagrams by arrows with black
diamonds. A compositional relationship means that deleting the parent object
will delete the child objects, and adding the parent object to a Document will
also add the child object. Owned objects are stored in arbitrary order.
templateparam
-------------
* `SBOLClass` :
The type of child SBOL object contained by this Property
"""
__swig_setmethods__ = {}
for _s in [ModuleDefinitionProperty]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, OwnedModuleDefinition, name, value)
__swig_getmethods__ = {}
for _s in [ModuleDefinitionProperty]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, OwnedModuleDefinition, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
"""
this = _libsbol.new_OwnedModuleDefinition(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
[docs] def set(self, sbol_obj):
"""
Basic setter for OwnedObject SBOL IntProperty.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Assigns a child object to
this OwnedObject container property. This method always overwrites the first
SBOLObject in the container. appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
* `sbol_obj` :
The child object Sets the first object in the container
"""
val = _libsbol.OwnedModuleDefinition_set(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, sbol_obj):
"""
Appends the new value to a list of values, for properties that allow it.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Adds a child object to the
parent object. This method always appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
"""
val = _libsbol.OwnedModuleDefinition_add(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def get(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedModuleDefinition_get(self, *args)
[docs] def getAll(self):
"""
Retrieve a vector of objects from the OwnedObject.
"""
val = _libsbol.OwnedModuleDefinition_getAll(self)
val = list(val)
return val
[docs] def remove(self, *args):
"""
Remove an object from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.OwnedModuleDefinition_remove(self, *args)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.OwnedModuleDefinition_clear(self)
[docs] def create(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedModuleDefinition_create(self, uri)
val.thisown = False
return val
def define(self, definition_object):
return _libsbol.OwnedModuleDefinition_define(self, definition_object)
def find(self, uri):
return _libsbol.OwnedModuleDefinition_find(self, uri)
__swig_setmethods__["python_iter"] = _libsbol.OwnedModuleDefinition_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.OwnedModuleDefinition_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.OwnedModuleDefinition_python_iter_get, _libsbol.OwnedModuleDefinition_python_iter_set)
def __iter__(self):
return _libsbol.OwnedModuleDefinition___iter__(self)
def next(self):
return _libsbol.OwnedModuleDefinition_next(self)
def __next__(self):
return _libsbol.OwnedModuleDefinition___next__(self)
def __len__(self):
return _libsbol.OwnedModuleDefinition___len__(self)
[docs] def createRange(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedModuleDefinition_createRange(self, uri)
val.thisown = False
return val
[docs] def getRange(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedModuleDefinition_getRange(self, *args)
[docs] def createCut(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedModuleDefinition_createCut(self, uri)
val.thisown = False
return val
[docs] def getCut(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedModuleDefinition_getCut(self, *args)
[docs] def createGenericLocation(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedModuleDefinition_createGenericLocation(self, uri)
val.thisown = False
return val
[docs] def getGenericLocation(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedModuleDefinition_getGenericLocation(self, *args)
def __getitem__(self, *args):
return _libsbol.OwnedModuleDefinition___getitem__(self, *args)
def __setitem__(self, uri, py_obj):
return _libsbol.OwnedModuleDefinition___setitem__(self, uri, py_obj)
__swig_destroy__ = _libsbol.delete_OwnedModuleDefinition
__del__ = lambda self: None
OwnedModuleDefinition_swigregister = _libsbol.OwnedModuleDefinition_swigregister
OwnedModuleDefinition_swigregister(OwnedModuleDefinition)
class SequenceVector(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, SequenceVector, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, SequenceVector, name)
__repr__ = _swig_repr
def iterator(self):
return _libsbol.SequenceVector_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self):
return _libsbol.SequenceVector___nonzero__(self)
def __bool__(self):
return _libsbol.SequenceVector___bool__(self)
def __len__(self):
return _libsbol.SequenceVector___len__(self)
def __getslice__(self, i, j):
return _libsbol.SequenceVector___getslice__(self, i, j)
def __setslice__(self, *args):
return _libsbol.SequenceVector___setslice__(self, *args)
def __delslice__(self, i, j):
return _libsbol.SequenceVector___delslice__(self, i, j)
def __delitem__(self, *args):
return _libsbol.SequenceVector___delitem__(self, *args)
def __getitem__(self, *args):
return _libsbol.SequenceVector___getitem__(self, *args)
def __setitem__(self, *args):
return _libsbol.SequenceVector___setitem__(self, *args)
def pop(self):
return _libsbol.SequenceVector_pop(self)
def append(self, x):
return _libsbol.SequenceVector_append(self, x)
def empty(self):
return _libsbol.SequenceVector_empty(self)
def size(self):
return _libsbol.SequenceVector_size(self)
def swap(self, v):
return _libsbol.SequenceVector_swap(self, v)
def begin(self):
return _libsbol.SequenceVector_begin(self)
def end(self):
return _libsbol.SequenceVector_end(self)
def rbegin(self):
return _libsbol.SequenceVector_rbegin(self)
def rend(self):
return _libsbol.SequenceVector_rend(self)
def clear(self):
return _libsbol.SequenceVector_clear(self)
def get_allocator(self):
return _libsbol.SequenceVector_get_allocator(self)
def pop_back(self):
return _libsbol.SequenceVector_pop_back(self)
def erase(self, *args):
return _libsbol.SequenceVector_erase(self, *args)
def __init__(self, *args):
this = _libsbol.new_SequenceVector(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def push_back(self, x):
return _libsbol.SequenceVector_push_back(self, x)
def front(self):
return _libsbol.SequenceVector_front(self)
def back(self):
return _libsbol.SequenceVector_back(self)
def assign(self, n, x):
return _libsbol.SequenceVector_assign(self, n, x)
def resize(self, *args):
return _libsbol.SequenceVector_resize(self, *args)
def insert(self, *args):
return _libsbol.SequenceVector_insert(self, *args)
def reserve(self, n):
return _libsbol.SequenceVector_reserve(self, n)
def capacity(self):
return _libsbol.SequenceVector_capacity(self)
__swig_destroy__ = _libsbol.delete_SequenceVector
__del__ = lambda self: None
SequenceVector_swigregister = _libsbol.SequenceVector_swigregister
SequenceVector_swigregister(SequenceVector)
[docs]class SequenceProperty(_object):
"""
Member properties of all SBOL objects are defined using a Property object.
The Property class provides a generic interface for accessing SBOL objects. At a
low level, the Property class converts SBOL data structures into RDF triples.
templateparam
-------------
* `The` :
SBOL specification currently supports string, URI, and integer literal
values.
"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, SequenceProperty, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, SequenceProperty, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Parameters
----------
* `type_uri` :
An RDF hash URI for this property, consisting of a namespace followed by an
identifier. For example, Properties of SBOLObjects use URIs of the form
http://sbols.org/v2#somePropertyName, where the identifier somePropertyName
determines the appearance of XML nodes in an SBOL file. Alternatively,
annotations in a custom namespace can be provided using a similarly formed
hash URI in another namespace.
* `property_owner` :
All Property objects must have a pointer back to its parent SBOLObject of
which it is a member
* `initial_value` :
The initial value of the Property
* `validation_rules` :
A vector of externally defined ValidationRules. The vector contains pointers
to functions which correspond to the validation rules listed in the appendix
of the formal SBOL specification document. ValidationRules are automatically
checked every time a setter or adder method is called and when Documents are
read and written.
"""
this = _libsbol.new_SequenceProperty(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete_SequenceProperty
__del__ = lambda self: None
[docs] def getTypeURI(self):
"""
Returns
-------
The uniform resource identifier that describes the RDF-type of this SBOL Object
"""
return _libsbol.SequenceProperty_getTypeURI(self)
[docs] def getOwner(self):
"""
"""
return _libsbol.SequenceProperty_getOwner(self)
[docs] def set(self, *args):
"""
Basic setter for SBOL Property.
Parameters
----------
* `new_value` :
A new integer value for the property, which is converted to a raw string
during serialization.
"""
val = _libsbol.SequenceProperty_set(self, *args)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, new_value):
"""
Appends the new value to a list of values, for properties that allow it.
Parameters
----------
* `new_value` :
A new string which will be added to a list of values.
"""
val = _libsbol.SequenceProperty_add(self, new_value)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def remove(self, index=0):
"""
Remove a Property from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.SequenceProperty_remove(self, index)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.SequenceProperty_clear(self)
[docs] def write(self):
"""
"""
return _libsbol.SequenceProperty_write(self)
def find(self, query):
return _libsbol.SequenceProperty_find(self, query)
def getLowerBound(self):
return _libsbol.SequenceProperty_getLowerBound(self)
def getUpperBound(self):
return _libsbol.SequenceProperty_getUpperBound(self)
[docs] def validate(self, arg=None):
"""
"""
return _libsbol.SequenceProperty_validate(self, arg)
def copy(self, target_property):
return _libsbol.SequenceProperty_copy(self, target_property)
__swig_setmethods__["python_iter"] = _libsbol.SequenceProperty_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.SequenceProperty_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.SequenceProperty_python_iter_get, _libsbol.SequenceProperty_python_iter_set)
def addValidationRule(self, *args):
return _libsbol.SequenceProperty_addValidationRule(self, *args)
SequenceProperty_swigregister = _libsbol.SequenceProperty_swigregister
SequenceProperty_swigregister(SequenceProperty)
[docs]class OwnedSequence(SequenceProperty):
"""
A container property that contains child objects.
Creates a composition out of two or more classes. In the SBOL specification,
compositional relationships are indicated in class diagrams by arrows with black
diamonds. A compositional relationship means that deleting the parent object
will delete the child objects, and adding the parent object to a Document will
also add the child object. Owned objects are stored in arbitrary order.
templateparam
-------------
* `SBOLClass` :
The type of child SBOL object contained by this Property
"""
__swig_setmethods__ = {}
for _s in [SequenceProperty]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, OwnedSequence, name, value)
__swig_getmethods__ = {}
for _s in [SequenceProperty]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, OwnedSequence, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
"""
this = _libsbol.new_OwnedSequence(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
[docs] def set(self, sbol_obj):
"""
Basic setter for OwnedObject SBOL IntProperty.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Assigns a child object to
this OwnedObject container property. This method always overwrites the first
SBOLObject in the container. appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
* `sbol_obj` :
The child object Sets the first object in the container
"""
val = _libsbol.OwnedSequence_set(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, sbol_obj):
"""
Appends the new value to a list of values, for properties that allow it.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Adds a child object to the
parent object. This method always appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
"""
val = _libsbol.OwnedSequence_add(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def get(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedSequence_get(self, *args)
[docs] def getAll(self):
"""
Retrieve a vector of objects from the OwnedObject.
"""
val = _libsbol.OwnedSequence_getAll(self)
val = list(val)
return val
[docs] def remove(self, *args):
"""
Remove an object from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.OwnedSequence_remove(self, *args)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.OwnedSequence_clear(self)
[docs] def create(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedSequence_create(self, uri)
val.thisown = False
return val
def define(self, definition_object):
return _libsbol.OwnedSequence_define(self, definition_object)
def find(self, uri):
return _libsbol.OwnedSequence_find(self, uri)
__swig_setmethods__["python_iter"] = _libsbol.OwnedSequence_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.OwnedSequence_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.OwnedSequence_python_iter_get, _libsbol.OwnedSequence_python_iter_set)
def __iter__(self):
return _libsbol.OwnedSequence___iter__(self)
def next(self):
return _libsbol.OwnedSequence_next(self)
def __next__(self):
return _libsbol.OwnedSequence___next__(self)
def __len__(self):
return _libsbol.OwnedSequence___len__(self)
[docs] def createRange(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedSequence_createRange(self, uri)
val.thisown = False
return val
[docs] def getRange(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedSequence_getRange(self, *args)
[docs] def createCut(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedSequence_createCut(self, uri)
val.thisown = False
return val
[docs] def getCut(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedSequence_getCut(self, *args)
[docs] def createGenericLocation(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedSequence_createGenericLocation(self, uri)
val.thisown = False
return val
[docs] def getGenericLocation(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedSequence_getGenericLocation(self, *args)
def __getitem__(self, *args):
return _libsbol.OwnedSequence___getitem__(self, *args)
def __setitem__(self, uri, py_obj):
return _libsbol.OwnedSequence___setitem__(self, uri, py_obj)
__swig_destroy__ = _libsbol.delete_OwnedSequence
__del__ = lambda self: None
OwnedSequence_swigregister = _libsbol.OwnedSequence_swigregister
OwnedSequence_swigregister(OwnedSequence)
class ModelVector(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, ModelVector, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, ModelVector, name)
__repr__ = _swig_repr
def iterator(self):
return _libsbol.ModelVector_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self):
return _libsbol.ModelVector___nonzero__(self)
def __bool__(self):
return _libsbol.ModelVector___bool__(self)
def __len__(self):
return _libsbol.ModelVector___len__(self)
def __getslice__(self, i, j):
return _libsbol.ModelVector___getslice__(self, i, j)
def __setslice__(self, *args):
return _libsbol.ModelVector___setslice__(self, *args)
def __delslice__(self, i, j):
return _libsbol.ModelVector___delslice__(self, i, j)
def __delitem__(self, *args):
return _libsbol.ModelVector___delitem__(self, *args)
def __getitem__(self, *args):
return _libsbol.ModelVector___getitem__(self, *args)
def __setitem__(self, *args):
return _libsbol.ModelVector___setitem__(self, *args)
def pop(self):
return _libsbol.ModelVector_pop(self)
def append(self, x):
return _libsbol.ModelVector_append(self, x)
def empty(self):
return _libsbol.ModelVector_empty(self)
def size(self):
return _libsbol.ModelVector_size(self)
def swap(self, v):
return _libsbol.ModelVector_swap(self, v)
def begin(self):
return _libsbol.ModelVector_begin(self)
def end(self):
return _libsbol.ModelVector_end(self)
def rbegin(self):
return _libsbol.ModelVector_rbegin(self)
def rend(self):
return _libsbol.ModelVector_rend(self)
def clear(self):
return _libsbol.ModelVector_clear(self)
def get_allocator(self):
return _libsbol.ModelVector_get_allocator(self)
def pop_back(self):
return _libsbol.ModelVector_pop_back(self)
def erase(self, *args):
return _libsbol.ModelVector_erase(self, *args)
def __init__(self, *args):
this = _libsbol.new_ModelVector(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def push_back(self, x):
return _libsbol.ModelVector_push_back(self, x)
def front(self):
return _libsbol.ModelVector_front(self)
def back(self):
return _libsbol.ModelVector_back(self)
def assign(self, n, x):
return _libsbol.ModelVector_assign(self, n, x)
def resize(self, *args):
return _libsbol.ModelVector_resize(self, *args)
def insert(self, *args):
return _libsbol.ModelVector_insert(self, *args)
def reserve(self, n):
return _libsbol.ModelVector_reserve(self, n)
def capacity(self):
return _libsbol.ModelVector_capacity(self)
__swig_destroy__ = _libsbol.delete_ModelVector
__del__ = lambda self: None
ModelVector_swigregister = _libsbol.ModelVector_swigregister
ModelVector_swigregister(ModelVector)
[docs]class ModelProperty(_object):
"""
Member properties of all SBOL objects are defined using a Property object.
The Property class provides a generic interface for accessing SBOL objects. At a
low level, the Property class converts SBOL data structures into RDF triples.
templateparam
-------------
* `The` :
SBOL specification currently supports string, URI, and integer literal
values.
"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, ModelProperty, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, ModelProperty, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Parameters
----------
* `type_uri` :
An RDF hash URI for this property, consisting of a namespace followed by an
identifier. For example, Properties of SBOLObjects use URIs of the form
http://sbols.org/v2#somePropertyName, where the identifier somePropertyName
determines the appearance of XML nodes in an SBOL file. Alternatively,
annotations in a custom namespace can be provided using a similarly formed
hash URI in another namespace.
* `property_owner` :
All Property objects must have a pointer back to its parent SBOLObject of
which it is a member
* `initial_value` :
The initial value of the Property
* `validation_rules` :
A vector of externally defined ValidationRules. The vector contains pointers
to functions which correspond to the validation rules listed in the appendix
of the formal SBOL specification document. ValidationRules are automatically
checked every time a setter or adder method is called and when Documents are
read and written.
"""
this = _libsbol.new_ModelProperty(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete_ModelProperty
__del__ = lambda self: None
[docs] def getTypeURI(self):
"""
Returns
-------
The uniform resource identifier that describes the RDF-type of this SBOL Object
"""
return _libsbol.ModelProperty_getTypeURI(self)
[docs] def getOwner(self):
"""
"""
return _libsbol.ModelProperty_getOwner(self)
[docs] def set(self, *args):
"""
Basic setter for SBOL Property.
Parameters
----------
* `new_value` :
A new integer value for the property, which is converted to a raw string
during serialization.
"""
val = _libsbol.ModelProperty_set(self, *args)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, new_value):
"""
Appends the new value to a list of values, for properties that allow it.
Parameters
----------
* `new_value` :
A new string which will be added to a list of values.
"""
val = _libsbol.ModelProperty_add(self, new_value)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def remove(self, index=0):
"""
Remove a Property from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.ModelProperty_remove(self, index)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.ModelProperty_clear(self)
[docs] def write(self):
"""
"""
return _libsbol.ModelProperty_write(self)
def find(self, query):
return _libsbol.ModelProperty_find(self, query)
def getLowerBound(self):
return _libsbol.ModelProperty_getLowerBound(self)
def getUpperBound(self):
return _libsbol.ModelProperty_getUpperBound(self)
[docs] def validate(self, arg=None):
"""
"""
return _libsbol.ModelProperty_validate(self, arg)
def copy(self, target_property):
return _libsbol.ModelProperty_copy(self, target_property)
__swig_setmethods__["python_iter"] = _libsbol.ModelProperty_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.ModelProperty_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.ModelProperty_python_iter_get, _libsbol.ModelProperty_python_iter_set)
def addValidationRule(self, *args):
return _libsbol.ModelProperty_addValidationRule(self, *args)
ModelProperty_swigregister = _libsbol.ModelProperty_swigregister
ModelProperty_swigregister(ModelProperty)
[docs]class OwnedModel(ModelProperty):
"""
A container property that contains child objects.
Creates a composition out of two or more classes. In the SBOL specification,
compositional relationships are indicated in class diagrams by arrows with black
diamonds. A compositional relationship means that deleting the parent object
will delete the child objects, and adding the parent object to a Document will
also add the child object. Owned objects are stored in arbitrary order.
templateparam
-------------
* `SBOLClass` :
The type of child SBOL object contained by this Property
"""
__swig_setmethods__ = {}
for _s in [ModelProperty]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, OwnedModel, name, value)
__swig_getmethods__ = {}
for _s in [ModelProperty]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, OwnedModel, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
"""
this = _libsbol.new_OwnedModel(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
[docs] def set(self, sbol_obj):
"""
Basic setter for OwnedObject SBOL IntProperty.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Assigns a child object to
this OwnedObject container property. This method always overwrites the first
SBOLObject in the container. appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
* `sbol_obj` :
The child object Sets the first object in the container
"""
val = _libsbol.OwnedModel_set(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, sbol_obj):
"""
Appends the new value to a list of values, for properties that allow it.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Adds a child object to the
parent object. This method always appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
"""
val = _libsbol.OwnedModel_add(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def get(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedModel_get(self, *args)
[docs] def getAll(self):
"""
Retrieve a vector of objects from the OwnedObject.
"""
val = _libsbol.OwnedModel_getAll(self)
val = list(val)
return val
[docs] def remove(self, *args):
"""
Remove an object from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.OwnedModel_remove(self, *args)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.OwnedModel_clear(self)
[docs] def create(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedModel_create(self, uri)
val.thisown = False
return val
def define(self, definition_object):
return _libsbol.OwnedModel_define(self, definition_object)
def find(self, uri):
return _libsbol.OwnedModel_find(self, uri)
__swig_setmethods__["python_iter"] = _libsbol.OwnedModel_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.OwnedModel_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.OwnedModel_python_iter_get, _libsbol.OwnedModel_python_iter_set)
def __iter__(self):
return _libsbol.OwnedModel___iter__(self)
def next(self):
return _libsbol.OwnedModel_next(self)
def __next__(self):
return _libsbol.OwnedModel___next__(self)
def __len__(self):
return _libsbol.OwnedModel___len__(self)
[docs] def createRange(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedModel_createRange(self, uri)
val.thisown = False
return val
[docs] def getRange(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedModel_getRange(self, *args)
[docs] def createCut(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedModel_createCut(self, uri)
val.thisown = False
return val
[docs] def getCut(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedModel_getCut(self, *args)
[docs] def createGenericLocation(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedModel_createGenericLocation(self, uri)
val.thisown = False
return val
[docs] def getGenericLocation(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedModel_getGenericLocation(self, *args)
def __getitem__(self, *args):
return _libsbol.OwnedModel___getitem__(self, *args)
def __setitem__(self, uri, py_obj):
return _libsbol.OwnedModel___setitem__(self, uri, py_obj)
__swig_destroy__ = _libsbol.delete_OwnedModel
__del__ = lambda self: None
OwnedModel_swigregister = _libsbol.OwnedModel_swigregister
OwnedModel_swigregister(OwnedModel)
class CollectionVector(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, CollectionVector, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, CollectionVector, name)
__repr__ = _swig_repr
def iterator(self):
return _libsbol.CollectionVector_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self):
return _libsbol.CollectionVector___nonzero__(self)
def __bool__(self):
return _libsbol.CollectionVector___bool__(self)
def __len__(self):
return _libsbol.CollectionVector___len__(self)
def __getslice__(self, i, j):
return _libsbol.CollectionVector___getslice__(self, i, j)
def __setslice__(self, *args):
return _libsbol.CollectionVector___setslice__(self, *args)
def __delslice__(self, i, j):
return _libsbol.CollectionVector___delslice__(self, i, j)
def __delitem__(self, *args):
return _libsbol.CollectionVector___delitem__(self, *args)
def __getitem__(self, *args):
return _libsbol.CollectionVector___getitem__(self, *args)
def __setitem__(self, *args):
return _libsbol.CollectionVector___setitem__(self, *args)
def pop(self):
return _libsbol.CollectionVector_pop(self)
def append(self, x):
return _libsbol.CollectionVector_append(self, x)
def empty(self):
return _libsbol.CollectionVector_empty(self)
def size(self):
return _libsbol.CollectionVector_size(self)
def swap(self, v):
return _libsbol.CollectionVector_swap(self, v)
def begin(self):
return _libsbol.CollectionVector_begin(self)
def end(self):
return _libsbol.CollectionVector_end(self)
def rbegin(self):
return _libsbol.CollectionVector_rbegin(self)
def rend(self):
return _libsbol.CollectionVector_rend(self)
def clear(self):
return _libsbol.CollectionVector_clear(self)
def get_allocator(self):
return _libsbol.CollectionVector_get_allocator(self)
def pop_back(self):
return _libsbol.CollectionVector_pop_back(self)
def erase(self, *args):
return _libsbol.CollectionVector_erase(self, *args)
def __init__(self, *args):
this = _libsbol.new_CollectionVector(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def push_back(self, x):
return _libsbol.CollectionVector_push_back(self, x)
def front(self):
return _libsbol.CollectionVector_front(self)
def back(self):
return _libsbol.CollectionVector_back(self)
def assign(self, n, x):
return _libsbol.CollectionVector_assign(self, n, x)
def resize(self, *args):
return _libsbol.CollectionVector_resize(self, *args)
def insert(self, *args):
return _libsbol.CollectionVector_insert(self, *args)
def reserve(self, n):
return _libsbol.CollectionVector_reserve(self, n)
def capacity(self):
return _libsbol.CollectionVector_capacity(self)
__swig_destroy__ = _libsbol.delete_CollectionVector
__del__ = lambda self: None
CollectionVector_swigregister = _libsbol.CollectionVector_swigregister
CollectionVector_swigregister(CollectionVector)
[docs]class CollectionProperty(_object):
"""
Member properties of all SBOL objects are defined using a Property object.
The Property class provides a generic interface for accessing SBOL objects. At a
low level, the Property class converts SBOL data structures into RDF triples.
templateparam
-------------
* `The` :
SBOL specification currently supports string, URI, and integer literal
values.
"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, CollectionProperty, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, CollectionProperty, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Parameters
----------
* `type_uri` :
An RDF hash URI for this property, consisting of a namespace followed by an
identifier. For example, Properties of SBOLObjects use URIs of the form
http://sbols.org/v2#somePropertyName, where the identifier somePropertyName
determines the appearance of XML nodes in an SBOL file. Alternatively,
annotations in a custom namespace can be provided using a similarly formed
hash URI in another namespace.
* `property_owner` :
All Property objects must have a pointer back to its parent SBOLObject of
which it is a member
* `initial_value` :
The initial value of the Property
* `validation_rules` :
A vector of externally defined ValidationRules. The vector contains pointers
to functions which correspond to the validation rules listed in the appendix
of the formal SBOL specification document. ValidationRules are automatically
checked every time a setter or adder method is called and when Documents are
read and written.
"""
this = _libsbol.new_CollectionProperty(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete_CollectionProperty
__del__ = lambda self: None
[docs] def getTypeURI(self):
"""
Returns
-------
The uniform resource identifier that describes the RDF-type of this SBOL Object
"""
return _libsbol.CollectionProperty_getTypeURI(self)
[docs] def getOwner(self):
"""
"""
return _libsbol.CollectionProperty_getOwner(self)
[docs] def set(self, *args):
"""
Basic setter for SBOL Property.
Parameters
----------
* `new_value` :
A new integer value for the property, which is converted to a raw string
during serialization.
"""
val = _libsbol.CollectionProperty_set(self, *args)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, new_value):
"""
Appends the new value to a list of values, for properties that allow it.
Parameters
----------
* `new_value` :
A new string which will be added to a list of values.
"""
val = _libsbol.CollectionProperty_add(self, new_value)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def remove(self, index=0):
"""
Remove a Property from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.CollectionProperty_remove(self, index)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.CollectionProperty_clear(self)
[docs] def write(self):
"""
"""
return _libsbol.CollectionProperty_write(self)
def find(self, query):
return _libsbol.CollectionProperty_find(self, query)
def getLowerBound(self):
return _libsbol.CollectionProperty_getLowerBound(self)
def getUpperBound(self):
return _libsbol.CollectionProperty_getUpperBound(self)
[docs] def validate(self, arg=None):
"""
"""
return _libsbol.CollectionProperty_validate(self, arg)
def copy(self, target_property):
return _libsbol.CollectionProperty_copy(self, target_property)
__swig_setmethods__["python_iter"] = _libsbol.CollectionProperty_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.CollectionProperty_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.CollectionProperty_python_iter_get, _libsbol.CollectionProperty_python_iter_set)
def addValidationRule(self, *args):
return _libsbol.CollectionProperty_addValidationRule(self, *args)
CollectionProperty_swigregister = _libsbol.CollectionProperty_swigregister
CollectionProperty_swigregister(CollectionProperty)
[docs]class OwnedCollection(CollectionProperty):
"""
A container property that contains child objects.
Creates a composition out of two or more classes. In the SBOL specification,
compositional relationships are indicated in class diagrams by arrows with black
diamonds. A compositional relationship means that deleting the parent object
will delete the child objects, and adding the parent object to a Document will
also add the child object. Owned objects are stored in arbitrary order.
templateparam
-------------
* `SBOLClass` :
The type of child SBOL object contained by this Property
"""
__swig_setmethods__ = {}
for _s in [CollectionProperty]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, OwnedCollection, name, value)
__swig_getmethods__ = {}
for _s in [CollectionProperty]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, OwnedCollection, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
"""
this = _libsbol.new_OwnedCollection(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
[docs] def set(self, sbol_obj):
"""
Basic setter for OwnedObject SBOL IntProperty.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Assigns a child object to
this OwnedObject container property. This method always overwrites the first
SBOLObject in the container. appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
* `sbol_obj` :
The child object Sets the first object in the container
"""
val = _libsbol.OwnedCollection_set(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, sbol_obj):
"""
Appends the new value to a list of values, for properties that allow it.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Adds a child object to the
parent object. This method always appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
"""
val = _libsbol.OwnedCollection_add(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def get(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedCollection_get(self, *args)
[docs] def getAll(self):
"""
Retrieve a vector of objects from the OwnedObject.
"""
val = _libsbol.OwnedCollection_getAll(self)
val = list(val)
return val
[docs] def remove(self, *args):
"""
Remove an object from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.OwnedCollection_remove(self, *args)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.OwnedCollection_clear(self)
[docs] def create(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedCollection_create(self, uri)
val.thisown = False
return val
def define(self, definition_object):
return _libsbol.OwnedCollection_define(self, definition_object)
def find(self, uri):
return _libsbol.OwnedCollection_find(self, uri)
__swig_setmethods__["python_iter"] = _libsbol.OwnedCollection_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.OwnedCollection_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.OwnedCollection_python_iter_get, _libsbol.OwnedCollection_python_iter_set)
def __iter__(self):
return _libsbol.OwnedCollection___iter__(self)
def next(self):
return _libsbol.OwnedCollection_next(self)
def __next__(self):
return _libsbol.OwnedCollection___next__(self)
def __len__(self):
return _libsbol.OwnedCollection___len__(self)
[docs] def createRange(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedCollection_createRange(self, uri)
val.thisown = False
return val
[docs] def getRange(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedCollection_getRange(self, *args)
[docs] def createCut(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedCollection_createCut(self, uri)
val.thisown = False
return val
[docs] def getCut(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedCollection_getCut(self, *args)
[docs] def createGenericLocation(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedCollection_createGenericLocation(self, uri)
val.thisown = False
return val
[docs] def getGenericLocation(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedCollection_getGenericLocation(self, *args)
def __getitem__(self, *args):
return _libsbol.OwnedCollection___getitem__(self, *args)
def __setitem__(self, uri, py_obj):
return _libsbol.OwnedCollection___setitem__(self, uri, py_obj)
__swig_destroy__ = _libsbol.delete_OwnedCollection
__del__ = lambda self: None
OwnedCollection_swigregister = _libsbol.OwnedCollection_swigregister
OwnedCollection_swigregister(OwnedCollection)
class ActivityVector(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, ActivityVector, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, ActivityVector, name)
__repr__ = _swig_repr
def iterator(self):
return _libsbol.ActivityVector_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self):
return _libsbol.ActivityVector___nonzero__(self)
def __bool__(self):
return _libsbol.ActivityVector___bool__(self)
def __len__(self):
return _libsbol.ActivityVector___len__(self)
def __getslice__(self, i, j):
return _libsbol.ActivityVector___getslice__(self, i, j)
def __setslice__(self, *args):
return _libsbol.ActivityVector___setslice__(self, *args)
def __delslice__(self, i, j):
return _libsbol.ActivityVector___delslice__(self, i, j)
def __delitem__(self, *args):
return _libsbol.ActivityVector___delitem__(self, *args)
def __getitem__(self, *args):
return _libsbol.ActivityVector___getitem__(self, *args)
def __setitem__(self, *args):
return _libsbol.ActivityVector___setitem__(self, *args)
def pop(self):
return _libsbol.ActivityVector_pop(self)
def append(self, x):
return _libsbol.ActivityVector_append(self, x)
def empty(self):
return _libsbol.ActivityVector_empty(self)
def size(self):
return _libsbol.ActivityVector_size(self)
def swap(self, v):
return _libsbol.ActivityVector_swap(self, v)
def begin(self):
return _libsbol.ActivityVector_begin(self)
def end(self):
return _libsbol.ActivityVector_end(self)
def rbegin(self):
return _libsbol.ActivityVector_rbegin(self)
def rend(self):
return _libsbol.ActivityVector_rend(self)
def clear(self):
return _libsbol.ActivityVector_clear(self)
def get_allocator(self):
return _libsbol.ActivityVector_get_allocator(self)
def pop_back(self):
return _libsbol.ActivityVector_pop_back(self)
def erase(self, *args):
return _libsbol.ActivityVector_erase(self, *args)
def __init__(self, *args):
this = _libsbol.new_ActivityVector(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def push_back(self, x):
return _libsbol.ActivityVector_push_back(self, x)
def front(self):
return _libsbol.ActivityVector_front(self)
def back(self):
return _libsbol.ActivityVector_back(self)
def assign(self, n, x):
return _libsbol.ActivityVector_assign(self, n, x)
def resize(self, *args):
return _libsbol.ActivityVector_resize(self, *args)
def insert(self, *args):
return _libsbol.ActivityVector_insert(self, *args)
def reserve(self, n):
return _libsbol.ActivityVector_reserve(self, n)
def capacity(self):
return _libsbol.ActivityVector_capacity(self)
__swig_destroy__ = _libsbol.delete_ActivityVector
__del__ = lambda self: None
ActivityVector_swigregister = _libsbol.ActivityVector_swigregister
ActivityVector_swigregister(ActivityVector)
[docs]class ActivityProperty(_object):
"""
Member properties of all SBOL objects are defined using a Property object.
The Property class provides a generic interface for accessing SBOL objects. At a
low level, the Property class converts SBOL data structures into RDF triples.
templateparam
-------------
* `The` :
SBOL specification currently supports string, URI, and integer literal
values.
"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, ActivityProperty, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, ActivityProperty, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Parameters
----------
* `type_uri` :
An RDF hash URI for this property, consisting of a namespace followed by an
identifier. For example, Properties of SBOLObjects use URIs of the form
http://sbols.org/v2#somePropertyName, where the identifier somePropertyName
determines the appearance of XML nodes in an SBOL file. Alternatively,
annotations in a custom namespace can be provided using a similarly formed
hash URI in another namespace.
* `property_owner` :
All Property objects must have a pointer back to its parent SBOLObject of
which it is a member
* `initial_value` :
The initial value of the Property
* `validation_rules` :
A vector of externally defined ValidationRules. The vector contains pointers
to functions which correspond to the validation rules listed in the appendix
of the formal SBOL specification document. ValidationRules are automatically
checked every time a setter or adder method is called and when Documents are
read and written.
"""
this = _libsbol.new_ActivityProperty(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete_ActivityProperty
__del__ = lambda self: None
[docs] def getTypeURI(self):
"""
Returns
-------
The uniform resource identifier that describes the RDF-type of this SBOL Object
"""
return _libsbol.ActivityProperty_getTypeURI(self)
[docs] def getOwner(self):
"""
"""
return _libsbol.ActivityProperty_getOwner(self)
[docs] def set(self, *args):
"""
Basic setter for SBOL Property.
Parameters
----------
* `new_value` :
A new integer value for the property, which is converted to a raw string
during serialization.
"""
val = _libsbol.ActivityProperty_set(self, *args)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, new_value):
"""
Appends the new value to a list of values, for properties that allow it.
Parameters
----------
* `new_value` :
A new string which will be added to a list of values.
"""
val = _libsbol.ActivityProperty_add(self, new_value)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def remove(self, index=0):
"""
Remove a Property from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.ActivityProperty_remove(self, index)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.ActivityProperty_clear(self)
[docs] def write(self):
"""
"""
return _libsbol.ActivityProperty_write(self)
def find(self, query):
return _libsbol.ActivityProperty_find(self, query)
def getLowerBound(self):
return _libsbol.ActivityProperty_getLowerBound(self)
def getUpperBound(self):
return _libsbol.ActivityProperty_getUpperBound(self)
[docs] def validate(self, arg=None):
"""
"""
return _libsbol.ActivityProperty_validate(self, arg)
def copy(self, target_property):
return _libsbol.ActivityProperty_copy(self, target_property)
__swig_setmethods__["python_iter"] = _libsbol.ActivityProperty_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.ActivityProperty_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.ActivityProperty_python_iter_get, _libsbol.ActivityProperty_python_iter_set)
def addValidationRule(self, *args):
return _libsbol.ActivityProperty_addValidationRule(self, *args)
ActivityProperty_swigregister = _libsbol.ActivityProperty_swigregister
ActivityProperty_swigregister(ActivityProperty)
[docs]class OwnedActivity(ActivityProperty):
"""
A container property that contains child objects.
Creates a composition out of two or more classes. In the SBOL specification,
compositional relationships are indicated in class diagrams by arrows with black
diamonds. A compositional relationship means that deleting the parent object
will delete the child objects, and adding the parent object to a Document will
also add the child object. Owned objects are stored in arbitrary order.
templateparam
-------------
* `SBOLClass` :
The type of child SBOL object contained by this Property
"""
__swig_setmethods__ = {}
for _s in [ActivityProperty]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, OwnedActivity, name, value)
__swig_getmethods__ = {}
for _s in [ActivityProperty]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, OwnedActivity, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
"""
this = _libsbol.new_OwnedActivity(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
[docs] def set(self, sbol_obj):
"""
Basic setter for OwnedObject SBOL IntProperty.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Assigns a child object to
this OwnedObject container property. This method always overwrites the first
SBOLObject in the container. appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
* `sbol_obj` :
The child object Sets the first object in the container
"""
val = _libsbol.OwnedActivity_set(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, sbol_obj):
"""
Appends the new value to a list of values, for properties that allow it.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Adds a child object to the
parent object. This method always appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
"""
val = _libsbol.OwnedActivity_add(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def get(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedActivity_get(self, *args)
[docs] def getAll(self):
"""
Retrieve a vector of objects from the OwnedObject.
"""
val = _libsbol.OwnedActivity_getAll(self)
val = list(val)
return val
[docs] def remove(self, *args):
"""
Remove an object from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.OwnedActivity_remove(self, *args)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.OwnedActivity_clear(self)
[docs] def create(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedActivity_create(self, uri)
val.thisown = False
return val
def define(self, definition_object):
return _libsbol.OwnedActivity_define(self, definition_object)
def find(self, uri):
return _libsbol.OwnedActivity_find(self, uri)
__swig_setmethods__["python_iter"] = _libsbol.OwnedActivity_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.OwnedActivity_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.OwnedActivity_python_iter_get, _libsbol.OwnedActivity_python_iter_set)
def __iter__(self):
return _libsbol.OwnedActivity___iter__(self)
def next(self):
return _libsbol.OwnedActivity_next(self)
def __next__(self):
return _libsbol.OwnedActivity___next__(self)
def __len__(self):
return _libsbol.OwnedActivity___len__(self)
[docs] def createRange(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedActivity_createRange(self, uri)
val.thisown = False
return val
[docs] def getRange(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedActivity_getRange(self, *args)
[docs] def createCut(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedActivity_createCut(self, uri)
val.thisown = False
return val
[docs] def getCut(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedActivity_getCut(self, *args)
[docs] def createGenericLocation(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedActivity_createGenericLocation(self, uri)
val.thisown = False
return val
[docs] def getGenericLocation(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedActivity_getGenericLocation(self, *args)
def __getitem__(self, *args):
return _libsbol.OwnedActivity___getitem__(self, *args)
def __setitem__(self, uri, py_obj):
return _libsbol.OwnedActivity___setitem__(self, uri, py_obj)
__swig_destroy__ = _libsbol.delete_OwnedActivity
__del__ = lambda self: None
OwnedActivity_swigregister = _libsbol.OwnedActivity_swigregister
OwnedActivity_swigregister(OwnedActivity)
class PlanVector(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, PlanVector, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, PlanVector, name)
__repr__ = _swig_repr
def iterator(self):
return _libsbol.PlanVector_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self):
return _libsbol.PlanVector___nonzero__(self)
def __bool__(self):
return _libsbol.PlanVector___bool__(self)
def __len__(self):
return _libsbol.PlanVector___len__(self)
def __getslice__(self, i, j):
return _libsbol.PlanVector___getslice__(self, i, j)
def __setslice__(self, *args):
return _libsbol.PlanVector___setslice__(self, *args)
def __delslice__(self, i, j):
return _libsbol.PlanVector___delslice__(self, i, j)
def __delitem__(self, *args):
return _libsbol.PlanVector___delitem__(self, *args)
def __getitem__(self, *args):
return _libsbol.PlanVector___getitem__(self, *args)
def __setitem__(self, *args):
return _libsbol.PlanVector___setitem__(self, *args)
def pop(self):
return _libsbol.PlanVector_pop(self)
def append(self, x):
return _libsbol.PlanVector_append(self, x)
def empty(self):
return _libsbol.PlanVector_empty(self)
def size(self):
return _libsbol.PlanVector_size(self)
def swap(self, v):
return _libsbol.PlanVector_swap(self, v)
def begin(self):
return _libsbol.PlanVector_begin(self)
def end(self):
return _libsbol.PlanVector_end(self)
def rbegin(self):
return _libsbol.PlanVector_rbegin(self)
def rend(self):
return _libsbol.PlanVector_rend(self)
def clear(self):
return _libsbol.PlanVector_clear(self)
def get_allocator(self):
return _libsbol.PlanVector_get_allocator(self)
def pop_back(self):
return _libsbol.PlanVector_pop_back(self)
def erase(self, *args):
return _libsbol.PlanVector_erase(self, *args)
def __init__(self, *args):
this = _libsbol.new_PlanVector(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def push_back(self, x):
return _libsbol.PlanVector_push_back(self, x)
def front(self):
return _libsbol.PlanVector_front(self)
def back(self):
return _libsbol.PlanVector_back(self)
def assign(self, n, x):
return _libsbol.PlanVector_assign(self, n, x)
def resize(self, *args):
return _libsbol.PlanVector_resize(self, *args)
def insert(self, *args):
return _libsbol.PlanVector_insert(self, *args)
def reserve(self, n):
return _libsbol.PlanVector_reserve(self, n)
def capacity(self):
return _libsbol.PlanVector_capacity(self)
__swig_destroy__ = _libsbol.delete_PlanVector
__del__ = lambda self: None
PlanVector_swigregister = _libsbol.PlanVector_swigregister
PlanVector_swigregister(PlanVector)
[docs]class PlanProperty(_object):
"""
Member properties of all SBOL objects are defined using a Property object.
The Property class provides a generic interface for accessing SBOL objects. At a
low level, the Property class converts SBOL data structures into RDF triples.
templateparam
-------------
* `The` :
SBOL specification currently supports string, URI, and integer literal
values.
"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, PlanProperty, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, PlanProperty, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Parameters
----------
* `type_uri` :
An RDF hash URI for this property, consisting of a namespace followed by an
identifier. For example, Properties of SBOLObjects use URIs of the form
http://sbols.org/v2#somePropertyName, where the identifier somePropertyName
determines the appearance of XML nodes in an SBOL file. Alternatively,
annotations in a custom namespace can be provided using a similarly formed
hash URI in another namespace.
* `property_owner` :
All Property objects must have a pointer back to its parent SBOLObject of
which it is a member
* `initial_value` :
The initial value of the Property
* `validation_rules` :
A vector of externally defined ValidationRules. The vector contains pointers
to functions which correspond to the validation rules listed in the appendix
of the formal SBOL specification document. ValidationRules are automatically
checked every time a setter or adder method is called and when Documents are
read and written.
"""
this = _libsbol.new_PlanProperty(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete_PlanProperty
__del__ = lambda self: None
[docs] def getTypeURI(self):
"""
Returns
-------
The uniform resource identifier that describes the RDF-type of this SBOL Object
"""
return _libsbol.PlanProperty_getTypeURI(self)
[docs] def getOwner(self):
"""
"""
return _libsbol.PlanProperty_getOwner(self)
[docs] def set(self, *args):
"""
Basic setter for SBOL Property.
Parameters
----------
* `new_value` :
A new integer value for the property, which is converted to a raw string
during serialization.
"""
val = _libsbol.PlanProperty_set(self, *args)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, new_value):
"""
Appends the new value to a list of values, for properties that allow it.
Parameters
----------
* `new_value` :
A new string which will be added to a list of values.
"""
val = _libsbol.PlanProperty_add(self, new_value)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def remove(self, index=0):
"""
Remove a Property from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.PlanProperty_remove(self, index)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.PlanProperty_clear(self)
[docs] def write(self):
"""
"""
return _libsbol.PlanProperty_write(self)
def find(self, query):
return _libsbol.PlanProperty_find(self, query)
def getLowerBound(self):
return _libsbol.PlanProperty_getLowerBound(self)
def getUpperBound(self):
return _libsbol.PlanProperty_getUpperBound(self)
[docs] def validate(self, arg=None):
"""
"""
return _libsbol.PlanProperty_validate(self, arg)
def copy(self, target_property):
return _libsbol.PlanProperty_copy(self, target_property)
__swig_setmethods__["python_iter"] = _libsbol.PlanProperty_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.PlanProperty_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.PlanProperty_python_iter_get, _libsbol.PlanProperty_python_iter_set)
def addValidationRule(self, *args):
return _libsbol.PlanProperty_addValidationRule(self, *args)
PlanProperty_swigregister = _libsbol.PlanProperty_swigregister
PlanProperty_swigregister(PlanProperty)
[docs]class OwnedPlan(PlanProperty):
"""
A container property that contains child objects.
Creates a composition out of two or more classes. In the SBOL specification,
compositional relationships are indicated in class diagrams by arrows with black
diamonds. A compositional relationship means that deleting the parent object
will delete the child objects, and adding the parent object to a Document will
also add the child object. Owned objects are stored in arbitrary order.
templateparam
-------------
* `SBOLClass` :
The type of child SBOL object contained by this Property
"""
__swig_setmethods__ = {}
for _s in [PlanProperty]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, OwnedPlan, name, value)
__swig_getmethods__ = {}
for _s in [PlanProperty]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, OwnedPlan, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
"""
this = _libsbol.new_OwnedPlan(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
[docs] def set(self, sbol_obj):
"""
Basic setter for OwnedObject SBOL IntProperty.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Assigns a child object to
this OwnedObject container property. This method always overwrites the first
SBOLObject in the container. appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
* `sbol_obj` :
The child object Sets the first object in the container
"""
val = _libsbol.OwnedPlan_set(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, sbol_obj):
"""
Appends the new value to a list of values, for properties that allow it.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Adds a child object to the
parent object. This method always appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
"""
val = _libsbol.OwnedPlan_add(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def get(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedPlan_get(self, *args)
[docs] def getAll(self):
"""
Retrieve a vector of objects from the OwnedObject.
"""
val = _libsbol.OwnedPlan_getAll(self)
val = list(val)
return val
[docs] def remove(self, *args):
"""
Remove an object from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.OwnedPlan_remove(self, *args)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.OwnedPlan_clear(self)
[docs] def create(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedPlan_create(self, uri)
val.thisown = False
return val
def define(self, definition_object):
return _libsbol.OwnedPlan_define(self, definition_object)
def find(self, uri):
return _libsbol.OwnedPlan_find(self, uri)
__swig_setmethods__["python_iter"] = _libsbol.OwnedPlan_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.OwnedPlan_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.OwnedPlan_python_iter_get, _libsbol.OwnedPlan_python_iter_set)
def __iter__(self):
return _libsbol.OwnedPlan___iter__(self)
def next(self):
return _libsbol.OwnedPlan_next(self)
def __next__(self):
return _libsbol.OwnedPlan___next__(self)
def __len__(self):
return _libsbol.OwnedPlan___len__(self)
[docs] def createRange(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedPlan_createRange(self, uri)
val.thisown = False
return val
[docs] def getRange(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedPlan_getRange(self, *args)
[docs] def createCut(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedPlan_createCut(self, uri)
val.thisown = False
return val
[docs] def getCut(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedPlan_getCut(self, *args)
[docs] def createGenericLocation(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedPlan_createGenericLocation(self, uri)
val.thisown = False
return val
[docs] def getGenericLocation(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedPlan_getGenericLocation(self, *args)
def __getitem__(self, *args):
return _libsbol.OwnedPlan___getitem__(self, *args)
def __setitem__(self, uri, py_obj):
return _libsbol.OwnedPlan___setitem__(self, uri, py_obj)
__swig_destroy__ = _libsbol.delete_OwnedPlan
__del__ = lambda self: None
OwnedPlan_swigregister = _libsbol.OwnedPlan_swigregister
OwnedPlan_swigregister(OwnedPlan)
class AgentVector(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, AgentVector, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, AgentVector, name)
__repr__ = _swig_repr
def iterator(self):
return _libsbol.AgentVector_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self):
return _libsbol.AgentVector___nonzero__(self)
def __bool__(self):
return _libsbol.AgentVector___bool__(self)
def __len__(self):
return _libsbol.AgentVector___len__(self)
def __getslice__(self, i, j):
return _libsbol.AgentVector___getslice__(self, i, j)
def __setslice__(self, *args):
return _libsbol.AgentVector___setslice__(self, *args)
def __delslice__(self, i, j):
return _libsbol.AgentVector___delslice__(self, i, j)
def __delitem__(self, *args):
return _libsbol.AgentVector___delitem__(self, *args)
def __getitem__(self, *args):
return _libsbol.AgentVector___getitem__(self, *args)
def __setitem__(self, *args):
return _libsbol.AgentVector___setitem__(self, *args)
def pop(self):
return _libsbol.AgentVector_pop(self)
def append(self, x):
return _libsbol.AgentVector_append(self, x)
def empty(self):
return _libsbol.AgentVector_empty(self)
def size(self):
return _libsbol.AgentVector_size(self)
def swap(self, v):
return _libsbol.AgentVector_swap(self, v)
def begin(self):
return _libsbol.AgentVector_begin(self)
def end(self):
return _libsbol.AgentVector_end(self)
def rbegin(self):
return _libsbol.AgentVector_rbegin(self)
def rend(self):
return _libsbol.AgentVector_rend(self)
def clear(self):
return _libsbol.AgentVector_clear(self)
def get_allocator(self):
return _libsbol.AgentVector_get_allocator(self)
def pop_back(self):
return _libsbol.AgentVector_pop_back(self)
def erase(self, *args):
return _libsbol.AgentVector_erase(self, *args)
def __init__(self, *args):
this = _libsbol.new_AgentVector(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def push_back(self, x):
return _libsbol.AgentVector_push_back(self, x)
def front(self):
return _libsbol.AgentVector_front(self)
def back(self):
return _libsbol.AgentVector_back(self)
def assign(self, n, x):
return _libsbol.AgentVector_assign(self, n, x)
def resize(self, *args):
return _libsbol.AgentVector_resize(self, *args)
def insert(self, *args):
return _libsbol.AgentVector_insert(self, *args)
def reserve(self, n):
return _libsbol.AgentVector_reserve(self, n)
def capacity(self):
return _libsbol.AgentVector_capacity(self)
__swig_destroy__ = _libsbol.delete_AgentVector
__del__ = lambda self: None
AgentVector_swigregister = _libsbol.AgentVector_swigregister
AgentVector_swigregister(AgentVector)
[docs]class AgentProperty(_object):
"""
Member properties of all SBOL objects are defined using a Property object.
The Property class provides a generic interface for accessing SBOL objects. At a
low level, the Property class converts SBOL data structures into RDF triples.
templateparam
-------------
* `The` :
SBOL specification currently supports string, URI, and integer literal
values.
"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, AgentProperty, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, AgentProperty, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Parameters
----------
* `type_uri` :
An RDF hash URI for this property, consisting of a namespace followed by an
identifier. For example, Properties of SBOLObjects use URIs of the form
http://sbols.org/v2#somePropertyName, where the identifier somePropertyName
determines the appearance of XML nodes in an SBOL file. Alternatively,
annotations in a custom namespace can be provided using a similarly formed
hash URI in another namespace.
* `property_owner` :
All Property objects must have a pointer back to its parent SBOLObject of
which it is a member
* `initial_value` :
The initial value of the Property
* `validation_rules` :
A vector of externally defined ValidationRules. The vector contains pointers
to functions which correspond to the validation rules listed in the appendix
of the formal SBOL specification document. ValidationRules are automatically
checked every time a setter or adder method is called and when Documents are
read and written.
"""
this = _libsbol.new_AgentProperty(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete_AgentProperty
__del__ = lambda self: None
[docs] def getTypeURI(self):
"""
Returns
-------
The uniform resource identifier that describes the RDF-type of this SBOL Object
"""
return _libsbol.AgentProperty_getTypeURI(self)
[docs] def getOwner(self):
"""
"""
return _libsbol.AgentProperty_getOwner(self)
[docs] def set(self, *args):
"""
Basic setter for SBOL Property.
Parameters
----------
* `new_value` :
A new integer value for the property, which is converted to a raw string
during serialization.
"""
val = _libsbol.AgentProperty_set(self, *args)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, new_value):
"""
Appends the new value to a list of values, for properties that allow it.
Parameters
----------
* `new_value` :
A new string which will be added to a list of values.
"""
val = _libsbol.AgentProperty_add(self, new_value)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def remove(self, index=0):
"""
Remove a Property from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.AgentProperty_remove(self, index)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.AgentProperty_clear(self)
[docs] def write(self):
"""
"""
return _libsbol.AgentProperty_write(self)
def find(self, query):
return _libsbol.AgentProperty_find(self, query)
def getLowerBound(self):
return _libsbol.AgentProperty_getLowerBound(self)
def getUpperBound(self):
return _libsbol.AgentProperty_getUpperBound(self)
[docs] def validate(self, arg=None):
"""
"""
return _libsbol.AgentProperty_validate(self, arg)
def copy(self, target_property):
return _libsbol.AgentProperty_copy(self, target_property)
__swig_setmethods__["python_iter"] = _libsbol.AgentProperty_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.AgentProperty_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.AgentProperty_python_iter_get, _libsbol.AgentProperty_python_iter_set)
def addValidationRule(self, *args):
return _libsbol.AgentProperty_addValidationRule(self, *args)
AgentProperty_swigregister = _libsbol.AgentProperty_swigregister
AgentProperty_swigregister(AgentProperty)
[docs]class OwnedAgent(AgentProperty):
"""
A container property that contains child objects.
Creates a composition out of two or more classes. In the SBOL specification,
compositional relationships are indicated in class diagrams by arrows with black
diamonds. A compositional relationship means that deleting the parent object
will delete the child objects, and adding the parent object to a Document will
also add the child object. Owned objects are stored in arbitrary order.
templateparam
-------------
* `SBOLClass` :
The type of child SBOL object contained by this Property
"""
__swig_setmethods__ = {}
for _s in [AgentProperty]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, OwnedAgent, name, value)
__swig_getmethods__ = {}
for _s in [AgentProperty]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, OwnedAgent, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
"""
this = _libsbol.new_OwnedAgent(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
[docs] def set(self, sbol_obj):
"""
Basic setter for OwnedObject SBOL IntProperty.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Assigns a child object to
this OwnedObject container property. This method always overwrites the first
SBOLObject in the container. appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
* `sbol_obj` :
The child object Sets the first object in the container
"""
val = _libsbol.OwnedAgent_set(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, sbol_obj):
"""
Appends the new value to a list of values, for properties that allow it.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Adds a child object to the
parent object. This method always appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
"""
val = _libsbol.OwnedAgent_add(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def get(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedAgent_get(self, *args)
[docs] def getAll(self):
"""
Retrieve a vector of objects from the OwnedObject.
"""
val = _libsbol.OwnedAgent_getAll(self)
val = list(val)
return val
[docs] def remove(self, *args):
"""
Remove an object from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.OwnedAgent_remove(self, *args)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.OwnedAgent_clear(self)
[docs] def create(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedAgent_create(self, uri)
val.thisown = False
return val
def define(self, definition_object):
return _libsbol.OwnedAgent_define(self, definition_object)
def find(self, uri):
return _libsbol.OwnedAgent_find(self, uri)
__swig_setmethods__["python_iter"] = _libsbol.OwnedAgent_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.OwnedAgent_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.OwnedAgent_python_iter_get, _libsbol.OwnedAgent_python_iter_set)
def __iter__(self):
return _libsbol.OwnedAgent___iter__(self)
def next(self):
return _libsbol.OwnedAgent_next(self)
def __next__(self):
return _libsbol.OwnedAgent___next__(self)
def __len__(self):
return _libsbol.OwnedAgent___len__(self)
[docs] def createRange(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedAgent_createRange(self, uri)
val.thisown = False
return val
[docs] def getRange(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedAgent_getRange(self, *args)
[docs] def createCut(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedAgent_createCut(self, uri)
val.thisown = False
return val
[docs] def getCut(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedAgent_getCut(self, *args)
[docs] def createGenericLocation(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedAgent_createGenericLocation(self, uri)
val.thisown = False
return val
[docs] def getGenericLocation(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedAgent_getGenericLocation(self, *args)
def __getitem__(self, *args):
return _libsbol.OwnedAgent___getitem__(self, *args)
def __setitem__(self, uri, py_obj):
return _libsbol.OwnedAgent___setitem__(self, uri, py_obj)
__swig_destroy__ = _libsbol.delete_OwnedAgent
__del__ = lambda self: None
OwnedAgent_swigregister = _libsbol.OwnedAgent_swigregister
OwnedAgent_swigregister(OwnedAgent)
class AttachmentVector(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, AttachmentVector, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, AttachmentVector, name)
__repr__ = _swig_repr
def iterator(self):
return _libsbol.AttachmentVector_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self):
return _libsbol.AttachmentVector___nonzero__(self)
def __bool__(self):
return _libsbol.AttachmentVector___bool__(self)
def __len__(self):
return _libsbol.AttachmentVector___len__(self)
def __getslice__(self, i, j):
return _libsbol.AttachmentVector___getslice__(self, i, j)
def __setslice__(self, *args):
return _libsbol.AttachmentVector___setslice__(self, *args)
def __delslice__(self, i, j):
return _libsbol.AttachmentVector___delslice__(self, i, j)
def __delitem__(self, *args):
return _libsbol.AttachmentVector___delitem__(self, *args)
def __getitem__(self, *args):
return _libsbol.AttachmentVector___getitem__(self, *args)
def __setitem__(self, *args):
return _libsbol.AttachmentVector___setitem__(self, *args)
def pop(self):
return _libsbol.AttachmentVector_pop(self)
def append(self, x):
return _libsbol.AttachmentVector_append(self, x)
def empty(self):
return _libsbol.AttachmentVector_empty(self)
def size(self):
return _libsbol.AttachmentVector_size(self)
def swap(self, v):
return _libsbol.AttachmentVector_swap(self, v)
def begin(self):
return _libsbol.AttachmentVector_begin(self)
def end(self):
return _libsbol.AttachmentVector_end(self)
def rbegin(self):
return _libsbol.AttachmentVector_rbegin(self)
def rend(self):
return _libsbol.AttachmentVector_rend(self)
def clear(self):
return _libsbol.AttachmentVector_clear(self)
def get_allocator(self):
return _libsbol.AttachmentVector_get_allocator(self)
def pop_back(self):
return _libsbol.AttachmentVector_pop_back(self)
def erase(self, *args):
return _libsbol.AttachmentVector_erase(self, *args)
def __init__(self, *args):
this = _libsbol.new_AttachmentVector(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def push_back(self, x):
return _libsbol.AttachmentVector_push_back(self, x)
def front(self):
return _libsbol.AttachmentVector_front(self)
def back(self):
return _libsbol.AttachmentVector_back(self)
def assign(self, n, x):
return _libsbol.AttachmentVector_assign(self, n, x)
def resize(self, *args):
return _libsbol.AttachmentVector_resize(self, *args)
def insert(self, *args):
return _libsbol.AttachmentVector_insert(self, *args)
def reserve(self, n):
return _libsbol.AttachmentVector_reserve(self, n)
def capacity(self):
return _libsbol.AttachmentVector_capacity(self)
__swig_destroy__ = _libsbol.delete_AttachmentVector
__del__ = lambda self: None
AttachmentVector_swigregister = _libsbol.AttachmentVector_swigregister
AttachmentVector_swigregister(AttachmentVector)
[docs]class AttachmentProperty(_object):
"""
Member properties of all SBOL objects are defined using a Property object.
The Property class provides a generic interface for accessing SBOL objects. At a
low level, the Property class converts SBOL data structures into RDF triples.
templateparam
-------------
* `The` :
SBOL specification currently supports string, URI, and integer literal
values.
"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, AttachmentProperty, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, AttachmentProperty, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Parameters
----------
* `type_uri` :
An RDF hash URI for this property, consisting of a namespace followed by an
identifier. For example, Properties of SBOLObjects use URIs of the form
http://sbols.org/v2#somePropertyName, where the identifier somePropertyName
determines the appearance of XML nodes in an SBOL file. Alternatively,
annotations in a custom namespace can be provided using a similarly formed
hash URI in another namespace.
* `property_owner` :
All Property objects must have a pointer back to its parent SBOLObject of
which it is a member
* `initial_value` :
The initial value of the Property
* `validation_rules` :
A vector of externally defined ValidationRules. The vector contains pointers
to functions which correspond to the validation rules listed in the appendix
of the formal SBOL specification document. ValidationRules are automatically
checked every time a setter or adder method is called and when Documents are
read and written.
"""
this = _libsbol.new_AttachmentProperty(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete_AttachmentProperty
__del__ = lambda self: None
[docs] def getTypeURI(self):
"""
Returns
-------
The uniform resource identifier that describes the RDF-type of this SBOL Object
"""
return _libsbol.AttachmentProperty_getTypeURI(self)
[docs] def getOwner(self):
"""
"""
return _libsbol.AttachmentProperty_getOwner(self)
[docs] def set(self, *args):
"""
Basic setter for SBOL Property.
Parameters
----------
* `new_value` :
A new integer value for the property, which is converted to a raw string
during serialization.
"""
val = _libsbol.AttachmentProperty_set(self, *args)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, new_value):
"""
Appends the new value to a list of values, for properties that allow it.
Parameters
----------
* `new_value` :
A new string which will be added to a list of values.
"""
val = _libsbol.AttachmentProperty_add(self, new_value)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def remove(self, index=0):
"""
Remove a Property from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.AttachmentProperty_remove(self, index)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.AttachmentProperty_clear(self)
[docs] def write(self):
"""
"""
return _libsbol.AttachmentProperty_write(self)
def find(self, query):
return _libsbol.AttachmentProperty_find(self, query)
def getLowerBound(self):
return _libsbol.AttachmentProperty_getLowerBound(self)
def getUpperBound(self):
return _libsbol.AttachmentProperty_getUpperBound(self)
[docs] def validate(self, arg=None):
"""
"""
return _libsbol.AttachmentProperty_validate(self, arg)
def copy(self, target_property):
return _libsbol.AttachmentProperty_copy(self, target_property)
__swig_setmethods__["python_iter"] = _libsbol.AttachmentProperty_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.AttachmentProperty_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.AttachmentProperty_python_iter_get, _libsbol.AttachmentProperty_python_iter_set)
def addValidationRule(self, *args):
return _libsbol.AttachmentProperty_addValidationRule(self, *args)
AttachmentProperty_swigregister = _libsbol.AttachmentProperty_swigregister
AttachmentProperty_swigregister(AttachmentProperty)
[docs]class OwnedAttachment(AttachmentProperty):
"""
A container property that contains child objects.
Creates a composition out of two or more classes. In the SBOL specification,
compositional relationships are indicated in class diagrams by arrows with black
diamonds. A compositional relationship means that deleting the parent object
will delete the child objects, and adding the parent object to a Document will
also add the child object. Owned objects are stored in arbitrary order.
templateparam
-------------
* `SBOLClass` :
The type of child SBOL object contained by this Property
"""
__swig_setmethods__ = {}
for _s in [AttachmentProperty]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, OwnedAttachment, name, value)
__swig_getmethods__ = {}
for _s in [AttachmentProperty]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, OwnedAttachment, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
"""
this = _libsbol.new_OwnedAttachment(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
[docs] def set(self, sbol_obj):
"""
Basic setter for OwnedObject SBOL IntProperty.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Assigns a child object to
this OwnedObject container property. This method always overwrites the first
SBOLObject in the container. appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
* `sbol_obj` :
The child object Sets the first object in the container
"""
val = _libsbol.OwnedAttachment_set(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, sbol_obj):
"""
Appends the new value to a list of values, for properties that allow it.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Adds a child object to the
parent object. This method always appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
"""
val = _libsbol.OwnedAttachment_add(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def get(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedAttachment_get(self, *args)
[docs] def getAll(self):
"""
Retrieve a vector of objects from the OwnedObject.
"""
val = _libsbol.OwnedAttachment_getAll(self)
val = list(val)
return val
[docs] def remove(self, *args):
"""
Remove an object from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.OwnedAttachment_remove(self, *args)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.OwnedAttachment_clear(self)
[docs] def create(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedAttachment_create(self, uri)
val.thisown = False
return val
def define(self, definition_object):
return _libsbol.OwnedAttachment_define(self, definition_object)
def find(self, uri):
return _libsbol.OwnedAttachment_find(self, uri)
__swig_setmethods__["python_iter"] = _libsbol.OwnedAttachment_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.OwnedAttachment_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.OwnedAttachment_python_iter_get, _libsbol.OwnedAttachment_python_iter_set)
def __iter__(self):
return _libsbol.OwnedAttachment___iter__(self)
def next(self):
return _libsbol.OwnedAttachment_next(self)
def __next__(self):
return _libsbol.OwnedAttachment___next__(self)
def __len__(self):
return _libsbol.OwnedAttachment___len__(self)
[docs] def createRange(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedAttachment_createRange(self, uri)
val.thisown = False
return val
[docs] def getRange(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedAttachment_getRange(self, *args)
[docs] def createCut(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedAttachment_createCut(self, uri)
val.thisown = False
return val
[docs] def getCut(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedAttachment_getCut(self, *args)
[docs] def createGenericLocation(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedAttachment_createGenericLocation(self, uri)
val.thisown = False
return val
[docs] def getGenericLocation(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedAttachment_getGenericLocation(self, *args)
def __getitem__(self, *args):
return _libsbol.OwnedAttachment___getitem__(self, *args)
def __setitem__(self, uri, py_obj):
return _libsbol.OwnedAttachment___setitem__(self, uri, py_obj)
__swig_destroy__ = _libsbol.delete_OwnedAttachment
__del__ = lambda self: None
OwnedAttachment_swigregister = _libsbol.OwnedAttachment_swigregister
OwnedAttachment_swigregister(OwnedAttachment)
class ImplementationVector(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, ImplementationVector, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, ImplementationVector, name)
__repr__ = _swig_repr
def iterator(self):
return _libsbol.ImplementationVector_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self):
return _libsbol.ImplementationVector___nonzero__(self)
def __bool__(self):
return _libsbol.ImplementationVector___bool__(self)
def __len__(self):
return _libsbol.ImplementationVector___len__(self)
def __getslice__(self, i, j):
return _libsbol.ImplementationVector___getslice__(self, i, j)
def __setslice__(self, *args):
return _libsbol.ImplementationVector___setslice__(self, *args)
def __delslice__(self, i, j):
return _libsbol.ImplementationVector___delslice__(self, i, j)
def __delitem__(self, *args):
return _libsbol.ImplementationVector___delitem__(self, *args)
def __getitem__(self, *args):
return _libsbol.ImplementationVector___getitem__(self, *args)
def __setitem__(self, *args):
return _libsbol.ImplementationVector___setitem__(self, *args)
def pop(self):
return _libsbol.ImplementationVector_pop(self)
def append(self, x):
return _libsbol.ImplementationVector_append(self, x)
def empty(self):
return _libsbol.ImplementationVector_empty(self)
def size(self):
return _libsbol.ImplementationVector_size(self)
def swap(self, v):
return _libsbol.ImplementationVector_swap(self, v)
def begin(self):
return _libsbol.ImplementationVector_begin(self)
def end(self):
return _libsbol.ImplementationVector_end(self)
def rbegin(self):
return _libsbol.ImplementationVector_rbegin(self)
def rend(self):
return _libsbol.ImplementationVector_rend(self)
def clear(self):
return _libsbol.ImplementationVector_clear(self)
def get_allocator(self):
return _libsbol.ImplementationVector_get_allocator(self)
def pop_back(self):
return _libsbol.ImplementationVector_pop_back(self)
def erase(self, *args):
return _libsbol.ImplementationVector_erase(self, *args)
def __init__(self, *args):
this = _libsbol.new_ImplementationVector(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def push_back(self, x):
return _libsbol.ImplementationVector_push_back(self, x)
def front(self):
return _libsbol.ImplementationVector_front(self)
def back(self):
return _libsbol.ImplementationVector_back(self)
def assign(self, n, x):
return _libsbol.ImplementationVector_assign(self, n, x)
def resize(self, *args):
return _libsbol.ImplementationVector_resize(self, *args)
def insert(self, *args):
return _libsbol.ImplementationVector_insert(self, *args)
def reserve(self, n):
return _libsbol.ImplementationVector_reserve(self, n)
def capacity(self):
return _libsbol.ImplementationVector_capacity(self)
__swig_destroy__ = _libsbol.delete_ImplementationVector
__del__ = lambda self: None
ImplementationVector_swigregister = _libsbol.ImplementationVector_swigregister
ImplementationVector_swigregister(ImplementationVector)
[docs]class ImplementationProperty(_object):
"""
Member properties of all SBOL objects are defined using a Property object.
The Property class provides a generic interface for accessing SBOL objects. At a
low level, the Property class converts SBOL data structures into RDF triples.
templateparam
-------------
* `The` :
SBOL specification currently supports string, URI, and integer literal
values.
"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, ImplementationProperty, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, ImplementationProperty, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Parameters
----------
* `type_uri` :
An RDF hash URI for this property, consisting of a namespace followed by an
identifier. For example, Properties of SBOLObjects use URIs of the form
http://sbols.org/v2#somePropertyName, where the identifier somePropertyName
determines the appearance of XML nodes in an SBOL file. Alternatively,
annotations in a custom namespace can be provided using a similarly formed
hash URI in another namespace.
* `property_owner` :
All Property objects must have a pointer back to its parent SBOLObject of
which it is a member
* `initial_value` :
The initial value of the Property
* `validation_rules` :
A vector of externally defined ValidationRules. The vector contains pointers
to functions which correspond to the validation rules listed in the appendix
of the formal SBOL specification document. ValidationRules are automatically
checked every time a setter or adder method is called and when Documents are
read and written.
"""
this = _libsbol.new_ImplementationProperty(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete_ImplementationProperty
__del__ = lambda self: None
[docs] def getTypeURI(self):
"""
Returns
-------
The uniform resource identifier that describes the RDF-type of this SBOL Object
"""
return _libsbol.ImplementationProperty_getTypeURI(self)
[docs] def getOwner(self):
"""
"""
return _libsbol.ImplementationProperty_getOwner(self)
[docs] def set(self, *args):
"""
Basic setter for SBOL Property.
Parameters
----------
* `new_value` :
A new integer value for the property, which is converted to a raw string
during serialization.
"""
val = _libsbol.ImplementationProperty_set(self, *args)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, new_value):
"""
Appends the new value to a list of values, for properties that allow it.
Parameters
----------
* `new_value` :
A new string which will be added to a list of values.
"""
val = _libsbol.ImplementationProperty_add(self, new_value)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def remove(self, index=0):
"""
Remove a Property from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.ImplementationProperty_remove(self, index)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.ImplementationProperty_clear(self)
[docs] def write(self):
"""
"""
return _libsbol.ImplementationProperty_write(self)
def find(self, query):
return _libsbol.ImplementationProperty_find(self, query)
def getLowerBound(self):
return _libsbol.ImplementationProperty_getLowerBound(self)
def getUpperBound(self):
return _libsbol.ImplementationProperty_getUpperBound(self)
[docs] def validate(self, arg=None):
"""
"""
return _libsbol.ImplementationProperty_validate(self, arg)
def copy(self, target_property):
return _libsbol.ImplementationProperty_copy(self, target_property)
__swig_setmethods__["python_iter"] = _libsbol.ImplementationProperty_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.ImplementationProperty_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.ImplementationProperty_python_iter_get, _libsbol.ImplementationProperty_python_iter_set)
def addValidationRule(self, *args):
return _libsbol.ImplementationProperty_addValidationRule(self, *args)
ImplementationProperty_swigregister = _libsbol.ImplementationProperty_swigregister
ImplementationProperty_swigregister(ImplementationProperty)
[docs]class OwnedImplementation(ImplementationProperty):
"""
A container property that contains child objects.
Creates a composition out of two or more classes. In the SBOL specification,
compositional relationships are indicated in class diagrams by arrows with black
diamonds. A compositional relationship means that deleting the parent object
will delete the child objects, and adding the parent object to a Document will
also add the child object. Owned objects are stored in arbitrary order.
templateparam
-------------
* `SBOLClass` :
The type of child SBOL object contained by this Property
"""
__swig_setmethods__ = {}
for _s in [ImplementationProperty]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, OwnedImplementation, name, value)
__swig_getmethods__ = {}
for _s in [ImplementationProperty]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, OwnedImplementation, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
"""
this = _libsbol.new_OwnedImplementation(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
[docs] def set(self, sbol_obj):
"""
Basic setter for OwnedObject SBOL IntProperty.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Assigns a child object to
this OwnedObject container property. This method always overwrites the first
SBOLObject in the container. appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
* `sbol_obj` :
The child object Sets the first object in the container
"""
val = _libsbol.OwnedImplementation_set(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, sbol_obj):
"""
Appends the new value to a list of values, for properties that allow it.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Adds a child object to the
parent object. This method always appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
"""
val = _libsbol.OwnedImplementation_add(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def get(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedImplementation_get(self, *args)
[docs] def getAll(self):
"""
Retrieve a vector of objects from the OwnedObject.
"""
val = _libsbol.OwnedImplementation_getAll(self)
val = list(val)
return val
[docs] def remove(self, *args):
"""
Remove an object from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.OwnedImplementation_remove(self, *args)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.OwnedImplementation_clear(self)
[docs] def create(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedImplementation_create(self, uri)
val.thisown = False
return val
def define(self, definition_object):
return _libsbol.OwnedImplementation_define(self, definition_object)
def find(self, uri):
return _libsbol.OwnedImplementation_find(self, uri)
__swig_setmethods__["python_iter"] = _libsbol.OwnedImplementation_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.OwnedImplementation_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.OwnedImplementation_python_iter_get, _libsbol.OwnedImplementation_python_iter_set)
def __iter__(self):
return _libsbol.OwnedImplementation___iter__(self)
def next(self):
return _libsbol.OwnedImplementation_next(self)
def __next__(self):
return _libsbol.OwnedImplementation___next__(self)
def __len__(self):
return _libsbol.OwnedImplementation___len__(self)
[docs] def createRange(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedImplementation_createRange(self, uri)
val.thisown = False
return val
[docs] def getRange(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedImplementation_getRange(self, *args)
[docs] def createCut(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedImplementation_createCut(self, uri)
val.thisown = False
return val
[docs] def getCut(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedImplementation_getCut(self, *args)
[docs] def createGenericLocation(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedImplementation_createGenericLocation(self, uri)
val.thisown = False
return val
[docs] def getGenericLocation(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedImplementation_getGenericLocation(self, *args)
def __getitem__(self, *args):
return _libsbol.OwnedImplementation___getitem__(self, *args)
def __setitem__(self, uri, py_obj):
return _libsbol.OwnedImplementation___setitem__(self, uri, py_obj)
__swig_destroy__ = _libsbol.delete_OwnedImplementation
__del__ = lambda self: None
OwnedImplementation_swigregister = _libsbol.OwnedImplementation_swigregister
OwnedImplementation_swigregister(OwnedImplementation)
class CombinatorialDerivationVector(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, CombinatorialDerivationVector, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, CombinatorialDerivationVector, name)
__repr__ = _swig_repr
def iterator(self):
return _libsbol.CombinatorialDerivationVector_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self):
return _libsbol.CombinatorialDerivationVector___nonzero__(self)
def __bool__(self):
return _libsbol.CombinatorialDerivationVector___bool__(self)
def __len__(self):
return _libsbol.CombinatorialDerivationVector___len__(self)
def __getslice__(self, i, j):
return _libsbol.CombinatorialDerivationVector___getslice__(self, i, j)
def __setslice__(self, *args):
return _libsbol.CombinatorialDerivationVector___setslice__(self, *args)
def __delslice__(self, i, j):
return _libsbol.CombinatorialDerivationVector___delslice__(self, i, j)
def __delitem__(self, *args):
return _libsbol.CombinatorialDerivationVector___delitem__(self, *args)
def __getitem__(self, *args):
return _libsbol.CombinatorialDerivationVector___getitem__(self, *args)
def __setitem__(self, *args):
return _libsbol.CombinatorialDerivationVector___setitem__(self, *args)
def pop(self):
return _libsbol.CombinatorialDerivationVector_pop(self)
def append(self, x):
return _libsbol.CombinatorialDerivationVector_append(self, x)
def empty(self):
return _libsbol.CombinatorialDerivationVector_empty(self)
def size(self):
return _libsbol.CombinatorialDerivationVector_size(self)
def swap(self, v):
return _libsbol.CombinatorialDerivationVector_swap(self, v)
def begin(self):
return _libsbol.CombinatorialDerivationVector_begin(self)
def end(self):
return _libsbol.CombinatorialDerivationVector_end(self)
def rbegin(self):
return _libsbol.CombinatorialDerivationVector_rbegin(self)
def rend(self):
return _libsbol.CombinatorialDerivationVector_rend(self)
def clear(self):
return _libsbol.CombinatorialDerivationVector_clear(self)
def get_allocator(self):
return _libsbol.CombinatorialDerivationVector_get_allocator(self)
def pop_back(self):
return _libsbol.CombinatorialDerivationVector_pop_back(self)
def erase(self, *args):
return _libsbol.CombinatorialDerivationVector_erase(self, *args)
def __init__(self, *args):
this = _libsbol.new_CombinatorialDerivationVector(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def push_back(self, x):
return _libsbol.CombinatorialDerivationVector_push_back(self, x)
def front(self):
return _libsbol.CombinatorialDerivationVector_front(self)
def back(self):
return _libsbol.CombinatorialDerivationVector_back(self)
def assign(self, n, x):
return _libsbol.CombinatorialDerivationVector_assign(self, n, x)
def resize(self, *args):
return _libsbol.CombinatorialDerivationVector_resize(self, *args)
def insert(self, *args):
return _libsbol.CombinatorialDerivationVector_insert(self, *args)
def reserve(self, n):
return _libsbol.CombinatorialDerivationVector_reserve(self, n)
def capacity(self):
return _libsbol.CombinatorialDerivationVector_capacity(self)
__swig_destroy__ = _libsbol.delete_CombinatorialDerivationVector
__del__ = lambda self: None
CombinatorialDerivationVector_swigregister = _libsbol.CombinatorialDerivationVector_swigregister
CombinatorialDerivationVector_swigregister(CombinatorialDerivationVector)
[docs]class CombinatorialDerivationProperty(_object):
"""
Member properties of all SBOL objects are defined using a Property object.
The Property class provides a generic interface for accessing SBOL objects. At a
low level, the Property class converts SBOL data structures into RDF triples.
templateparam
-------------
* `The` :
SBOL specification currently supports string, URI, and integer literal
values.
"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, CombinatorialDerivationProperty, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, CombinatorialDerivationProperty, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Parameters
----------
* `type_uri` :
An RDF hash URI for this property, consisting of a namespace followed by an
identifier. For example, Properties of SBOLObjects use URIs of the form
http://sbols.org/v2#somePropertyName, where the identifier somePropertyName
determines the appearance of XML nodes in an SBOL file. Alternatively,
annotations in a custom namespace can be provided using a similarly formed
hash URI in another namespace.
* `property_owner` :
All Property objects must have a pointer back to its parent SBOLObject of
which it is a member
* `initial_value` :
The initial value of the Property
* `validation_rules` :
A vector of externally defined ValidationRules. The vector contains pointers
to functions which correspond to the validation rules listed in the appendix
of the formal SBOL specification document. ValidationRules are automatically
checked every time a setter or adder method is called and when Documents are
read and written.
"""
this = _libsbol.new_CombinatorialDerivationProperty(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete_CombinatorialDerivationProperty
__del__ = lambda self: None
[docs] def getTypeURI(self):
"""
Returns
-------
The uniform resource identifier that describes the RDF-type of this SBOL Object
"""
return _libsbol.CombinatorialDerivationProperty_getTypeURI(self)
[docs] def getOwner(self):
"""
"""
return _libsbol.CombinatorialDerivationProperty_getOwner(self)
[docs] def set(self, *args):
"""
Basic setter for SBOL Property.
Parameters
----------
* `new_value` :
A new integer value for the property, which is converted to a raw string
during serialization.
"""
val = _libsbol.CombinatorialDerivationProperty_set(self, *args)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, new_value):
"""
Appends the new value to a list of values, for properties that allow it.
Parameters
----------
* `new_value` :
A new string which will be added to a list of values.
"""
val = _libsbol.CombinatorialDerivationProperty_add(self, new_value)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def remove(self, index=0):
"""
Remove a Property from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.CombinatorialDerivationProperty_remove(self, index)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.CombinatorialDerivationProperty_clear(self)
[docs] def write(self):
"""
"""
return _libsbol.CombinatorialDerivationProperty_write(self)
def find(self, query):
return _libsbol.CombinatorialDerivationProperty_find(self, query)
def getLowerBound(self):
return _libsbol.CombinatorialDerivationProperty_getLowerBound(self)
def getUpperBound(self):
return _libsbol.CombinatorialDerivationProperty_getUpperBound(self)
[docs] def validate(self, arg=None):
"""
"""
return _libsbol.CombinatorialDerivationProperty_validate(self, arg)
def copy(self, target_property):
return _libsbol.CombinatorialDerivationProperty_copy(self, target_property)
__swig_setmethods__["python_iter"] = _libsbol.CombinatorialDerivationProperty_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.CombinatorialDerivationProperty_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.CombinatorialDerivationProperty_python_iter_get, _libsbol.CombinatorialDerivationProperty_python_iter_set)
def addValidationRule(self, *args):
return _libsbol.CombinatorialDerivationProperty_addValidationRule(self, *args)
CombinatorialDerivationProperty_swigregister = _libsbol.CombinatorialDerivationProperty_swigregister
CombinatorialDerivationProperty_swigregister(CombinatorialDerivationProperty)
[docs]class OwnedCombinatorialDerivation(CombinatorialDerivationProperty):
"""
A container property that contains child objects.
Creates a composition out of two or more classes. In the SBOL specification,
compositional relationships are indicated in class diagrams by arrows with black
diamonds. A compositional relationship means that deleting the parent object
will delete the child objects, and adding the parent object to a Document will
also add the child object. Owned objects are stored in arbitrary order.
templateparam
-------------
* `SBOLClass` :
The type of child SBOL object contained by this Property
"""
__swig_setmethods__ = {}
for _s in [CombinatorialDerivationProperty]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, OwnedCombinatorialDerivation, name, value)
__swig_getmethods__ = {}
for _s in [CombinatorialDerivationProperty]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, OwnedCombinatorialDerivation, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
"""
this = _libsbol.new_OwnedCombinatorialDerivation(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
[docs] def set(self, sbol_obj):
"""
Basic setter for OwnedObject SBOL IntProperty.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Assigns a child object to
this OwnedObject container property. This method always overwrites the first
SBOLObject in the container. appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
* `sbol_obj` :
The child object Sets the first object in the container
"""
val = _libsbol.OwnedCombinatorialDerivation_set(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, sbol_obj):
"""
Appends the new value to a list of values, for properties that allow it.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Adds a child object to the
parent object. This method always appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
"""
val = _libsbol.OwnedCombinatorialDerivation_add(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def get(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedCombinatorialDerivation_get(self, *args)
[docs] def getAll(self):
"""
Retrieve a vector of objects from the OwnedObject.
"""
val = _libsbol.OwnedCombinatorialDerivation_getAll(self)
val = list(val)
return val
[docs] def remove(self, *args):
"""
Remove an object from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.OwnedCombinatorialDerivation_remove(self, *args)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.OwnedCombinatorialDerivation_clear(self)
[docs] def create(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedCombinatorialDerivation_create(self, uri)
val.thisown = False
return val
def define(self, definition_object):
return _libsbol.OwnedCombinatorialDerivation_define(self, definition_object)
def find(self, uri):
return _libsbol.OwnedCombinatorialDerivation_find(self, uri)
__swig_setmethods__["python_iter"] = _libsbol.OwnedCombinatorialDerivation_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.OwnedCombinatorialDerivation_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.OwnedCombinatorialDerivation_python_iter_get, _libsbol.OwnedCombinatorialDerivation_python_iter_set)
def __iter__(self):
return _libsbol.OwnedCombinatorialDerivation___iter__(self)
def next(self):
return _libsbol.OwnedCombinatorialDerivation_next(self)
def __next__(self):
return _libsbol.OwnedCombinatorialDerivation___next__(self)
def __len__(self):
return _libsbol.OwnedCombinatorialDerivation___len__(self)
[docs] def createRange(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedCombinatorialDerivation_createRange(self, uri)
val.thisown = False
return val
[docs] def getRange(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedCombinatorialDerivation_getRange(self, *args)
[docs] def createCut(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedCombinatorialDerivation_createCut(self, uri)
val.thisown = False
return val
[docs] def getCut(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedCombinatorialDerivation_getCut(self, *args)
[docs] def createGenericLocation(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedCombinatorialDerivation_createGenericLocation(self, uri)
val.thisown = False
return val
[docs] def getGenericLocation(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedCombinatorialDerivation_getGenericLocation(self, *args)
def __getitem__(self, *args):
return _libsbol.OwnedCombinatorialDerivation___getitem__(self, *args)
def __setitem__(self, uri, py_obj):
return _libsbol.OwnedCombinatorialDerivation___setitem__(self, uri, py_obj)
__swig_destroy__ = _libsbol.delete_OwnedCombinatorialDerivation
__del__ = lambda self: None
OwnedCombinatorialDerivation_swigregister = _libsbol.OwnedCombinatorialDerivation_swigregister
OwnedCombinatorialDerivation_swigregister(OwnedCombinatorialDerivation)
class DesignVector(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, DesignVector, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, DesignVector, name)
__repr__ = _swig_repr
def iterator(self):
return _libsbol.DesignVector_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self):
return _libsbol.DesignVector___nonzero__(self)
def __bool__(self):
return _libsbol.DesignVector___bool__(self)
def __len__(self):
return _libsbol.DesignVector___len__(self)
def __getslice__(self, i, j):
return _libsbol.DesignVector___getslice__(self, i, j)
def __setslice__(self, *args):
return _libsbol.DesignVector___setslice__(self, *args)
def __delslice__(self, i, j):
return _libsbol.DesignVector___delslice__(self, i, j)
def __delitem__(self, *args):
return _libsbol.DesignVector___delitem__(self, *args)
def __getitem__(self, *args):
return _libsbol.DesignVector___getitem__(self, *args)
def __setitem__(self, *args):
return _libsbol.DesignVector___setitem__(self, *args)
def pop(self):
return _libsbol.DesignVector_pop(self)
def append(self, x):
return _libsbol.DesignVector_append(self, x)
def empty(self):
return _libsbol.DesignVector_empty(self)
def size(self):
return _libsbol.DesignVector_size(self)
def swap(self, v):
return _libsbol.DesignVector_swap(self, v)
def begin(self):
return _libsbol.DesignVector_begin(self)
def end(self):
return _libsbol.DesignVector_end(self)
def rbegin(self):
return _libsbol.DesignVector_rbegin(self)
def rend(self):
return _libsbol.DesignVector_rend(self)
def clear(self):
return _libsbol.DesignVector_clear(self)
def get_allocator(self):
return _libsbol.DesignVector_get_allocator(self)
def pop_back(self):
return _libsbol.DesignVector_pop_back(self)
def erase(self, *args):
return _libsbol.DesignVector_erase(self, *args)
def __init__(self, *args):
this = _libsbol.new_DesignVector(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def push_back(self, x):
return _libsbol.DesignVector_push_back(self, x)
def front(self):
return _libsbol.DesignVector_front(self)
def back(self):
return _libsbol.DesignVector_back(self)
def assign(self, n, x):
return _libsbol.DesignVector_assign(self, n, x)
def resize(self, *args):
return _libsbol.DesignVector_resize(self, *args)
def insert(self, *args):
return _libsbol.DesignVector_insert(self, *args)
def reserve(self, n):
return _libsbol.DesignVector_reserve(self, n)
def capacity(self):
return _libsbol.DesignVector_capacity(self)
__swig_destroy__ = _libsbol.delete_DesignVector
__del__ = lambda self: None
DesignVector_swigregister = _libsbol.DesignVector_swigregister
DesignVector_swigregister(DesignVector)
[docs]class DesignProperty(_object):
"""
Member properties of all SBOL objects are defined using a Property object.
The Property class provides a generic interface for accessing SBOL objects. At a
low level, the Property class converts SBOL data structures into RDF triples.
templateparam
-------------
* `The` :
SBOL specification currently supports string, URI, and integer literal
values.
"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, DesignProperty, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, DesignProperty, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Parameters
----------
* `type_uri` :
An RDF hash URI for this property, consisting of a namespace followed by an
identifier. For example, Properties of SBOLObjects use URIs of the form
http://sbols.org/v2#somePropertyName, where the identifier somePropertyName
determines the appearance of XML nodes in an SBOL file. Alternatively,
annotations in a custom namespace can be provided using a similarly formed
hash URI in another namespace.
* `property_owner` :
All Property objects must have a pointer back to its parent SBOLObject of
which it is a member
* `initial_value` :
The initial value of the Property
* `validation_rules` :
A vector of externally defined ValidationRules. The vector contains pointers
to functions which correspond to the validation rules listed in the appendix
of the formal SBOL specification document. ValidationRules are automatically
checked every time a setter or adder method is called and when Documents are
read and written.
"""
this = _libsbol.new_DesignProperty(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete_DesignProperty
__del__ = lambda self: None
[docs] def getTypeURI(self):
"""
Returns
-------
The uniform resource identifier that describes the RDF-type of this SBOL Object
"""
return _libsbol.DesignProperty_getTypeURI(self)
[docs] def getOwner(self):
"""
"""
return _libsbol.DesignProperty_getOwner(self)
[docs] def set(self, *args):
"""
Basic setter for SBOL Property.
Parameters
----------
* `new_value` :
A new integer value for the property, which is converted to a raw string
during serialization.
"""
val = _libsbol.DesignProperty_set(self, *args)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, new_value):
"""
Appends the new value to a list of values, for properties that allow it.
Parameters
----------
* `new_value` :
A new string which will be added to a list of values.
"""
val = _libsbol.DesignProperty_add(self, new_value)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def remove(self, index=0):
"""
Remove a Property from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.DesignProperty_remove(self, index)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.DesignProperty_clear(self)
[docs] def write(self):
"""
"""
return _libsbol.DesignProperty_write(self)
def find(self, query):
return _libsbol.DesignProperty_find(self, query)
def getLowerBound(self):
return _libsbol.DesignProperty_getLowerBound(self)
def getUpperBound(self):
return _libsbol.DesignProperty_getUpperBound(self)
[docs] def validate(self, arg=None):
"""
"""
return _libsbol.DesignProperty_validate(self, arg)
def copy(self, target_property):
return _libsbol.DesignProperty_copy(self, target_property)
__swig_setmethods__["python_iter"] = _libsbol.DesignProperty_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.DesignProperty_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.DesignProperty_python_iter_get, _libsbol.DesignProperty_python_iter_set)
def addValidationRule(self, *args):
return _libsbol.DesignProperty_addValidationRule(self, *args)
DesignProperty_swigregister = _libsbol.DesignProperty_swigregister
DesignProperty_swigregister(DesignProperty)
[docs]class OwnedDesign(DesignProperty):
"""
A container property that contains child objects.
Creates a composition out of two or more classes. In the SBOL specification,
compositional relationships are indicated in class diagrams by arrows with black
diamonds. A compositional relationship means that deleting the parent object
will delete the child objects, and adding the parent object to a Document will
also add the child object. Owned objects are stored in arbitrary order.
templateparam
-------------
* `SBOLClass` :
The type of child SBOL object contained by this Property
"""
__swig_setmethods__ = {}
for _s in [DesignProperty]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, OwnedDesign, name, value)
__swig_getmethods__ = {}
for _s in [DesignProperty]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, OwnedDesign, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
"""
this = _libsbol.new_OwnedDesign(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
[docs] def set(self, sbol_obj):
"""
Basic setter for OwnedObject SBOL IntProperty.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Assigns a child object to
this OwnedObject container property. This method always overwrites the first
SBOLObject in the container. appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
* `sbol_obj` :
The child object Sets the first object in the container
"""
val = _libsbol.OwnedDesign_set(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, sbol_obj):
"""
Appends the new value to a list of values, for properties that allow it.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Adds a child object to the
parent object. This method always appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
"""
val = _libsbol.OwnedDesign_add(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def get(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedDesign_get(self, *args)
[docs] def getAll(self):
"""
Retrieve a vector of objects from the OwnedObject.
"""
val = _libsbol.OwnedDesign_getAll(self)
val = list(val)
return val
[docs] def remove(self, *args):
"""
Remove an object from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.OwnedDesign_remove(self, *args)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.OwnedDesign_clear(self)
[docs] def create(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedDesign_create(self, uri)
val.thisown = False
return val
def define(self, definition_object):
return _libsbol.OwnedDesign_define(self, definition_object)
def find(self, uri):
return _libsbol.OwnedDesign_find(self, uri)
__swig_setmethods__["python_iter"] = _libsbol.OwnedDesign_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.OwnedDesign_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.OwnedDesign_python_iter_get, _libsbol.OwnedDesign_python_iter_set)
def __iter__(self):
return _libsbol.OwnedDesign___iter__(self)
def next(self):
return _libsbol.OwnedDesign_next(self)
def __next__(self):
return _libsbol.OwnedDesign___next__(self)
def __len__(self):
return _libsbol.OwnedDesign___len__(self)
[docs] def createRange(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedDesign_createRange(self, uri)
val.thisown = False
return val
[docs] def getRange(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedDesign_getRange(self, *args)
[docs] def createCut(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedDesign_createCut(self, uri)
val.thisown = False
return val
[docs] def getCut(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedDesign_getCut(self, *args)
[docs] def createGenericLocation(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedDesign_createGenericLocation(self, uri)
val.thisown = False
return val
[docs] def getGenericLocation(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedDesign_getGenericLocation(self, *args)
def __getitem__(self, *args):
return _libsbol.OwnedDesign___getitem__(self, *args)
def __setitem__(self, uri, py_obj):
return _libsbol.OwnedDesign___setitem__(self, uri, py_obj)
__swig_destroy__ = _libsbol.delete_OwnedDesign
__del__ = lambda self: None
OwnedDesign_swigregister = _libsbol.OwnedDesign_swigregister
OwnedDesign_swigregister(OwnedDesign)
class BuildVector(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, BuildVector, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, BuildVector, name)
__repr__ = _swig_repr
def iterator(self):
return _libsbol.BuildVector_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self):
return _libsbol.BuildVector___nonzero__(self)
def __bool__(self):
return _libsbol.BuildVector___bool__(self)
def __len__(self):
return _libsbol.BuildVector___len__(self)
def __getslice__(self, i, j):
return _libsbol.BuildVector___getslice__(self, i, j)
def __setslice__(self, *args):
return _libsbol.BuildVector___setslice__(self, *args)
def __delslice__(self, i, j):
return _libsbol.BuildVector___delslice__(self, i, j)
def __delitem__(self, *args):
return _libsbol.BuildVector___delitem__(self, *args)
def __getitem__(self, *args):
return _libsbol.BuildVector___getitem__(self, *args)
def __setitem__(self, *args):
return _libsbol.BuildVector___setitem__(self, *args)
def pop(self):
return _libsbol.BuildVector_pop(self)
def append(self, x):
return _libsbol.BuildVector_append(self, x)
def empty(self):
return _libsbol.BuildVector_empty(self)
def size(self):
return _libsbol.BuildVector_size(self)
def swap(self, v):
return _libsbol.BuildVector_swap(self, v)
def begin(self):
return _libsbol.BuildVector_begin(self)
def end(self):
return _libsbol.BuildVector_end(self)
def rbegin(self):
return _libsbol.BuildVector_rbegin(self)
def rend(self):
return _libsbol.BuildVector_rend(self)
def clear(self):
return _libsbol.BuildVector_clear(self)
def get_allocator(self):
return _libsbol.BuildVector_get_allocator(self)
def pop_back(self):
return _libsbol.BuildVector_pop_back(self)
def erase(self, *args):
return _libsbol.BuildVector_erase(self, *args)
def __init__(self, *args):
this = _libsbol.new_BuildVector(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def push_back(self, x):
return _libsbol.BuildVector_push_back(self, x)
def front(self):
return _libsbol.BuildVector_front(self)
def back(self):
return _libsbol.BuildVector_back(self)
def assign(self, n, x):
return _libsbol.BuildVector_assign(self, n, x)
def resize(self, *args):
return _libsbol.BuildVector_resize(self, *args)
def insert(self, *args):
return _libsbol.BuildVector_insert(self, *args)
def reserve(self, n):
return _libsbol.BuildVector_reserve(self, n)
def capacity(self):
return _libsbol.BuildVector_capacity(self)
__swig_destroy__ = _libsbol.delete_BuildVector
__del__ = lambda self: None
BuildVector_swigregister = _libsbol.BuildVector_swigregister
BuildVector_swigregister(BuildVector)
[docs]class BuildProperty(_object):
"""
Member properties of all SBOL objects are defined using a Property object.
The Property class provides a generic interface for accessing SBOL objects. At a
low level, the Property class converts SBOL data structures into RDF triples.
templateparam
-------------
* `The` :
SBOL specification currently supports string, URI, and integer literal
values.
"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, BuildProperty, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, BuildProperty, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Parameters
----------
* `type_uri` :
An RDF hash URI for this property, consisting of a namespace followed by an
identifier. For example, Properties of SBOLObjects use URIs of the form
http://sbols.org/v2#somePropertyName, where the identifier somePropertyName
determines the appearance of XML nodes in an SBOL file. Alternatively,
annotations in a custom namespace can be provided using a similarly formed
hash URI in another namespace.
* `property_owner` :
All Property objects must have a pointer back to its parent SBOLObject of
which it is a member
* `initial_value` :
The initial value of the Property
* `validation_rules` :
A vector of externally defined ValidationRules. The vector contains pointers
to functions which correspond to the validation rules listed in the appendix
of the formal SBOL specification document. ValidationRules are automatically
checked every time a setter or adder method is called and when Documents are
read and written.
"""
this = _libsbol.new_BuildProperty(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete_BuildProperty
__del__ = lambda self: None
[docs] def getTypeURI(self):
"""
Returns
-------
The uniform resource identifier that describes the RDF-type of this SBOL Object
"""
return _libsbol.BuildProperty_getTypeURI(self)
[docs] def getOwner(self):
"""
"""
return _libsbol.BuildProperty_getOwner(self)
[docs] def set(self, *args):
"""
Basic setter for SBOL Property.
Parameters
----------
* `new_value` :
A new integer value for the property, which is converted to a raw string
during serialization.
"""
val = _libsbol.BuildProperty_set(self, *args)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, new_value):
"""
Appends the new value to a list of values, for properties that allow it.
Parameters
----------
* `new_value` :
A new string which will be added to a list of values.
"""
val = _libsbol.BuildProperty_add(self, new_value)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def remove(self, index=0):
"""
Remove a Property from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.BuildProperty_remove(self, index)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.BuildProperty_clear(self)
[docs] def write(self):
"""
"""
return _libsbol.BuildProperty_write(self)
def find(self, query):
return _libsbol.BuildProperty_find(self, query)
def getLowerBound(self):
return _libsbol.BuildProperty_getLowerBound(self)
def getUpperBound(self):
return _libsbol.BuildProperty_getUpperBound(self)
[docs] def validate(self, arg=None):
"""
"""
return _libsbol.BuildProperty_validate(self, arg)
def copy(self, target_property):
return _libsbol.BuildProperty_copy(self, target_property)
__swig_setmethods__["python_iter"] = _libsbol.BuildProperty_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.BuildProperty_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.BuildProperty_python_iter_get, _libsbol.BuildProperty_python_iter_set)
def addValidationRule(self, *args):
return _libsbol.BuildProperty_addValidationRule(self, *args)
BuildProperty_swigregister = _libsbol.BuildProperty_swigregister
BuildProperty_swigregister(BuildProperty)
[docs]class OwnedBuild(BuildProperty):
"""
A container property that contains child objects.
Creates a composition out of two or more classes. In the SBOL specification,
compositional relationships are indicated in class diagrams by arrows with black
diamonds. A compositional relationship means that deleting the parent object
will delete the child objects, and adding the parent object to a Document will
also add the child object. Owned objects are stored in arbitrary order.
templateparam
-------------
* `SBOLClass` :
The type of child SBOL object contained by this Property
"""
__swig_setmethods__ = {}
for _s in [BuildProperty]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, OwnedBuild, name, value)
__swig_getmethods__ = {}
for _s in [BuildProperty]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, OwnedBuild, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
"""
this = _libsbol.new_OwnedBuild(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
[docs] def set(self, sbol_obj):
"""
Basic setter for OwnedObject SBOL IntProperty.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Assigns a child object to
this OwnedObject container property. This method always overwrites the first
SBOLObject in the container. appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
* `sbol_obj` :
The child object Sets the first object in the container
"""
val = _libsbol.OwnedBuild_set(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, sbol_obj):
"""
Appends the new value to a list of values, for properties that allow it.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Adds a child object to the
parent object. This method always appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
"""
val = _libsbol.OwnedBuild_add(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def get(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedBuild_get(self, *args)
[docs] def getAll(self):
"""
Retrieve a vector of objects from the OwnedObject.
"""
val = _libsbol.OwnedBuild_getAll(self)
val = list(val)
return val
[docs] def remove(self, *args):
"""
Remove an object from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.OwnedBuild_remove(self, *args)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.OwnedBuild_clear(self)
[docs] def create(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedBuild_create(self, uri)
val.thisown = False
return val
def define(self, definition_object):
return _libsbol.OwnedBuild_define(self, definition_object)
def find(self, uri):
return _libsbol.OwnedBuild_find(self, uri)
__swig_setmethods__["python_iter"] = _libsbol.OwnedBuild_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.OwnedBuild_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.OwnedBuild_python_iter_get, _libsbol.OwnedBuild_python_iter_set)
def __iter__(self):
return _libsbol.OwnedBuild___iter__(self)
def next(self):
return _libsbol.OwnedBuild_next(self)
def __next__(self):
return _libsbol.OwnedBuild___next__(self)
def __len__(self):
return _libsbol.OwnedBuild___len__(self)
[docs] def createRange(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedBuild_createRange(self, uri)
val.thisown = False
return val
[docs] def getRange(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedBuild_getRange(self, *args)
[docs] def createCut(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedBuild_createCut(self, uri)
val.thisown = False
return val
[docs] def getCut(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedBuild_getCut(self, *args)
[docs] def createGenericLocation(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedBuild_createGenericLocation(self, uri)
val.thisown = False
return val
[docs] def getGenericLocation(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedBuild_getGenericLocation(self, *args)
def __getitem__(self, *args):
return _libsbol.OwnedBuild___getitem__(self, *args)
def __setitem__(self, uri, py_obj):
return _libsbol.OwnedBuild___setitem__(self, uri, py_obj)
__swig_destroy__ = _libsbol.delete_OwnedBuild
__del__ = lambda self: None
OwnedBuild_swigregister = _libsbol.OwnedBuild_swigregister
OwnedBuild_swigregister(OwnedBuild)
class TestVector(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, TestVector, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, TestVector, name)
__repr__ = _swig_repr
def iterator(self):
return _libsbol.TestVector_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self):
return _libsbol.TestVector___nonzero__(self)
def __bool__(self):
return _libsbol.TestVector___bool__(self)
def __len__(self):
return _libsbol.TestVector___len__(self)
def __getslice__(self, i, j):
return _libsbol.TestVector___getslice__(self, i, j)
def __setslice__(self, *args):
return _libsbol.TestVector___setslice__(self, *args)
def __delslice__(self, i, j):
return _libsbol.TestVector___delslice__(self, i, j)
def __delitem__(self, *args):
return _libsbol.TestVector___delitem__(self, *args)
def __getitem__(self, *args):
return _libsbol.TestVector___getitem__(self, *args)
def __setitem__(self, *args):
return _libsbol.TestVector___setitem__(self, *args)
def pop(self):
return _libsbol.TestVector_pop(self)
def append(self, x):
return _libsbol.TestVector_append(self, x)
def empty(self):
return _libsbol.TestVector_empty(self)
def size(self):
return _libsbol.TestVector_size(self)
def swap(self, v):
return _libsbol.TestVector_swap(self, v)
def begin(self):
return _libsbol.TestVector_begin(self)
def end(self):
return _libsbol.TestVector_end(self)
def rbegin(self):
return _libsbol.TestVector_rbegin(self)
def rend(self):
return _libsbol.TestVector_rend(self)
def clear(self):
return _libsbol.TestVector_clear(self)
def get_allocator(self):
return _libsbol.TestVector_get_allocator(self)
def pop_back(self):
return _libsbol.TestVector_pop_back(self)
def erase(self, *args):
return _libsbol.TestVector_erase(self, *args)
def __init__(self, *args):
this = _libsbol.new_TestVector(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def push_back(self, x):
return _libsbol.TestVector_push_back(self, x)
def front(self):
return _libsbol.TestVector_front(self)
def back(self):
return _libsbol.TestVector_back(self)
def assign(self, n, x):
return _libsbol.TestVector_assign(self, n, x)
def resize(self, *args):
return _libsbol.TestVector_resize(self, *args)
def insert(self, *args):
return _libsbol.TestVector_insert(self, *args)
def reserve(self, n):
return _libsbol.TestVector_reserve(self, n)
def capacity(self):
return _libsbol.TestVector_capacity(self)
__swig_destroy__ = _libsbol.delete_TestVector
__del__ = lambda self: None
TestVector_swigregister = _libsbol.TestVector_swigregister
TestVector_swigregister(TestVector)
[docs]class TestProperty(_object):
"""
Member properties of all SBOL objects are defined using a Property object.
The Property class provides a generic interface for accessing SBOL objects. At a
low level, the Property class converts SBOL data structures into RDF triples.
templateparam
-------------
* `The` :
SBOL specification currently supports string, URI, and integer literal
values.
"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, TestProperty, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, TestProperty, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Parameters
----------
* `type_uri` :
An RDF hash URI for this property, consisting of a namespace followed by an
identifier. For example, Properties of SBOLObjects use URIs of the form
http://sbols.org/v2#somePropertyName, where the identifier somePropertyName
determines the appearance of XML nodes in an SBOL file. Alternatively,
annotations in a custom namespace can be provided using a similarly formed
hash URI in another namespace.
* `property_owner` :
All Property objects must have a pointer back to its parent SBOLObject of
which it is a member
* `initial_value` :
The initial value of the Property
* `validation_rules` :
A vector of externally defined ValidationRules. The vector contains pointers
to functions which correspond to the validation rules listed in the appendix
of the formal SBOL specification document. ValidationRules are automatically
checked every time a setter or adder method is called and when Documents are
read and written.
"""
this = _libsbol.new_TestProperty(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete_TestProperty
__del__ = lambda self: None
[docs] def getTypeURI(self):
"""
Returns
-------
The uniform resource identifier that describes the RDF-type of this SBOL Object
"""
return _libsbol.TestProperty_getTypeURI(self)
[docs] def getOwner(self):
"""
"""
return _libsbol.TestProperty_getOwner(self)
[docs] def set(self, *args):
"""
Basic setter for SBOL Property.
Parameters
----------
* `new_value` :
A new integer value for the property, which is converted to a raw string
during serialization.
"""
val = _libsbol.TestProperty_set(self, *args)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, new_value):
"""
Appends the new value to a list of values, for properties that allow it.
Parameters
----------
* `new_value` :
A new string which will be added to a list of values.
"""
val = _libsbol.TestProperty_add(self, new_value)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def remove(self, index=0):
"""
Remove a Property from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.TestProperty_remove(self, index)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.TestProperty_clear(self)
[docs] def write(self):
"""
"""
return _libsbol.TestProperty_write(self)
def find(self, query):
return _libsbol.TestProperty_find(self, query)
def getLowerBound(self):
return _libsbol.TestProperty_getLowerBound(self)
def getUpperBound(self):
return _libsbol.TestProperty_getUpperBound(self)
[docs] def validate(self, arg=None):
"""
"""
return _libsbol.TestProperty_validate(self, arg)
def copy(self, target_property):
return _libsbol.TestProperty_copy(self, target_property)
__swig_setmethods__["python_iter"] = _libsbol.TestProperty_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.TestProperty_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.TestProperty_python_iter_get, _libsbol.TestProperty_python_iter_set)
def addValidationRule(self, *args):
return _libsbol.TestProperty_addValidationRule(self, *args)
TestProperty_swigregister = _libsbol.TestProperty_swigregister
TestProperty_swigregister(TestProperty)
[docs]class OwnedTest(TestProperty):
"""
A container property that contains child objects.
Creates a composition out of two or more classes. In the SBOL specification,
compositional relationships are indicated in class diagrams by arrows with black
diamonds. A compositional relationship means that deleting the parent object
will delete the child objects, and adding the parent object to a Document will
also add the child object. Owned objects are stored in arbitrary order.
templateparam
-------------
* `SBOLClass` :
The type of child SBOL object contained by this Property
"""
__swig_setmethods__ = {}
for _s in [TestProperty]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, OwnedTest, name, value)
__swig_getmethods__ = {}
for _s in [TestProperty]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, OwnedTest, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
"""
this = _libsbol.new_OwnedTest(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
[docs] def set(self, sbol_obj):
"""
Basic setter for OwnedObject SBOL IntProperty.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Assigns a child object to
this OwnedObject container property. This method always overwrites the first
SBOLObject in the container. appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
* `sbol_obj` :
The child object Sets the first object in the container
"""
val = _libsbol.OwnedTest_set(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, sbol_obj):
"""
Appends the new value to a list of values, for properties that allow it.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Adds a child object to the
parent object. This method always appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
"""
val = _libsbol.OwnedTest_add(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def get(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedTest_get(self, *args)
[docs] def getAll(self):
"""
Retrieve a vector of objects from the OwnedObject.
"""
val = _libsbol.OwnedTest_getAll(self)
val = list(val)
return val
[docs] def remove(self, *args):
"""
Remove an object from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.OwnedTest_remove(self, *args)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.OwnedTest_clear(self)
[docs] def create(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedTest_create(self, uri)
val.thisown = False
return val
def define(self, definition_object):
return _libsbol.OwnedTest_define(self, definition_object)
def find(self, uri):
return _libsbol.OwnedTest_find(self, uri)
__swig_setmethods__["python_iter"] = _libsbol.OwnedTest_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.OwnedTest_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.OwnedTest_python_iter_get, _libsbol.OwnedTest_python_iter_set)
def __iter__(self):
return _libsbol.OwnedTest___iter__(self)
def next(self):
return _libsbol.OwnedTest_next(self)
def __next__(self):
return _libsbol.OwnedTest___next__(self)
def __len__(self):
return _libsbol.OwnedTest___len__(self)
[docs] def createRange(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedTest_createRange(self, uri)
val.thisown = False
return val
[docs] def getRange(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedTest_getRange(self, *args)
[docs] def createCut(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedTest_createCut(self, uri)
val.thisown = False
return val
[docs] def getCut(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedTest_getCut(self, *args)
[docs] def createGenericLocation(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedTest_createGenericLocation(self, uri)
val.thisown = False
return val
[docs] def getGenericLocation(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedTest_getGenericLocation(self, *args)
def __getitem__(self, *args):
return _libsbol.OwnedTest___getitem__(self, *args)
def __setitem__(self, uri, py_obj):
return _libsbol.OwnedTest___setitem__(self, uri, py_obj)
__swig_destroy__ = _libsbol.delete_OwnedTest
__del__ = lambda self: None
OwnedTest_swigregister = _libsbol.OwnedTest_swigregister
OwnedTest_swigregister(OwnedTest)
class AnalysisVector(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, AnalysisVector, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, AnalysisVector, name)
__repr__ = _swig_repr
def iterator(self):
return _libsbol.AnalysisVector_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self):
return _libsbol.AnalysisVector___nonzero__(self)
def __bool__(self):
return _libsbol.AnalysisVector___bool__(self)
def __len__(self):
return _libsbol.AnalysisVector___len__(self)
def __getslice__(self, i, j):
return _libsbol.AnalysisVector___getslice__(self, i, j)
def __setslice__(self, *args):
return _libsbol.AnalysisVector___setslice__(self, *args)
def __delslice__(self, i, j):
return _libsbol.AnalysisVector___delslice__(self, i, j)
def __delitem__(self, *args):
return _libsbol.AnalysisVector___delitem__(self, *args)
def __getitem__(self, *args):
return _libsbol.AnalysisVector___getitem__(self, *args)
def __setitem__(self, *args):
return _libsbol.AnalysisVector___setitem__(self, *args)
def pop(self):
return _libsbol.AnalysisVector_pop(self)
def append(self, x):
return _libsbol.AnalysisVector_append(self, x)
def empty(self):
return _libsbol.AnalysisVector_empty(self)
def size(self):
return _libsbol.AnalysisVector_size(self)
def swap(self, v):
return _libsbol.AnalysisVector_swap(self, v)
def begin(self):
return _libsbol.AnalysisVector_begin(self)
def end(self):
return _libsbol.AnalysisVector_end(self)
def rbegin(self):
return _libsbol.AnalysisVector_rbegin(self)
def rend(self):
return _libsbol.AnalysisVector_rend(self)
def clear(self):
return _libsbol.AnalysisVector_clear(self)
def get_allocator(self):
return _libsbol.AnalysisVector_get_allocator(self)
def pop_back(self):
return _libsbol.AnalysisVector_pop_back(self)
def erase(self, *args):
return _libsbol.AnalysisVector_erase(self, *args)
def __init__(self, *args):
this = _libsbol.new_AnalysisVector(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def push_back(self, x):
return _libsbol.AnalysisVector_push_back(self, x)
def front(self):
return _libsbol.AnalysisVector_front(self)
def back(self):
return _libsbol.AnalysisVector_back(self)
def assign(self, n, x):
return _libsbol.AnalysisVector_assign(self, n, x)
def resize(self, *args):
return _libsbol.AnalysisVector_resize(self, *args)
def insert(self, *args):
return _libsbol.AnalysisVector_insert(self, *args)
def reserve(self, n):
return _libsbol.AnalysisVector_reserve(self, n)
def capacity(self):
return _libsbol.AnalysisVector_capacity(self)
__swig_destroy__ = _libsbol.delete_AnalysisVector
__del__ = lambda self: None
AnalysisVector_swigregister = _libsbol.AnalysisVector_swigregister
AnalysisVector_swigregister(AnalysisVector)
[docs]class AnalysisProperty(_object):
"""
Member properties of all SBOL objects are defined using a Property object.
The Property class provides a generic interface for accessing SBOL objects. At a
low level, the Property class converts SBOL data structures into RDF triples.
templateparam
-------------
* `The` :
SBOL specification currently supports string, URI, and integer literal
values.
"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, AnalysisProperty, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, AnalysisProperty, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Parameters
----------
* `type_uri` :
An RDF hash URI for this property, consisting of a namespace followed by an
identifier. For example, Properties of SBOLObjects use URIs of the form
http://sbols.org/v2#somePropertyName, where the identifier somePropertyName
determines the appearance of XML nodes in an SBOL file. Alternatively,
annotations in a custom namespace can be provided using a similarly formed
hash URI in another namespace.
* `property_owner` :
All Property objects must have a pointer back to its parent SBOLObject of
which it is a member
* `initial_value` :
The initial value of the Property
* `validation_rules` :
A vector of externally defined ValidationRules. The vector contains pointers
to functions which correspond to the validation rules listed in the appendix
of the formal SBOL specification document. ValidationRules are automatically
checked every time a setter or adder method is called and when Documents are
read and written.
"""
this = _libsbol.new_AnalysisProperty(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete_AnalysisProperty
__del__ = lambda self: None
[docs] def getTypeURI(self):
"""
Returns
-------
The uniform resource identifier that describes the RDF-type of this SBOL Object
"""
return _libsbol.AnalysisProperty_getTypeURI(self)
[docs] def getOwner(self):
"""
"""
return _libsbol.AnalysisProperty_getOwner(self)
[docs] def set(self, *args):
"""
Basic setter for SBOL Property.
Parameters
----------
* `new_value` :
A new integer value for the property, which is converted to a raw string
during serialization.
"""
val = _libsbol.AnalysisProperty_set(self, *args)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, new_value):
"""
Appends the new value to a list of values, for properties that allow it.
Parameters
----------
* `new_value` :
A new string which will be added to a list of values.
"""
val = _libsbol.AnalysisProperty_add(self, new_value)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def remove(self, index=0):
"""
Remove a Property from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.AnalysisProperty_remove(self, index)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.AnalysisProperty_clear(self)
[docs] def write(self):
"""
"""
return _libsbol.AnalysisProperty_write(self)
def find(self, query):
return _libsbol.AnalysisProperty_find(self, query)
def getLowerBound(self):
return _libsbol.AnalysisProperty_getLowerBound(self)
def getUpperBound(self):
return _libsbol.AnalysisProperty_getUpperBound(self)
[docs] def validate(self, arg=None):
"""
"""
return _libsbol.AnalysisProperty_validate(self, arg)
def copy(self, target_property):
return _libsbol.AnalysisProperty_copy(self, target_property)
__swig_setmethods__["python_iter"] = _libsbol.AnalysisProperty_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.AnalysisProperty_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.AnalysisProperty_python_iter_get, _libsbol.AnalysisProperty_python_iter_set)
def addValidationRule(self, *args):
return _libsbol.AnalysisProperty_addValidationRule(self, *args)
AnalysisProperty_swigregister = _libsbol.AnalysisProperty_swigregister
AnalysisProperty_swigregister(AnalysisProperty)
[docs]class OwnedAnalysis(AnalysisProperty):
"""
A container property that contains child objects.
Creates a composition out of two or more classes. In the SBOL specification,
compositional relationships are indicated in class diagrams by arrows with black
diamonds. A compositional relationship means that deleting the parent object
will delete the child objects, and adding the parent object to a Document will
also add the child object. Owned objects are stored in arbitrary order.
templateparam
-------------
* `SBOLClass` :
The type of child SBOL object contained by this Property
"""
__swig_setmethods__ = {}
for _s in [AnalysisProperty]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, OwnedAnalysis, name, value)
__swig_getmethods__ = {}
for _s in [AnalysisProperty]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, OwnedAnalysis, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
"""
this = _libsbol.new_OwnedAnalysis(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
[docs] def set(self, sbol_obj):
"""
Basic setter for OwnedObject SBOL IntProperty.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Assigns a child object to
this OwnedObject container property. This method always overwrites the first
SBOLObject in the container. appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
* `sbol_obj` :
The child object Sets the first object in the container
"""
val = _libsbol.OwnedAnalysis_set(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, sbol_obj):
"""
Appends the new value to a list of values, for properties that allow it.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Adds a child object to the
parent object. This method always appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
"""
val = _libsbol.OwnedAnalysis_add(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def get(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedAnalysis_get(self, *args)
[docs] def getAll(self):
"""
Retrieve a vector of objects from the OwnedObject.
"""
val = _libsbol.OwnedAnalysis_getAll(self)
val = list(val)
return val
[docs] def remove(self, *args):
"""
Remove an object from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.OwnedAnalysis_remove(self, *args)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.OwnedAnalysis_clear(self)
[docs] def create(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedAnalysis_create(self, uri)
val.thisown = False
return val
def define(self, definition_object):
return _libsbol.OwnedAnalysis_define(self, definition_object)
def find(self, uri):
return _libsbol.OwnedAnalysis_find(self, uri)
__swig_setmethods__["python_iter"] = _libsbol.OwnedAnalysis_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.OwnedAnalysis_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.OwnedAnalysis_python_iter_get, _libsbol.OwnedAnalysis_python_iter_set)
def __iter__(self):
return _libsbol.OwnedAnalysis___iter__(self)
def next(self):
return _libsbol.OwnedAnalysis_next(self)
def __next__(self):
return _libsbol.OwnedAnalysis___next__(self)
def __len__(self):
return _libsbol.OwnedAnalysis___len__(self)
[docs] def createRange(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedAnalysis_createRange(self, uri)
val.thisown = False
return val
[docs] def getRange(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedAnalysis_getRange(self, *args)
[docs] def createCut(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedAnalysis_createCut(self, uri)
val.thisown = False
return val
[docs] def getCut(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedAnalysis_getCut(self, *args)
[docs] def createGenericLocation(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedAnalysis_createGenericLocation(self, uri)
val.thisown = False
return val
[docs] def getGenericLocation(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedAnalysis_getGenericLocation(self, *args)
def __getitem__(self, *args):
return _libsbol.OwnedAnalysis___getitem__(self, *args)
def __setitem__(self, uri, py_obj):
return _libsbol.OwnedAnalysis___setitem__(self, uri, py_obj)
__swig_destroy__ = _libsbol.delete_OwnedAnalysis
__del__ = lambda self: None
OwnedAnalysis_swigregister = _libsbol.OwnedAnalysis_swigregister
OwnedAnalysis_swigregister(OwnedAnalysis)
class SampleRosterVector(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, SampleRosterVector, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, SampleRosterVector, name)
__repr__ = _swig_repr
def iterator(self):
return _libsbol.SampleRosterVector_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self):
return _libsbol.SampleRosterVector___nonzero__(self)
def __bool__(self):
return _libsbol.SampleRosterVector___bool__(self)
def __len__(self):
return _libsbol.SampleRosterVector___len__(self)
def __getslice__(self, i, j):
return _libsbol.SampleRosterVector___getslice__(self, i, j)
def __setslice__(self, *args):
return _libsbol.SampleRosterVector___setslice__(self, *args)
def __delslice__(self, i, j):
return _libsbol.SampleRosterVector___delslice__(self, i, j)
def __delitem__(self, *args):
return _libsbol.SampleRosterVector___delitem__(self, *args)
def __getitem__(self, *args):
return _libsbol.SampleRosterVector___getitem__(self, *args)
def __setitem__(self, *args):
return _libsbol.SampleRosterVector___setitem__(self, *args)
def pop(self):
return _libsbol.SampleRosterVector_pop(self)
def append(self, x):
return _libsbol.SampleRosterVector_append(self, x)
def empty(self):
return _libsbol.SampleRosterVector_empty(self)
def size(self):
return _libsbol.SampleRosterVector_size(self)
def swap(self, v):
return _libsbol.SampleRosterVector_swap(self, v)
def begin(self):
return _libsbol.SampleRosterVector_begin(self)
def end(self):
return _libsbol.SampleRosterVector_end(self)
def rbegin(self):
return _libsbol.SampleRosterVector_rbegin(self)
def rend(self):
return _libsbol.SampleRosterVector_rend(self)
def clear(self):
return _libsbol.SampleRosterVector_clear(self)
def get_allocator(self):
return _libsbol.SampleRosterVector_get_allocator(self)
def pop_back(self):
return _libsbol.SampleRosterVector_pop_back(self)
def erase(self, *args):
return _libsbol.SampleRosterVector_erase(self, *args)
def __init__(self, *args):
this = _libsbol.new_SampleRosterVector(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
def push_back(self, x):
return _libsbol.SampleRosterVector_push_back(self, x)
def front(self):
return _libsbol.SampleRosterVector_front(self)
def back(self):
return _libsbol.SampleRosterVector_back(self)
def assign(self, n, x):
return _libsbol.SampleRosterVector_assign(self, n, x)
def resize(self, *args):
return _libsbol.SampleRosterVector_resize(self, *args)
def insert(self, *args):
return _libsbol.SampleRosterVector_insert(self, *args)
def reserve(self, n):
return _libsbol.SampleRosterVector_reserve(self, n)
def capacity(self):
return _libsbol.SampleRosterVector_capacity(self)
__swig_destroy__ = _libsbol.delete_SampleRosterVector
__del__ = lambda self: None
SampleRosterVector_swigregister = _libsbol.SampleRosterVector_swigregister
SampleRosterVector_swigregister(SampleRosterVector)
[docs]class SampleRosterProperty(_object):
"""
Member properties of all SBOL objects are defined using a Property object.
The Property class provides a generic interface for accessing SBOL objects. At a
low level, the Property class converts SBOL data structures into RDF triples.
templateparam
-------------
* `The` :
SBOL specification currently supports string, URI, and integer literal
values.
"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, SampleRosterProperty, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, SampleRosterProperty, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
Parameters
----------
* `type_uri` :
An RDF hash URI for this property, consisting of a namespace followed by an
identifier. For example, Properties of SBOLObjects use URIs of the form
http://sbols.org/v2#somePropertyName, where the identifier somePropertyName
determines the appearance of XML nodes in an SBOL file. Alternatively,
annotations in a custom namespace can be provided using a similarly formed
hash URI in another namespace.
* `property_owner` :
All Property objects must have a pointer back to its parent SBOLObject of
which it is a member
* `initial_value` :
The initial value of the Property
* `validation_rules` :
A vector of externally defined ValidationRules. The vector contains pointers
to functions which correspond to the validation rules listed in the appendix
of the formal SBOL specification document. ValidationRules are automatically
checked every time a setter or adder method is called and when Documents are
read and written.
"""
this = _libsbol.new_SampleRosterProperty(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete_SampleRosterProperty
__del__ = lambda self: None
[docs] def getTypeURI(self):
"""
Returns
-------
The uniform resource identifier that describes the RDF-type of this SBOL Object
"""
return _libsbol.SampleRosterProperty_getTypeURI(self)
[docs] def getOwner(self):
"""
"""
return _libsbol.SampleRosterProperty_getOwner(self)
[docs] def set(self, *args):
"""
Basic setter for SBOL Property.
Parameters
----------
* `new_value` :
A new integer value for the property, which is converted to a raw string
during serialization.
"""
val = _libsbol.SampleRosterProperty_set(self, *args)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, new_value):
"""
Appends the new value to a list of values, for properties that allow it.
Parameters
----------
* `new_value` :
A new string which will be added to a list of values.
"""
val = _libsbol.SampleRosterProperty_add(self, new_value)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def remove(self, index=0):
"""
Remove a Property from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.SampleRosterProperty_remove(self, index)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.SampleRosterProperty_clear(self)
[docs] def write(self):
"""
"""
return _libsbol.SampleRosterProperty_write(self)
def find(self, query):
return _libsbol.SampleRosterProperty_find(self, query)
def getLowerBound(self):
return _libsbol.SampleRosterProperty_getLowerBound(self)
def getUpperBound(self):
return _libsbol.SampleRosterProperty_getUpperBound(self)
[docs] def validate(self, arg=None):
"""
"""
return _libsbol.SampleRosterProperty_validate(self, arg)
def copy(self, target_property):
return _libsbol.SampleRosterProperty_copy(self, target_property)
__swig_setmethods__["python_iter"] = _libsbol.SampleRosterProperty_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.SampleRosterProperty_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.SampleRosterProperty_python_iter_get, _libsbol.SampleRosterProperty_python_iter_set)
def addValidationRule(self, *args):
return _libsbol.SampleRosterProperty_addValidationRule(self, *args)
SampleRosterProperty_swigregister = _libsbol.SampleRosterProperty_swigregister
SampleRosterProperty_swigregister(SampleRosterProperty)
[docs]class OwnedSampleRoster(SampleRosterProperty):
"""
A container property that contains child objects.
Creates a composition out of two or more classes. In the SBOL specification,
compositional relationships are indicated in class diagrams by arrows with black
diamonds. A compositional relationship means that deleting the parent object
will delete the child objects, and adding the parent object to a Document will
also add the child object. Owned objects are stored in arbitrary order.
templateparam
-------------
* `SBOLClass` :
The type of child SBOL object contained by this Property
"""
__swig_setmethods__ = {}
for _s in [SampleRosterProperty]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, OwnedSampleRoster, name, value)
__swig_getmethods__ = {}
for _s in [SampleRosterProperty]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, OwnedSampleRoster, name)
__repr__ = _swig_repr
def __init__(self, *args):
"""
"""
this = _libsbol.new_OwnedSampleRoster(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
[docs] def set(self, sbol_obj):
"""
Basic setter for OwnedObject SBOL IntProperty.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Assigns a child object to
this OwnedObject container property. This method always overwrites the first
SBOLObject in the container. appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
* `sbol_obj` :
The child object Sets the first object in the container
"""
val = _libsbol.OwnedSampleRoster_set(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def add(self, sbol_obj):
"""
Appends the new value to a list of values, for properties that allow it.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Adds a child object to the
parent object. This method always appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
"""
val = _libsbol.OwnedSampleRoster_add(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
[docs] def get(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedSampleRoster_get(self, *args)
[docs] def getAll(self):
"""
Retrieve a vector of objects from the OwnedObject.
"""
val = _libsbol.OwnedSampleRoster_getAll(self)
val = list(val)
return val
[docs] def remove(self, *args):
"""
Remove an object from the list of objects and destroy it.
Parameters
----------
* `uri` :
The identity of the object to be destroyed. This can be a displayId of the
object or a full URI may be provided.
* `index` :
A numerical index for the object.
"""
return _libsbol.OwnedSampleRoster_remove(self, *args)
[docs] def clear(self):
"""
Remove all children objects from the parent and destroy them.
"""
return _libsbol.OwnedSampleRoster_clear(self)
[docs] def create(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedSampleRoster_create(self, uri)
val.thisown = False
return val
def define(self, definition_object):
return _libsbol.OwnedSampleRoster_define(self, definition_object)
def find(self, uri):
return _libsbol.OwnedSampleRoster_find(self, uri)
__swig_setmethods__["python_iter"] = _libsbol.OwnedSampleRoster_python_iter_set
__swig_getmethods__["python_iter"] = _libsbol.OwnedSampleRoster_python_iter_get
if _newclass:
python_iter = _swig_property(_libsbol.OwnedSampleRoster_python_iter_get, _libsbol.OwnedSampleRoster_python_iter_set)
def __iter__(self):
return _libsbol.OwnedSampleRoster___iter__(self)
def next(self):
return _libsbol.OwnedSampleRoster_next(self)
def __next__(self):
return _libsbol.OwnedSampleRoster___next__(self)
def __len__(self):
return _libsbol.OwnedSampleRoster___len__(self)
[docs] def createRange(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedSampleRoster_createRange(self, uri)
val.thisown = False
return val
[docs] def getRange(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedSampleRoster_getRange(self, *args)
[docs] def createCut(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedSampleRoster_createCut(self, uri)
val.thisown = False
return val
[docs] def getCut(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedSampleRoster_getCut(self, *args)
[docs] def createGenericLocation(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.OwnedSampleRoster_createGenericLocation(self, uri)
val.thisown = False
return val
[docs] def getGenericLocation(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.OwnedSampleRoster_getGenericLocation(self, *args)
def __getitem__(self, *args):
return _libsbol.OwnedSampleRoster___getitem__(self, *args)
def __setitem__(self, uri, py_obj):
return _libsbol.OwnedSampleRoster___setitem__(self, uri, py_obj)
__swig_destroy__ = _libsbol.delete_OwnedSampleRoster
__del__ = lambda self: None
OwnedSampleRoster_swigregister = _libsbol.OwnedSampleRoster_swigregister
OwnedSampleRoster_swigregister(OwnedSampleRoster)
class AliasedOwnedFunctionalComponent(OwnedFunctionalComponent):
__swig_setmethods__ = {}
for _s in [OwnedFunctionalComponent]:
__swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
__setattr__ = lambda self, name, value: _swig_setattr(self, AliasedOwnedFunctionalComponent, name, value)
__swig_getmethods__ = {}
for _s in [OwnedFunctionalComponent]:
__swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
__getattr__ = lambda self, name: _swig_getattr(self, AliasedOwnedFunctionalComponent, name)
__repr__ = _swig_repr
__swig_setmethods__["alias"] = _libsbol.AliasedOwnedFunctionalComponent_alias_set
__swig_getmethods__["alias"] = _libsbol.AliasedOwnedFunctionalComponent_alias_get
if _newclass:
alias = _swig_property(_libsbol.AliasedOwnedFunctionalComponent_alias_get, _libsbol.AliasedOwnedFunctionalComponent_alias_set)
def __init__(self, property_owner, sbol_uri, alias_uri, lower_bound, upper_bound, validation_rules):
this = _libsbol.new_AliasedOwnedFunctionalComponent(property_owner, sbol_uri, alias_uri, lower_bound, upper_bound, validation_rules)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
__swig_destroy__ = _libsbol.delete_AliasedOwnedFunctionalComponent
__del__ = lambda self: None
def set(self, sbol_obj):
"""
Basic setter for OwnedObject SBOL IntProperty.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Assigns a child object to
this OwnedObject container property. This method always overwrites the first
SBOLObject in the container. appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
* `sbol_obj` :
The child object Sets the first object in the container
"""
val = _libsbol.AliasedOwnedFunctionalComponent_set(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
def add(self, sbol_obj):
"""
Appends the new value to a list of values, for properties that allow it.
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `sbol_obj` :
A child object to add to this container property. Adds a child object to the
parent object. This method always appends another object to those already
contained in this OwnedObject property. In SBOLCompliant mode, the create
method is preferred
"""
val = _libsbol.AliasedOwnedFunctionalComponent_add(self, sbol_obj)
try:
sbol_obj.thisown = False
except NameError:
try:
if not type(args[0]) == str:
args[0].thisown = False
except NameError:
pass
return val
def get(self, *args):
"""
Get the child object.
templateparam
-------------
* `SBOLClass` :
The type of the child object
* `SBOLSubClass` :
A derived class of SBOLClass. Use this type specialization when adding
multiple types of SBOLObjects to a container.
Parameters
----------
* `uri` :
The specific URI for a child object if this OwnedObject property contains
multiple objects,
Returns
-------
A reference to the child object Returns a child object from the OwnedObject
property. If no URI is specified, the first object in this OwnedObject property
is returned.
"""
return _libsbol.AliasedOwnedFunctionalComponent_get(self, *args)
def create(self, uri):
"""
templateparam
-------------
* `SBOLClass` :
The type of SBOL object contained in this OwnedObject property
* `SBOLSubClass` :
A derived class of SBOLClass. Use this specialization for OwnedObject
properties which contain multiple types of SBOLObjects.
Parameters
----------
* `uri` :
If SBOLCompliance is enabled, this should be the displayId for the new child
object. If not enabled, this should be a full raw URI.
Returns
-------
A reference to the child object Autoconstructs a child object and attaches it to
the parent object. The new object will be constructed with default values
specified in the constructor for this type of object. If SBOLCompliance is
enabled, the child object's identity will be constructed using the supplied
displayId argument. Otherwise, the user should supply a full URI. check
uniqueness of URI in Document
"""
val = _libsbol.AliasedOwnedFunctionalComponent_create(self, uri)
val.thisown = False
return val
def define(self, definition_object):
return _libsbol.AliasedOwnedFunctionalComponent_define(self, definition_object)
def __len__(self):
return _libsbol.AliasedOwnedFunctionalComponent___len__(self)
AliasedOwnedFunctionalComponent_swigregister = _libsbol.AliasedOwnedFunctionalComponent_swigregister
AliasedOwnedFunctionalComponent_swigregister(AliasedOwnedFunctionalComponent)
def applyToComponentHierarchy(self, callback_fn, user_data):
# Assumes parent_component is an SBOL data structure of the general form ComponentDefinition(->Component->ComponentDefinition)n where n+1 is an integer describing how many hierarchical levels are in the SBOL structure
# Look at each of the ComponentDef's SequenceAnnotations, is the target base there?
if not self.doc:
raise Exception('Cannot traverse Component hierarchy without a Document')
GET_ALL = True
component_nodes = []
if len(self.components) == 0:
component_nodes.append(self) # Add leaf components
if (callback_fn):
callback_fn(self, user_data)
else:
if GET_ALL:
component_nodes.append(self) # Add components with children
if callback_fn:
callback_fn(self, user_data)
for subc in self.components:
if not self.doc.find(subc.definition.get()):
raise Exception(subc.definition.get() + 'not found')
subcdef = self.doc.getComponentDefinition(subc.definition.get())
subcomponents = subcdef.applyToComponentHierarchy(callback_fn, user_data)
component_nodes.extend(subcomponents)
return component_nodes
ComponentDefinition.applyToComponentHierarchy = applyToComponentHierarchy
[docs]def testSBOL():
"""
Function to run test suite for pySBOL
"""
import sbol.unit_tests as unit_tests
unit_tests.runTests()
def is_extension_property(obj, name):
attribute_dict = object.__getattribute__(obj, '__dict__')
if name in attribute_dict:
if type(attribute_dict[name]) in [ TextProperty, URIProperty, IntProperty, FloatProperty, ReferencedObject, DateTimeProperty, VersionProperty ] :
return True
return False
def is_swig_property(obj, name):
swig_attribute_dict = object.__getattribute__(obj, '__swig_getmethods__')
if name in swig_attribute_dict:
return True
return False
class PythonicInterface(object):
def __getattribute__(self,name):
sbol_attribute = None
if is_swig_property(self, name):
sbol_attribute = object.__getattribute__(self, name)
elif is_extension_property(self, name):
sbol_attribute = object.__getattribute__(self, '__dict__')[name]
if sbol_attribute:
if not 'Owned' in sbol_attribute.__class__.__name__:
if sbol_attribute.getUpperBound() != '1':
return sbol_attribute.getAll()
else:
try:
return sbol_attribute.get()
except LookupError:
return None
return None
elif sbol_attribute.getUpperBound() == '1':
try:
return sbol_attribute.get()
except:
return None
return object.__getattribute__(self, name)
def __setattr__(self,name, value):
sbol_attribute = None
if is_swig_property(self, name):
sbol_attribute = object.__getattribute__(self, name)
elif is_extension_property(self, name):
sbol_attribute = object.__getattribute__(self, '__dict__')[name]
if sbol_attribute:
if not 'Owned' in sbol_attribute.__class__.__name__:
if value == None:
sbol_attribute.clear()
elif type(value) == list:
if sbol_attribute.getUpperBound() == '1':
raise TypeError('The ' + sbol_attribute.getTypeURI() + ' property does not accept list arguments')
sbol_attribute.clear()
for val in value:
sbol_attribute.add(val)
else:
sbol_attribute.set(value)
elif sbol_attribute.getUpperBound() == '1':
if len(sbol_attribute) > 0:
sbol_obj = sbol_attribute.get()
doc = sbol_obj.doc
sbol_attribute.remove()
if not doc:
sbol_obj.thisown = True
elif not doc.find(sbol_obj.identity):
sbol_obj.thisown = True
if not value == None:
sbol_attribute.set(value)
value.thisown = False
else:
self.__class__.__setattribute__(self, name, value)
def __repr__(self):
return self.__class__.__name__
# This file is compatible with both classic and new-style classes.