sbol3.constraint
¶
Module Contents¶
Classes¶
The Constraint class can be used to assert restrictions on the |
Functions¶
|
- class Constraint(restriction: str, subject: Union[Identified, str], object: Union[Identified, str], *, name: str = None, description: str = None, derived_from: List[str] = None, generated_by: List[str] = None, measures: List[SBOLObject] = None, identity: Optional[str] = None, type_uri: str = SBOL_CONSTRAINT)¶
Bases:
Identified
The Constraint class can be used to assert restrictions on the relationships of pairs of Feature objects contained by the same parent Component. Uses of this class include expressing containment (e.g., a plasmid transformed into a chassis strain), identity mappings (e.g., replacing a placeholder value with a complete definition), and expressing relative, sequence-based positions (e.g., the ordering of features within a template). Each Constraint includes the subject, object, and restriction properties.
- accept(visitor: Any) Any ¶
Invokes visit_constraint on visitor with self as the only argument.
- Parameters
visitor (Any) – The visitor instance
- Raises
AttributeError – If visitor lacks a visit_constraint method
- Returns
Whatever visitor.visit_constraint returns
- Return type
Any
- validate(report: ValidationReport = None) ValidationReport ¶
- build_constraint(identity: str, type_uri: str = SBOL_CONSTRAINT) SBOLObject ¶