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

Class Facet

source code

object --+    
         |    
   cscRoot --+
             |
            Facet
Known Subclasses:

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)
str(x)
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

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
hash(x)
  __baseTypeDefinition = None
hash(x)
  __ownerTypeDefinition = None
hash(x)
  _ValueDatatype = None
hash(x)
  __valueDatatype = None
hash(x)
  __value = None
hash(x)
  __annotation = None
hash(x)
  Facets = [<class 'pyxb.binding.facets.CF_length'>, <class 'pyx...
Properties [hide private]

Inherited from object: __class__

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: object.__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 

str(x)

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'>,
...