| |
- builtins.object
-
- CTGenSubelementBehavior
- Tag
- XMLErrorHandler
- XMLSchemaCommonType
- XMLSchemaComplexTypeGenerator
- XMLSchemaDataType
- XMLSchemaDefinition
- XMLSchemaElementCategory
- XMLSchemaMinOccursMaxOccurs
- XMLSchemaModelGroupType
- XMLSchemaRestrictionType
- XMLSchemaSimpleSubelementList
- XMLSchemaTopLevelElement
-
- XMLSchemaAttribute
- XMLSchemaComplexType
- XMLSchemaParticle
-
- XMLSchemaElement
- XMLSchemaModelGroup
- XMLSchemaRestriction
- XMLSchemaType
- XMLValidationOutput
class Tag(builtins.object) |
| |
Methods defined here:
- __getitem__(...) from builtins.PyCapsule
- __getitem__(self : rosetta.utility.tag.Tag, key : str) -> rosetta.utility.tag.Tag
- __init__(...) from builtins.PyCapsule
- __init__(*args, **kwargs)
Overloaded function.
1. __init__(rosetta.utility.tag.Tag) -> NoneType
2. __init__(self : rosetta.utility.tag.Tag, : rosetta.utility.tag.Tag) -> NoneType
- __new__(*args, **kwargs) from builtins.type
- Create and return a new object. See help(type) for accurate signature.
- __str__(...) from builtins.PyCapsule
- __str__(rosetta.utility.tag.Tag) -> str
- addTag(...) from builtins.PyCapsule
- addTag(self : rosetta.utility.tag.Tag, tag : rosetta.utility.tag.Tag) -> NoneType
- assign(...) from builtins.PyCapsule
- assign(self : rosetta.utility.tag.Tag, other : rosetta.utility.tag.Tag) -> rosetta.utility.tag.Tag
- clear(...) from builtins.PyCapsule
- clear(rosetta.utility.tag.Tag) -> NoneType
- clone(...) from builtins.PyCapsule
- clone(rosetta.utility.tag.Tag) -> rosetta.utility.tag.Tag
- create(...) from builtins.PyCapsule
- create(instring : str) -> rosetta.utility.tag.Tag
- die_for_unaccessed_options(...) from builtins.PyCapsule
- die_for_unaccessed_options(rosetta.utility.tag.Tag) -> NoneType
- die_for_unaccessed_options_recursively(...) from builtins.PyCapsule
- die_for_unaccessed_options_recursively(rosetta.utility.tag.Tag) -> NoneType
- getName(...) from builtins.PyCapsule
- getName(rosetta.utility.tag.Tag) -> str
- getOptions(...) from builtins.PyCapsule
- getOptions(rosetta.utility.tag.Tag) -> rosetta.std.map_std_string_std_string
- getParent(...) from builtins.PyCapsule
- getParent(rosetta.utility.tag.Tag) -> rosetta.std.weak_ptr_const_utility_tag_Tag_t
- getTag(...) from builtins.PyCapsule
- getTag(self : rosetta.utility.tag.Tag, name : str) -> rosetta.utility.tag.Tag
- getTags(...) from builtins.PyCapsule
- getTags(*args, **kwargs)
Overloaded function.
1. getTags(rosetta.utility.tag.Tag) -> rosetta.utility.vector0_std_shared_ptr_const_utility_tag_Tag_t
2. getTags(self : rosetta.utility.tag.Tag, name : str) -> rosetta.utility.vector0_std_shared_ptr_const_utility_tag_Tag_t
- get_self_ptr(...) from builtins.PyCapsule
- get_self_ptr(*args, **kwargs)
Overloaded function.
1. get_self_ptr(rosetta.utility.tag.Tag) -> rosetta.utility.tag.Tag
self pointers
2. get_self_ptr(rosetta.utility.tag.Tag) -> rosetta.utility.tag.Tag
- get_self_weak_ptr(...) from builtins.PyCapsule
- get_self_weak_ptr(*args, **kwargs)
Overloaded function.
1. get_self_weak_ptr(rosetta.utility.tag.Tag) -> rosetta.std.weak_ptr_const_utility_tag_Tag_t
2. get_self_weak_ptr(rosetta.utility.tag.Tag) -> rosetta.std.weak_ptr_utility_tag_Tag_t
- hasOption(...) from builtins.PyCapsule
- hasOption(self : rosetta.utility.tag.Tag, key : str) -> bool
- hasTag(...) from builtins.PyCapsule
- hasTag(self : rosetta.utility.tag.Tag, name : str) -> bool
- setName(...) from builtins.PyCapsule
- setName(self : rosetta.utility.tag.Tag, name : str) -> NoneType
- setOptions(...) from builtins.PyCapsule
- setOptions(self : rosetta.utility.tag.Tag, options : rosetta.std.map_std_string_std_string) -> NoneType
- size(...) from builtins.PyCapsule
- size(rosetta.utility.tag.Tag) -> int
|
class XMLSchemaAttribute(XMLSchemaTopLevelElement) |
|
class %XMLSchemaAttribute represents what we refer to in Rosetta as an
option for a tag. An attribute would reside inside of a tag, such as "scorefxn"
in this tag (this XML Element): <MinMover name="min" scorefxn="talaris2014"/>
The "name" of an attribute is what will live on the left-hand side of the
equals sign, e.g. "scorefxn" in the MinMover example above. The type of the attribute
refers to the structure of the data on the right-hand side of the equals sign.
Attributes may also define a default value, which is a useful way to communicate default
behaviors to users. Finally, an attribute can be listed as being required or not.
By default, attributes are not required, so not specifying whether the attribute is
required means that it is not required. An example of a required attribute would be
the "name" attribute for the MinMover.
Once all of the details of an XMLAttribute have been set, it will write its definition
to an output stream in its write_definition method. |
|
- Method resolution order:
- XMLSchemaAttribute
- XMLSchemaTopLevelElement
- builtins.object
Methods defined here:
- __init__(...) from builtins.PyCapsule
- __init__(*args, **kwargs)
Overloaded function.
1. __init__(handle) -> NoneType
2. __init__(self : handle, name : str, type : rosetta.utility.tag.XMLSchemaType) -> NoneType
3. __init__(handle, rosetta.utility.tag.XMLSchemaAttribute) -> NoneType
- __new__(*args, **kwargs) from builtins.type
- Create and return a new object. See help(type) for accurate signature.
- assign(...) from builtins.PyCapsule
- assign(self : rosetta.utility.tag.XMLSchemaAttribute, : rosetta.utility.tag.XMLSchemaAttribute) -> rosetta.utility.tag.XMLSchemaAttribute
- attribute_w_default(...) from builtins.PyCapsule
- attribute_w_default(*args, **kwargs)
Overloaded function.
1. attribute_w_default(name : str, type : rosetta.utility.tag.XMLSchemaType, default_value : str) -> rosetta.utility.tag.XMLSchemaAttribute
2. attribute_w_default(name : str, type : rosetta.utility.tag.XMLSchemaType, default_value : str, desc : str) -> rosetta.utility.tag.XMLSchemaAttribute
- default_value(...) from builtins.PyCapsule
- default_value(self : rosetta.utility.tag.XMLSchemaAttribute, setting : str) -> rosetta.utility.tag.XMLSchemaAttribute
- description(...) from builtins.PyCapsule
- description(self : rosetta.utility.tag.XMLSchemaAttribute, setting : str) -> rosetta.utility.tag.XMLSchemaAttribute
- element_name(...) from builtins.PyCapsule
- element_name(rosetta.utility.tag.XMLSchemaAttribute) -> str
- is_required(...) from builtins.PyCapsule
- is_required(self : rosetta.utility.tag.XMLSchemaAttribute, setting : bool) -> rosetta.utility.tag.XMLSchemaAttribute
- name(...) from builtins.PyCapsule
- name(self : rosetta.utility.tag.XMLSchemaAttribute, setting : str) -> rosetta.utility.tag.XMLSchemaAttribute
- prepare_for_output(...) from builtins.PyCapsule
- prepare_for_output(self : rosetta.utility.tag.XMLSchemaAttribute, xsd : utility::tag::XMLSchemaDefinition) -> NoneType
- required_attribute(...) from builtins.PyCapsule
- required_attribute(*args, **kwargs)
Overloaded function.
1. required_attribute(name : str, type : rosetta.utility.tag.XMLSchemaType) -> rosetta.utility.tag.XMLSchemaAttribute
2. required_attribute(name : str, type : rosetta.utility.tag.XMLSchemaType, desc : str) -> rosetta.utility.tag.XMLSchemaAttribute
- type(...) from builtins.PyCapsule
- type(*args, **kwargs)
Overloaded function.
1. type(self : rosetta.utility.tag.XMLSchemaAttribute, setting : rosetta.utility.tag.XMLSchemaType) -> rosetta.utility.tag.XMLSchemaAttribute
2. type(rosetta.utility.tag.XMLSchemaAttribute) -> rosetta.utility.tag.XMLSchemaType
|
class XMLSchemaComplexType(XMLSchemaTopLevelElement) |
|
class %XMLSchemaComplexType represents the definition of the type for an element -- that is,
the structure of a set of elements with the same name. If an XMLSchemaElement is analogous to a utility::tag::Tag,
an %XMLSchemaComplexType is analogous to the wiki page describing the valid format for an instance of that Tag.
%XMLSchemaComplexTypes can be named or unnamed: if they are named, then the are inserted into the
XMLSchemaDefinition on their own, and can be referred to by name in other XMLSchemaElements; if they are
unnamed, then they are given as an in-line definition for an XMLSchemaElement. So a name is not required
for an %XMLSchemaComplexType. That said: the recommended structure for defining an XML Schema is that
complex types should be named and to live on their own -- elements should refer to these complex types by name.
(There are some who recommend that instead elements be defined at "global scope" -- i.e. directly beneath the
xs:schema tag -- and that complex types be unnamed. The principle disadvantage of that idea is that you cannot
have two elements in different contexts with the same name but different structures. This problem of "name
collisions" is addressed in XML Schema through the use of "namespacing," which is horrendous, so we won't use
it. By giving complex types names, we can avoid name collision by just giving the complex types different
names, which has no effect on the apperance of the XML file itself.)
Complex types must be one of the five options in the XMLSchemaComplexTypeType. They are either:
* empty (xsctt_empty) meaning that they do not contain any sub-elements, though they may contain attributes.
Most of the complex types in Rosetta will be declared as empty.
* sequence (xsctt_sequence) meaning that they may contain attributes, and that they expect every
one of the listed sub-elements to appear inside of them in the order defined.
* all (xsctt_all) meaning that they may contain attributes, and that they expect every one of the
listed sub-elements to appear inside of them, but that these sub-elements may appear in any order
* choice (xsctt_choice) meaning that they may contain attributes, and that they expect exactly one
of the listed sub-elements to appear, or
* group (xsctt_group) in which case, attributes are not allowed, and a list of subelements are given.
The group category is perhaps the most confusing: a complex type with a group type will contain a
sub-complex-type with either a sequence, all, or choice designation. A group can be written out
by name, and then referred to within one or more complex types. Interestingly, the way to define
flexible, recursive data types is to use a group. For example, if the ParsedProtocolMover type can
contain any mover, including a ParsedProtocolMover, then to represent this in XML schema requires
defining a group for all movers -- and then saying that instances of this group can appear within
the ParsedProtocolMoverType. Similarly, residue selectors can contain other residue selectors.
Look at ResidueSelectorFactory::define_residue_selector_xml_schema for an example of how
a group is defined.
A complex type may refer to a reference type, and then extend that type, e.g. by adding extra attributes.
In the case of a "group" complex type, the complex type needs to contain a subtype. E.g. the group
complex-type defined by ResidueSelectorFactory holds a choice complex-type.
Complex types may contain subelements; these subelements can be added through a model group
(e.g. "xs:all") that itself contains elements and possibly other model groups.
Complex types may contain attributes; these attributes can be added through the add_attribute method.
Complex types may be repeated, e.g., in the sequence or group cases. You may specify the minimum
and maximum number of times the complex type is to appaer. |
|
- Method resolution order:
- XMLSchemaComplexType
- XMLSchemaTopLevelElement
- builtins.object
Methods defined here:
- __init__(...) from builtins.PyCapsule
- __init__(*args, **kwargs)
Overloaded function.
1. __init__(handle) -> NoneType
2. __init__(handle, rosetta.utility.tag.XMLSchemaComplexType) -> NoneType
- __new__(*args, **kwargs) from builtins.type
- Create and return a new object. See help(type) for accurate signature.
- add_attribute(...) from builtins.PyCapsule
- add_attribute(self : rosetta.utility.tag.XMLSchemaComplexType, attribute : rosetta.utility.tag.XMLSchemaAttribute) -> rosetta.utility.tag.XMLSchemaComplexType
- add_attributes(...) from builtins.PyCapsule
- add_attributes(self : rosetta.utility.tag.XMLSchemaComplexType, attributes : rosetta.std.list_utility_tag_XMLSchemaAttribute_std_allocator_utility_tag_XMLSchemaAttribute_t) -> rosetta.utility.tag.XMLSchemaComplexType
- assign(...) from builtins.PyCapsule
- assign(self : rosetta.utility.tag.XMLSchemaComplexType, : rosetta.utility.tag.XMLSchemaComplexType) -> rosetta.utility.tag.XMLSchemaComplexType
- element_name(...) from builtins.PyCapsule
- element_name(rosetta.utility.tag.XMLSchemaComplexType) -> str
- name(...) from builtins.PyCapsule
- name(self : rosetta.utility.tag.XMLSchemaComplexType, setting : str) -> rosetta.utility.tag.XMLSchemaComplexType
- prepare_for_output(...) from builtins.PyCapsule
- prepare_for_output(self : rosetta.utility.tag.XMLSchemaComplexType, xsd : utility::tag::XMLSchemaDefinition) -> NoneType
- set_model_group(...) from builtins.PyCapsule
- set_model_group(self : rosetta.utility.tag.XMLSchemaComplexType, model_group : rosetta.utility.tag.XMLSchemaModelGroup) -> rosetta.utility.tag.XMLSchemaComplexType
|
class XMLSchemaComplexTypeGenerator(builtins.object) |
|
The %XMLComplexTypeSchemaGenerator is used to define the schema for a complex type
as they typically occurr in Rosetta.
There are seven main categories of complexTypes that regularly appear in Rosetta's
XML Schemas, listed in order of most common to least common:
1) complexTypes that contain only attributes, but no subelements
2) complexTypes that contain subelements that can repeat and that need not appear at all
e.g.
<DsspDesignOperation blueprint="somefile">
<Strand aa="ACDEFGH"/>
<Helix aa="ACDEFG"/>
<all append="IKLMNP"/>
<Helix exclude="P"/>
</DsspDesignOperation>
(Perhaps a repreat presence of "Helix" could be avoided, but the way DsspDesignOperation
works currently, repeat appearances are perfectly legal and sensical).
3) complexTypes that contain subelements that must appear once, where the subelements are
allowed to appear in any order,
4) complexTypes that contain subelements that can can appear zero or one times, where
the subelements are allowed to appear in any order,
5) complexTypes where one of a set of subelements must be chosen,
6) complexTypes where zero or one of a set of subelements can be chosen,
7) complexTypes where elements must appear in a particular order (which is required if you have
two "xs:group" model groups you want both of, as is the case for the OperateOnResidueSubset
task operation which can hold both a "residue_selector" group and a "res_lvl_task_op" group),
and
8) complexTypes that have ordered sets of subelements where each set is either:
a) repeatable,
b) optional,
c) required,
d) pick-one-from-a-list, or
e) pick-one-or-none-from-a-list.
In these complexTypes, no elements may appear in multiple sets.
For example, it's ok if you want to say "the <Option> subtag is first and it's either there or
not, and then afterwards you can have as many <ScoreFunction> and <TaskOperation> tags as you
want in any order, and finally, you can put either a single <PackRotamersMover> tag or a
<RotamerTrialsMover> tag." This would be like saying that the first set has an <Option>
element, and that it is optional, that the second set has both a <ScoreFunction> element
and a <TaskOperation> element and the elements of this set are repeatable, and that finally,
a third set contains the <PackRotamersMover> element and the <RotamerTrialsMover>, and that
neither has to appear but only one of the two may appear, and only once.
However, you cannot say
"The <Option> subtag is first, and its either there or not, and then afterwards, you
can have as many <ScoreFunction> and <TaskOperation> tags as you want, and then afterwards
you may have another <Option> subtag," because then the <Option> tag would appear in
two sets (the first and the third).
(The reason for this is restriction is to avoid violating the unique particle attribution
rule of XML Schema: https://en.wikipedia.org/wiki/Unique_Particle_Attribution )
Clearly XML Schema can support more kinds of elements than the eight that are supported by
this class, but these are the ones that seem to appear the most frequently. All
functionality provided by this class can also be accomplished using the XMLSchemaComplexType
and XMLSchemaElement classes, but would require a deeper understanding of XML Schema. The
niche that this class fills is to make it easy for developers to provide XSDs for these
most-common case. Adding additional functionality to this class comes at the expense of
making it less clear how the class should be used. Write me if you feel that there
categories that should be added. |
|
Methods defined here:
- __init__(...) from builtins.PyCapsule
- __init__(*args, **kwargs)
Overloaded function.
1. __init__(rosetta.utility.tag.XMLSchemaComplexTypeGenerator) -> NoneType
2. __init__(self : rosetta.utility.tag.XMLSchemaComplexTypeGenerator, src : rosetta.utility.tag.XMLSchemaComplexTypeGenerator) -> NoneType
- __new__(*args, **kwargs) from builtins.type
- Create and return a new object. See help(type) for accurate signature.
- add_attribute(...) from builtins.PyCapsule
- add_attribute(self : rosetta.utility.tag.XMLSchemaComplexTypeGenerator, attribute : rosetta.utility.tag.XMLSchemaAttribute) -> rosetta.utility.tag.XMLSchemaComplexTypeGenerator
- add_attributes(...) from builtins.PyCapsule
- add_attributes(self : rosetta.utility.tag.XMLSchemaComplexTypeGenerator, attributes : rosetta.std.list_utility_tag_XMLSchemaAttribute_std_allocator_utility_tag_XMLSchemaAttribute_t) -> rosetta.utility.tag.XMLSchemaComplexTypeGenerator
- add_optional_name_attribute(...) from builtins.PyCapsule
- add_optional_name_attribute(rosetta.utility.tag.XMLSchemaComplexTypeGenerator) -> rosetta.utility.tag.XMLSchemaComplexTypeGenerator
- add_ordered_subelement_set_as_optional(...) from builtins.PyCapsule
- add_ordered_subelement_set_as_optional(self : rosetta.utility.tag.XMLSchemaComplexTypeGenerator, subelements : rosetta.utility.tag.XMLSchemaSimpleSubelementList) -> rosetta.utility.tag.XMLSchemaComplexTypeGenerator
Add a subelement list to a growing set of ordered subelements, where elements in
this set are labeled as being optional. There should be only a single element in the
input subelement list.
This function corresponds to case 8b in the list of behaviors above and calling it
overrides any of the functions for cases 1-7.
- add_ordered_subelement_set_as_pick_one(...) from builtins.PyCapsule
- add_ordered_subelement_set_as_pick_one(self : rosetta.utility.tag.XMLSchemaComplexTypeGenerator, subelements : rosetta.utility.tag.XMLSchemaSimpleSubelementList) -> rosetta.utility.tag.XMLSchemaComplexTypeGenerator
Add a subelement list to a growing set of ordered subelements, where elements in
this set are labeled as "pick exactly one". There should be more than one element in the
input subelement list.
This function corresponds to case 8d in the list of behaviors above and calling it
overrides any of the functions for cases 1-7.
- add_ordered_subelement_set_as_pick_one_or_none(...) from builtins.PyCapsule
- add_ordered_subelement_set_as_pick_one_or_none(self : rosetta.utility.tag.XMLSchemaComplexTypeGenerator, subelements : rosetta.utility.tag.XMLSchemaSimpleSubelementList) -> rosetta.utility.tag.XMLSchemaComplexTypeGenerator
Add a subelement list to a growing set of ordered subelements, where elements in
this set are labeled as "pick one or none". There should be more than one element in the
input subelement list.
This function corresponds to case 8e in the list of behaviors above and calling it
overrides any of the functions for cases 1-7.
- add_ordered_subelement_set_as_repeatable(...) from builtins.PyCapsule
- add_ordered_subelement_set_as_repeatable(self : rosetta.utility.tag.XMLSchemaComplexTypeGenerator, subelements : rosetta.utility.tag.XMLSchemaSimpleSubelementList) -> rosetta.utility.tag.XMLSchemaComplexTypeGenerator
Add a subelement list to a growing set of ordered subelements, where elements in
this set are labeled as being repeatable.
This function corresponds to case 8a in the list of behaviors above and calling it
overrides any of the functions for cases 1-7.
- add_ordered_subelement_set_as_required(...) from builtins.PyCapsule
- add_ordered_subelement_set_as_required(self : rosetta.utility.tag.XMLSchemaComplexTypeGenerator, subelements : rosetta.utility.tag.XMLSchemaSimpleSubelementList) -> rosetta.utility.tag.XMLSchemaComplexTypeGenerator
Add a subelement list to a growing set of ordered subelements, where elements in
this set are labeled as being requried. There should be only a single element in the
input subelement list.
This function corresponds to case 8c in the list of behaviors above and calling it
overrides any of the functions for cases 1-7.
- add_required_name_attribute(...) from builtins.PyCapsule
- add_required_name_attribute(rosetta.utility.tag.XMLSchemaComplexTypeGenerator) -> rosetta.utility.tag.XMLSchemaComplexTypeGenerator
- assign(...) from builtins.PyCapsule
- assign(self : rosetta.utility.tag.XMLSchemaComplexTypeGenerator, rhs : rosetta.utility.tag.XMLSchemaComplexTypeGenerator) -> rosetta.utility.tag.XMLSchemaComplexTypeGenerator
- element_name(...) from builtins.PyCapsule
- element_name(self : rosetta.utility.tag.XMLSchemaComplexTypeGenerator, : str) -> rosetta.utility.tag.XMLSchemaComplexTypeGenerator
- set_subelements_pick_one(...) from builtins.PyCapsule
- set_subelements_pick_one(self : rosetta.utility.tag.XMLSchemaComplexTypeGenerator, subelements : rosetta.utility.tag.XMLSchemaSimpleSubelementList) -> rosetta.utility.tag.XMLSchemaComplexTypeGenerator
set the set of subelements with the stipulation that exactly one must be chosen.
This function represents case 5 in the list of behaviors above.
- set_subelements_pick_one_or_none(...) from builtins.PyCapsule
- set_subelements_pick_one_or_none(self : rosetta.utility.tag.XMLSchemaComplexTypeGenerator, subelements : rosetta.utility.tag.XMLSchemaSimpleSubelementList) -> rosetta.utility.tag.XMLSchemaComplexTypeGenerator
set the set of subelements with the stipulation that one or none should be chosen.
This function represents case 6 in the list of behaviors above.
- set_subelements_repeatable(...) from builtins.PyCapsule
- set_subelements_repeatable(*args, **kwargs)
Overloaded function.
1. set_subelements_repeatable(self : rosetta.utility.tag.XMLSchemaComplexTypeGenerator, subelements : rosetta.utility.tag.XMLSchemaSimpleSubelementList) -> rosetta.utility.tag.XMLSchemaComplexTypeGenerator
set subelements as repeatable (and optional); setting the sub-elements replaces any sub-elements that were
previously set. These repeatable subelements are allowed to appear in any order from the point of view of the XML
Schema, which is not to say that the order in which they appear cannot matter to the code reading these subelements.
This function represents case 2 in the list of behaviors above.
2. set_subelements_repeatable(self : rosetta.utility.tag.XMLSchemaComplexTypeGenerator, subelements : rosetta.utility.tag.XMLSchemaSimpleSubelementList, min_occurs : int) -> rosetta.utility.tag.XMLSchemaComplexTypeGenerator
set subelements as repeatable (and optional); setting the sub-elements replaces any sub-elements that were
previously set. These repeatable subelements are allowed to appear in any order from the point of view of the XML
Schema, which is not to say that the order in which they appear cannot matter to the code reading these subelements.
This function represents case 2 in the list of behaviors above.
3. set_subelements_repeatable(self : rosetta.utility.tag.XMLSchemaComplexTypeGenerator, subelements : rosetta.utility.tag.XMLSchemaSimpleSubelementList, min_occurs : int, max_occurs : int) -> rosetta.utility.tag.XMLSchemaComplexTypeGenerator
set subelements as repeatable (and optional); setting the sub-elements replaces any sub-elements that were
previously set. These repeatable subelements are allowed to appear in any order from the point of view of the XML
Schema, which is not to say that the order in which they appear cannot matter to the code reading these subelements.
This function represents case 2 in the list of behaviors above.
- set_subelements_single_appearance_optional(...) from builtins.PyCapsule
- set_subelements_single_appearance_optional(self : rosetta.utility.tag.XMLSchemaComplexTypeGenerator, subelements : rosetta.utility.tag.XMLSchemaSimpleSubelementList) -> rosetta.utility.tag.XMLSchemaComplexTypeGenerator
set subelements as single-appearance (and optional); setting the sub-elements replaces any sub-elements that were previously set.
These single-appearance subelements are allowed to appear in any order from the point of view of the XML Schema, which is
not to say that the order in which they appear cannot matter to the code reading these subelements.
This function represents case 4 in the list of behaviors above.
- set_subelements_single_appearance_required(...) from builtins.PyCapsule
- set_subelements_single_appearance_required(self : rosetta.utility.tag.XMLSchemaComplexTypeGenerator, subelements : rosetta.utility.tag.XMLSchemaSimpleSubelementList) -> rosetta.utility.tag.XMLSchemaComplexTypeGenerator
set subelements as single-appearance (and required); setting the sub-elements replaces any sub-elements that were previously set.
These single-appearance subelements are allowed to appear in any order from the point of view of the XML Schema, which is
not to say that the order in which they appear cannot matter to the code reading these subelements.
Due to limitations of XML Schema, if you have a "group" subelement, then it must appear alone; it may not appear with
any other group subelements, and it may not appear with other "regular" subelements.
This function represents case 3 in the list of behaviors above.
- set_subelements_single_appearance_required_and_ordered(...) from builtins.PyCapsule
- set_subelements_single_appearance_required_and_ordered(self : rosetta.utility.tag.XMLSchemaComplexTypeGenerator, subelements : rosetta.utility.tag.XMLSchemaSimpleSubelementList) -> rosetta.utility.tag.XMLSchemaComplexTypeGenerator
set subelements as single-appearance (and required) with a specified order;
setting the sub-elements replaces any sub-elements that were previously set.
This function represents case 7 in the list of behaviors above.
- subelement_behavior(...) from builtins.PyCapsule
- subelement_behavior(rosetta.utility.tag.XMLSchemaComplexTypeGenerator) -> rosetta.utility.tag.CTGenSubelementBehavior
Return what the internal settings of the instance have been set to;
this lets one class give another class access to a generator, and then inspect it
on a crude level when it gets it back.
- write_complex_type_to_schema(...) from builtins.PyCapsule
- write_complex_type_to_schema(self : rosetta.utility.tag.XMLSchemaComplexTypeGenerator, xsd : rosetta.utility.tag.XMLSchemaDefinition) -> NoneType
|
class XMLSchemaElement(XMLSchemaParticle) |
|
An XMLSchema element, e.g. the FixbbMover "tag" <FixbbMover name="fixbb" task_operations="ex1,ex2"/> or
the And element which contains a sub-element: <And><Chain id="A"/></And>. An element can be defined with an
unnamed complex type in-line, or it can say that its type is that of a complex type defined elsewhere.
(In XML naming a tag is a single block beginning with "<" and ending with ">", so both "<And>" and "</And>"
are tags. The block between the opening and closing tags is called an element. The utility::tag::Tag class
represents a complete Element, and not simply the opening or closing tag of an element. This is certainly
confusing.
An element may either have its type definition given inline (i.e. as a sub-tag / sub-element of the
element declaration) as either a complex type or a restriction -- or it may have its type definition given by
reference to a (named) type defined elsewhere in the XML Schema. In Rosetta's style of XML, the type of an
element is universally a complex type; if the element's type were given as either a primitive type, or a
restriction, then the data would have to appear between two tags, e.g.
<FirstName> Andrew </FirstName>
and in Rosetta's XML, we ignore everything that appears outside of a tag, and store all of the data in
attributes (aka options) inside of tags. The elements in Rosetta either are "empty" or they contain
sub-elements: both of these are classified as complex types in XML Schema.
Elements may appear multiple times, and the number of times they must/may appear are controlled
by the min_occurs and max_occurs functions. If you are setting no limit on max_occurs, use the
"xsminmax_unbounded" value of the XMLSchemaMinOccursMaxOccurs enumeration. |
|
- Method resolution order:
- XMLSchemaElement
- XMLSchemaParticle
- XMLSchemaTopLevelElement
- builtins.object
Methods defined here:
- __init__(...) from builtins.PyCapsule
- __init__(*args, **kwargs)
Overloaded function.
1. __init__(handle) -> NoneType
2. __init__(handle, rosetta.utility.tag.XMLSchemaElement) -> NoneType
- __new__(*args, **kwargs) from builtins.type
- Create and return a new object. See help(type) for accurate signature.
- assign(...) from builtins.PyCapsule
- assign(self : rosetta.utility.tag.XMLSchemaElement, : rosetta.utility.tag.XMLSchemaElement) -> rosetta.utility.tag.XMLSchemaElement
- element_name(...) from builtins.PyCapsule
- element_name(rosetta.utility.tag.XMLSchemaElement) -> str
- element_type_def(...) from builtins.PyCapsule
- element_type_def(self : rosetta.utility.tag.XMLSchemaElement, setting : rosetta.utility.tag.XMLSchemaComplexType) -> rosetta.utility.tag.XMLSchemaElement
- name(...) from builtins.PyCapsule
- name(self : rosetta.utility.tag.XMLSchemaElement, setting : str) -> rosetta.utility.tag.XMLSchemaElement
- prepare_for_output(...) from builtins.PyCapsule
- prepare_for_output(self : rosetta.utility.tag.XMLSchemaElement, xsd : utility::tag::XMLSchemaDefinition) -> NoneType
- reference_name(...) from builtins.PyCapsule
- reference_name(self : rosetta.utility.tag.XMLSchemaElement, setting : str) -> rosetta.utility.tag.XMLSchemaElement
- set_abstract(...) from builtins.PyCapsule
- set_abstract(rosetta.utility.tag.XMLSchemaElement) -> rosetta.utility.tag.XMLSchemaElement
- substitution_group(...) from builtins.PyCapsule
- substitution_group(self : rosetta.utility.tag.XMLSchemaElement, setting : str) -> rosetta.utility.tag.XMLSchemaElement
- type_name(...) from builtins.PyCapsule
- type_name(self : rosetta.utility.tag.XMLSchemaElement, setting : rosetta.utility.tag.XMLSchemaType) -> rosetta.utility.tag.XMLSchemaElement
Methods inherited from XMLSchemaParticle:
- max_occurs(...) from builtins.PyCapsule
- max_occurs(*args, **kwargs)
Overloaded function.
1. max_occurs(self : rosetta.utility.tag.XMLSchemaParticle, setting : int) -> rosetta.utility.tag.XMLSchemaParticle
2. max_occurs(rosetta.utility.tag.XMLSchemaParticle) -> int
- min_occurs(...) from builtins.PyCapsule
- min_occurs(*args, **kwargs)
Overloaded function.
1. min_occurs(self : rosetta.utility.tag.XMLSchemaParticle, setting : int) -> rosetta.utility.tag.XMLSchemaParticle
2. min_occurs(rosetta.utility.tag.XMLSchemaParticle) -> int
|
class XMLSchemaModelGroup(XMLSchemaParticle) |
|
The ModelGroup covers four XML Schema model groups: xs:sequence,
xs:choice, xs:all, and xs:group. A ModelGroup may contain any number of
XMLSchemaParticles, interchanging between XMLElements and XMLModelGroups,
BUT there are some fairly heavy restrictions on the xs:all model group,
marginally enforced by this class and by XMLSchemaComplexType.
This class is not exactly a top-level element, in that only xs:group is
allowed to appear at the top level, but it is definitely worthwhile for
this class to implement the write_definition funciton. |
|
- Method resolution order:
- XMLSchemaModelGroup
- XMLSchemaParticle
- XMLSchemaTopLevelElement
- builtins.object
Methods defined here:
- __init__(...) from builtins.PyCapsule
- __init__(*args, **kwargs)
Overloaded function.
1. __init__(handle) -> NoneType
2. __init__(self : handle, type : rosetta.utility.tag.XMLSchemaModelGroupType) -> NoneType
3. __init__(self : handle, type : rosetta.utility.tag.XMLSchemaModelGroupType, particles : rosetta.std.list_std_shared_ptr_const_utility_tag_XMLSchemaParticle_std_allocator_std_shared_ptr_const_utility_tag_XMLSchemaParticle_t) -> NoneType
4. __init__(self : handle, group_name : str) -> NoneType
5. __init__(handle, rosetta.utility.tag.XMLSchemaModelGroup) -> NoneType
- __new__(*args, **kwargs) from builtins.type
- Create and return a new object. See help(type) for accurate signature.
- append_particle(...) from builtins.PyCapsule
- append_particle(self : rosetta.utility.tag.XMLSchemaModelGroup, particle : rosetta.utility.tag.XMLSchemaParticle) -> rosetta.utility.tag.XMLSchemaModelGroup
- append_particles(...) from builtins.PyCapsule
- append_particles(self : rosetta.utility.tag.XMLSchemaModelGroup, particles : rosetta.std.list_std_shared_ptr_const_utility_tag_XMLSchemaParticle_std_allocator_std_shared_ptr_const_utility_tag_XMLSchemaParticle_t) -> rosetta.utility.tag.XMLSchemaModelGroup
- assign(...) from builtins.PyCapsule
- assign(self : rosetta.utility.tag.XMLSchemaModelGroup, : rosetta.utility.tag.XMLSchemaModelGroup) -> rosetta.utility.tag.XMLSchemaModelGroup
- element_name(...) from builtins.PyCapsule
- element_name(rosetta.utility.tag.XMLSchemaModelGroup) -> str
- group_name(...) from builtins.PyCapsule
- group_name(self : rosetta.utility.tag.XMLSchemaModelGroup, name : str) -> rosetta.utility.tag.XMLSchemaModelGroup
- prepare_for_output(...) from builtins.PyCapsule
- prepare_for_output(self : rosetta.utility.tag.XMLSchemaModelGroup, xsd : utility::tag::XMLSchemaDefinition) -> NoneType
- type(...) from builtins.PyCapsule
- type(self : rosetta.utility.tag.XMLSchemaModelGroup, type : rosetta.utility.tag.XMLSchemaModelGroupType) -> rosetta.utility.tag.XMLSchemaModelGroup
Methods inherited from XMLSchemaParticle:
- max_occurs(...) from builtins.PyCapsule
- max_occurs(*args, **kwargs)
Overloaded function.
1. max_occurs(self : rosetta.utility.tag.XMLSchemaParticle, setting : int) -> rosetta.utility.tag.XMLSchemaParticle
2. max_occurs(rosetta.utility.tag.XMLSchemaParticle) -> int
- min_occurs(...) from builtins.PyCapsule
- min_occurs(*args, **kwargs)
Overloaded function.
1. min_occurs(self : rosetta.utility.tag.XMLSchemaParticle, setting : int) -> rosetta.utility.tag.XMLSchemaParticle
2. min_occurs(rosetta.utility.tag.XMLSchemaParticle) -> int
|
class XMLSchemaParticle(XMLSchemaTopLevelElement) |
|
This abstract class is meant to represent either an XMLSChemaElement
or an XMLSchemaModelGroup so that the interchangable set of these objects
in a ModelGroup can be represented. I may be misusing the term "particle"
in the way that it is meant within XML Schema -- so the mapping of this term
to the term used in XML Schema is probably imperfect. |
|
- Method resolution order:
- XMLSchemaParticle
- XMLSchemaTopLevelElement
- builtins.object
Methods defined here:
- __init__(self, /, *args, **kwargs)
- Initialize self. See help(type(self)) for accurate signature.
- __new__(*args, **kwargs) from builtins.type
- Create and return a new object. See help(type) for accurate signature.
- assign(...) from builtins.PyCapsule
- assign(self : rosetta.utility.tag.XMLSchemaParticle, : rosetta.utility.tag.XMLSchemaParticle) -> rosetta.utility.tag.XMLSchemaParticle
- max_occurs(...) from builtins.PyCapsule
- max_occurs(*args, **kwargs)
Overloaded function.
1. max_occurs(self : rosetta.utility.tag.XMLSchemaParticle, setting : int) -> rosetta.utility.tag.XMLSchemaParticle
2. max_occurs(rosetta.utility.tag.XMLSchemaParticle) -> int
- min_occurs(...) from builtins.PyCapsule
- min_occurs(*args, **kwargs)
Overloaded function.
1. min_occurs(self : rosetta.utility.tag.XMLSchemaParticle, setting : int) -> rosetta.utility.tag.XMLSchemaParticle
2. min_occurs(rosetta.utility.tag.XMLSchemaParticle) -> int
Methods inherited from XMLSchemaTopLevelElement:
- element_name(...) from builtins.PyCapsule
- element_name(rosetta.utility.tag.XMLSchemaTopLevelElement) -> str
- prepare_for_output(...) from builtins.PyCapsule
- prepare_for_output(self : rosetta.utility.tag.XMLSchemaTopLevelElement, xsd : utility::tag::XMLSchemaDefinition) -> NoneType
|
class XMLSchemaRestriction(XMLSchemaTopLevelElement) |
|
class %XMLSchemaRestriction describes a refinement on the behavior of existing
types. For example, one could define a restriction representing a list of residue indexes
separating commas: "15,44,102" and then describe an attribute of a complex type as having
to conform to that restriction. An xml-schema validator would be able to say that an input
file with "fifteen,fortyfour,onehundredandtwo" did not meet the schema.
See the description of XML schema restrictions here:
http://www.w3schools.com/xml/schema_facets.asp
Restrictions are given as pairs of restriction types and then values for those restriction
types. The restriction types are defined in an enumeration in XMLSchemaGeneration.fwd.hh.
An example of a useful XMLSchemaRestriction is oen to define a comma-separated list of integers.
The elements in the XMLSchema that would define such a restriction look like this: |
|
- Method resolution order:
- XMLSchemaRestriction
- XMLSchemaTopLevelElement
- builtins.object
Methods defined here:
- __init__(...) from builtins.PyCapsule
- __init__(*args, **kwargs)
Overloaded function.
1. __init__(handle) -> NoneType
2. __init__(handle, rosetta.utility.tag.XMLSchemaRestriction) -> NoneType
- __new__(*args, **kwargs) from builtins.type
- Create and return a new object. See help(type) for accurate signature.
- add_restriction(...) from builtins.PyCapsule
- add_restriction(self : rosetta.utility.tag.XMLSchemaRestriction, type : rosetta.utility.tag.XMLSchemaRestrictionType, value : str) -> NoneType
- assign(...) from builtins.PyCapsule
- assign(self : rosetta.utility.tag.XMLSchemaRestriction, : rosetta.utility.tag.XMLSchemaRestriction) -> rosetta.utility.tag.XMLSchemaRestriction
- base_type(...) from builtins.PyCapsule
- base_type(self : rosetta.utility.tag.XMLSchemaRestriction, setting : rosetta.utility.tag.XMLSchemaType) -> NoneType
- element_name(...) from builtins.PyCapsule
- element_name(rosetta.utility.tag.XMLSchemaRestriction) -> str
- name(...) from builtins.PyCapsule
- name(self : rosetta.utility.tag.XMLSchemaRestriction, setting : str) -> NoneType
- prepare_for_output(...) from builtins.PyCapsule
- prepare_for_output(self : rosetta.utility.tag.XMLSchemaRestriction, xsd : utility::tag::XMLSchemaDefinition) -> NoneType
|
class XMLSchemaSimpleSubelementList(builtins.object) |
|
The XMLSchemaSimpleSubelementList class defines an interface that can be used by those wishing
to define a complexType that contains sub-elements. The structure of the XML Schema for the sub-elements
will determined by how this list is given to the XMLSchemaComplexTypeGenerator.
"simple" subelements are those which themselves contain no subelements (but may contain attributes).
Also allowed are subelements that refer to previously-defined complexTypes or those that refer to
previously defined xs:groups. |
|
Methods defined here:
- __init__(...) from builtins.PyCapsule
- __init__(*args, **kwargs)
Overloaded function.
1. __init__(rosetta.utility.tag.XMLSchemaSimpleSubelementList) -> NoneType
2. __init__(self : rosetta.utility.tag.XMLSchemaSimpleSubelementList, src : rosetta.utility.tag.XMLSchemaSimpleSubelementList) -> NoneType
- __new__(*args, **kwargs) from builtins.type
- Create and return a new object. See help(type) for accurate signature.
- add_simple_subelement(...) from builtins.PyCapsule
- add_simple_subelement(*args, **kwargs)
Overloaded function.
1. add_simple_subelement(self : rosetta.utility.tag.XMLSchemaSimpleSubelementList, name : str, : rosetta.std.list_utility_tag_XMLSchemaAttribute_std_allocator_utility_tag_XMLSchemaAttribute_t) -> rosetta.utility.tag.XMLSchemaSimpleSubelementList
Add a new subelement to the growing list of subelements, defined by its name and a (possibly empty) list of attributes
This subelement may not itself contain other subelements, however. The name for the complexType of this element will be
derived from the function given in complex_type_naming_func, if provided, and otherwise, the complexType for this element
will be listed within the element declaration and will be unnamed.
2. add_simple_subelement(self : rosetta.utility.tag.XMLSchemaSimpleSubelementList, name : str, : rosetta.std.list_utility_tag_XMLSchemaAttribute_std_allocator_utility_tag_XMLSchemaAttribute_t, min_occurs : int) -> rosetta.utility.tag.XMLSchemaSimpleSubelementList
Add a new subelement to the growing list of subelements, but where the minimum and maximum number of
occurrences for this subelement has been set; note: usually, the min and max are set by the
XMLSchemaComplexTypeGenerator, and so tension could arise between the generator and your settings.
Consider this an advanced function.
3. add_simple_subelement(self : rosetta.utility.tag.XMLSchemaSimpleSubelementList, name : str, : rosetta.std.list_utility_tag_XMLSchemaAttribute_std_allocator_utility_tag_XMLSchemaAttribute_t, min_occurs : int, max_occurs : int) -> rosetta.utility.tag.XMLSchemaSimpleSubelementList
Add a new subelement to the growing list of subelements, but where the minimum and maximum number of
occurrences for this subelement has been set; note: usually, the min and max are set by the
XMLSchemaComplexTypeGenerator, and so tension could arise between the generator and your settings.
Consider this an advanced function.
- assign(...) from builtins.PyCapsule
- assign(self : rosetta.utility.tag.XMLSchemaSimpleSubelementList, rhs : rosetta.utility.tag.XMLSchemaSimpleSubelementList) -> rosetta.utility.tag.XMLSchemaSimpleSubelementList
- complex_typename_for_element(...) from builtins.PyCapsule
- complex_typename_for_element(self : rosetta.utility.tag.XMLSchemaSimpleSubelementList, element_name : str) -> str
- element_list(...) from builtins.PyCapsule
- element_list(rosetta.utility.tag.XMLSchemaSimpleSubelementList) -> rosetta.std.list_utility_tag_XMLSchemaSimpleSubelementList_ElementSummary_std_allocator_utility_tag_XMLSchemaSimpleSubelementList_ElementSummary_t
- simple_element_naming_func_has_been_set(...) from builtins.PyCapsule
- simple_element_naming_func_has_been_set(rosetta.utility.tag.XMLSchemaSimpleSubelementList) -> bool
|
class XMLSchemaType(builtins.object) |
|
class %XMLSchemaType represents the name of a defined type that can
be used to describe either an XMLElement or an XMLAttribute. It may refer
to either a complex type or to a primative type or to a simple type. |
|
Methods defined here:
- __init__(...) from builtins.PyCapsule
- __init__(*args, **kwargs)
Overloaded function.
1. __init__(rosetta.utility.tag.XMLSchemaType) -> NoneType
2. __init__(self : rosetta.utility.tag.XMLSchemaType, setting : rosetta.utility.tag.XMLSchemaDataType) -> NoneType
3. __init__(self : rosetta.utility.tag.XMLSchemaType, setting : rosetta.utility.tag.XMLSchemaCommonType) -> NoneType
4. __init__(self : rosetta.utility.tag.XMLSchemaType, custom_type : str) -> NoneType
5. __init__(self : rosetta.utility.tag.XMLSchemaType, custom_type : str) -> NoneType
6. __init__(self : rosetta.utility.tag.XMLSchemaType, : rosetta.utility.tag.XMLSchemaType) -> NoneType
- __new__(*args, **kwargs) from builtins.type
- Create and return a new object. See help(type) for accurate signature.
- assign(...) from builtins.PyCapsule
- assign(self : rosetta.utility.tag.XMLSchemaType, : rosetta.utility.tag.XMLSchemaType) -> rosetta.utility.tag.XMLSchemaType
- common_type(...) from builtins.PyCapsule
- common_type(*args, **kwargs)
Overloaded function.
1. common_type(self : rosetta.utility.tag.XMLSchemaType, setting : rosetta.utility.tag.XMLSchemaCommonType) -> NoneType
2. common_type(rosetta.utility.tag.XMLSchemaType) -> rosetta.utility.tag.XMLSchemaCommonType
- custom_type_name(...) from builtins.PyCapsule
- custom_type_name(self : rosetta.utility.tag.XMLSchemaType, setting : str) -> NoneType
- type(...) from builtins.PyCapsule
- type(*args, **kwargs)
Overloaded function.
1. type(self : rosetta.utility.tag.XMLSchemaType, setting : rosetta.utility.tag.XMLSchemaDataType) -> NoneType
2. type(rosetta.utility.tag.XMLSchemaType) -> rosetta.utility.tag.XMLSchemaDataType
- type_name(...) from builtins.PyCapsule
- type_name(rosetta.utility.tag.XMLSchemaType) -> str
|
|