Package pyxb :: Package binding :: Module facets :: Class Facet |
[hide private]
[frames] | no frames]

# type Facet

source code

    object --+
             |
       cscRoot --+
                 |
                Facet

Known Subclasses:
  - ConstrainingFacet
  - , FundamentalFacet

The base class for facets.

This provides association with STDs, a name, and a value for the facet.

Instance Methods | [hide private]
baseTypeDefinition(self) The SimpleTypeDefinition component restricted by this facet. | source code
ownerTypeDefinition(self) The SimpleTypeDefinition component to which this facet belongs. | source code
valueDatatype(self) Get the datatype used to represent values of the facet. | source code
_value(self, v) | source code
value(self) | source code
annotation(self) | source code
__init__(self, **kw) Create a facet instance, initializing it from the keyword parameters. | source code
_setFromKeywords_vb(self, **kw) Configure values of the facet from a set of keywords. | source code
setFromKeywords(self, **kw) Public entrypoint to the _setFromKeywords_vb call hierarchy. | source code
_valueString(self) | source code
__str__(self) | source code

Class Methods | [hide private]
Name(self) The name of a facet is a class constant. | source code
ClassForFacet(cls, name) Given the name of a facet, return the Facet subclass that represents it. | source code

Class Variables | [hide private]
| _Name = `None`
| __baseTypeDefinition = `None`
| __ownerTypeDefinition = `None`
| _ValueDatatype = `None`
| __valueDatatype = `None`
| __value = `None`
| __annotation = `None`
| Facets = ``[`<class 'pyxb.binding.facets.CF_length'>`,` <class 'pyx`...``

Method Details | [hide private]

### baseTypeDefinition(self) | source code
The SimpleTypeDefinition component restricted by this facet. Note: this is NOT the STD to which the facet belongs, but is usually that STD's base type. I.e., this jumps us through all the containing restrictions and extensions to get to the core type definition.

### ownerTypeDefinition(self) | source code
The SimpleTypeDefinition component to which this facet belongs. I.e., the one in which the hasFacet specification was found. This value is None if the facet is not associated with an STD.

### valueDatatype(self) | source code
Get the datatype used to represent values of the facet. This usually has nothing to do with the owner datatype; for example, the length facet may apply to any STD but the value of the facet is an integer. In generated bindings this is usually set explicitly in the facet constructor; when processing a schema, it is derived from the value's type definition.

### __init__(self, **kw) (Constructor) | source code
Create a facet instance, initializing it from the keyword parameters. Overrides: cscRoot.__init__

### _setFromKeywords_vb(self, **kw) | source code
Configure values of the facet from a set of keywords. This method is pre-extended; subclasses should invoke the parent method after setting their local configuration. Parameters: `_reset` - If `False` or missing, existing values will be retained if they do not appear in the keywords. If `True`, members not defined in the keywords are set to a default. `base_type_definition` `owner_type_definition` `value_datatype`

### __str__(self) (Informal representation operator) | source code
Overrides: object.__str__ (inherited documentation)

Class Variable Details | [hide private]

  ### Facets Value:
      [<class 'pyxb.binding.facets.CF_length'>,
       <class 'pyxb.binding.facets.CF_minLength'>,
       <class 'pyxb.binding.facets.CF_maxLength'>,
       <class 'pyxb.binding.facets.CF_pattern'>,
       <class 'pyxb.binding.facets.CF_enumeration'>,
       <class 'pyxb.binding.facets.CF_whiteSpace'>,
       <class 'pyxb.binding.facets.CF_minInclusive'>,
       <class 'pyxb.binding.facets.CF_maxInclusive'>,
      ...