| Author: | Dave Kuhlman |
|---|---|
| Address: |<EMAIL_ADDRESS>http://www.rexx.com/~dkuhlman |
| revision: | 1.18c |
|---|
| date: | August 11, 2009 |
|---|
| copyright: | Copyright (c) 2004 Dave Kuhlman. This documentation and the software it describes is covered by The MIT License: http://www.opensource.org/licenses/mit-license. |
|---|---|
| abstract: | generateDS.py generates Python data structures (for example, class definitions) from an XML Schema document. These data structures represent the elements in an XML document described by the XML Schema. It also generates parsers that load an XML document into those data structures. In addition, a separate file containing subclasses (stubs) is optionally generated. The user can add methods to the subclasses in order to process the contents of an XML document. |
Contents
generateDS.py generates Python data structures (for example, class definitions) from an XML Schema document. These data structures represent the elements in an XML document described by the XML Schema. It also generates parsers that load an XML document into those data structures. In addition, a separate file containing subclasses (stubs) is optionally generated. The user can add methods to the subclasses in order to process the contents of an XML document.
The generated Python code contains:
The generated classes contain the following:
The generated subclass file contains one (sub-)class definition for each data representation class. If the subclass file is used, then the parser creates instances of the subclasses (instead of creating instances of the superclasses). This enables the user to extend the subclasses with "tree walk" methods, for example, that process the contents of the XML file. The user can also generate and extend multiple subclass files which use a single, common superclass file, thus implementing a number of different processes on the same XML document type.
This document explains (1) how to use generateDS.py; (2) how to use the Python code and data structures that it generates; and (3) how to modify the generated code for special purposes.
You can find the distribution here: http://www.rexx.com/~dkuhlman/generateDS-1.18c.tar.gz
It is also available at SourceForge: http://sourceforge.net/projects/generateds/
There is a mailing list at SourceForge: http://sourceforge.net/mail/?group_id=183592
Newer versions of Python have XML support in the Python standard library. For older versions of Python, install PyXML. You can find it at: http://pyxml.sourceforge.net/
De-compress the generateDS distribution file. Use something like the following:
tar xzvf generateDS-x.xx.tar.gz
Then, the regular Distutils commands should work:
$ cd generateDS-x.xx $ python setup.py build $ python setup.py install # probably as root
Run generateDS.py with a single argument, the XML Schema file that defines the data structures. For example, the following will generate Python source code for data structures described in people.xsd and will write it to the file people.py. In addition, it will write subclass stubs to the file peoplesubs.py:
python generateDS.py -o people.py -s peoplesubs.py people.xsd
Here is the usage message displayed by generateDS.py:
Synopsis: Generate Python classes from XML Schema definition. Input is read from in_xsd_file or, if "-" (dash) arg, from stdin. Output is written to files named in "-o" and "-s" options. Usage: python generateDS.py [ options ] <xsd_file> python generateDS.py [ options ] - Options: -h, --help Display this help information. -o <outfilename> Output file name for data representation classes -s <subclassfilename> Output file name for subclasses -p <prefix> Prefix string to be pre-pended to the class names -f Force creation of output files. Do not ask. -a <namespaceabbrev> Namespace abbreviation, e.g. "xsd:". Default = 'xs:'. -b <behaviorfilename> Input file name for behaviors added to subclasses -m Generate properties for member variables --search-path="a:b:c:d" Search these directories for additional schema files. --subclass-suffix="XXX" Append XXX to the generated subclass names. Default="Sub". --root-element="XXX" Assume XXX is root element of instance docs. Default is first element defined in schema. --super="XXX" Super module name in subclass module. Default="???" --validator-bodies=path Path to a directory containing files that provide bodies (implementations) of validator methods. --use-old-getter-setter Name getters and setters getVar() and setVar(), instead of get_var() and set_var(). --user-methods= <module>, -u <module> Optional module containing user methods. See section "User Methods" in the documentation. --no-process-includes Do not process included XML Schema files. By default, generateDS.py will insert content from files referenced by <include ... /> elements into the XML Schema to be processed. --silence Normally, the code generated with generateDS echoes the information being parsed. To prevent the echo from occurring, use the --silence switch. --namespacedef='xmlns:abc="http://www.abc.com" Namespace definition to be passed in as the value for the namespacedef_ parameter of the export() method by the generated parse() and parseString() functions. Default=''. --external-encoding=<encoding> Encode output written by the generated export methods using this encoding. Default, if omitted, is the value returned by sys.getdefaultencoding(). Example: --external-encoding='utf-8'. --member-specs=list|dict Generate member (type) specifications in each class: a dictionary of instances of class _MemberSpec containing member name, type, and array or not. Allowed values are "list" or "dict". Default: None. --version Print version and exit.
The following command line flags are recognized by generateDS.py:
Namespace abbreviation, for example "xsd:". The default is 'xs:'. If the <schema> element in your XML Schema, specifies something other than "xmlns:xs=", then you need to use this option. So, suppose you have the following at the beginning of your XSchema file:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
Then you can the following command line option:
-a "xsd:"
But, note that generateDS.py also tries to pick-up the namespace prefix used in the XMLSchema file automatically. If the <schema> element has an attribute "xmlns:xxx" whose value is "http://www.w3.org/2001/XMLSchema", then generateDS.py will use "xxx:" as the alias for the XMLSchema namespace in the XMLSchema document.
Append suffix to the name of classes generated in the subclass file. The default, if omitted, is "Sub". For example, the following will append "_Action" to each generated subclass name:
generateDS.py --subclass-suffix="_Action" -s actions.py mydef.xsd
And the following will append nothing, making the superclass and subclass names the same:
generateDS.py --subclass-suffix="" -s actions.py mydef.xsd
Make module_name the name of the superclass module imported by the subclass module. If this flag is omitted, the following is generated near the top of the subclass file:
import ??? as supermod
and you will need to hand edit this so the correct superclass module is imported.
In some cases the element and attribute names in an XML document will conflict with Python keywords. In order to avoid these clashes, generateDS.py contains a table that maps names that might clash to acceptable names. This table is a Python dictionary named NameTable. The user can modify existing entries and add additional name-replacement pairs to this table, for example, if new conflicts occur.
In some cases the name of a child element and the name of an attribute will be the same. (I believe, but am not sure, that this is allowed by XML Schema.) Since generateDS.py treats both child elements and attributes as members of the generated class, this is a name conflict. Therefore, where such conflicts exist, generateDS.py modifies the name of the attribute by adding "_attr" to its name.
generateDS.py is not very intelligent about detecting what prefix is used in the schema file for the XML Schema namespace. When this problem occurs, you may see the following when running generateDS.py:
AttributeError: 'NoneType' object has no attribute 'annotate'
generateDS.py assumes that the XML Schema namespace prefix in your schema is "xs:".
So, if the XML Schema namespace prefix in your schema is not "xs:", you will need to use the -a command line option when you run generateDS.py. Here is an example:
generateDS.py -a "xsd:" --super=mylib -o mylib.py -s myapp.py someschema.xsd
The following constructs in the XML Schema are supported:
See file people.xsd for examples of the definition of data types and structures. Also see the section on The XML Schema Input to generateDS.
Element definitions that contain attributes but no nested child elements provide access to their data content through getter and setter methods getValueOf_ and setValueOf_ and member variable valueOf_.
Elements that are defined to contain both text and nested child elements have "mixed content". generateDS.py provides access to mixed content, but the generated data structures (classes) are fundamentally different from that generated for other elements. See section Mixed content for more details.
Note that elements defined with attributes but with no nested sub-elements do not need to be declared as "mixed". For these elements, character data is captured in a member variable valueOf_, and can be accessed with member methods getValueOf_ and setValueOf_.
generateDS.py supports anyAttribute. For example, if an element is defined as follows:
<xs:element name="Tool"> <xs:complexType> <xs:attribute name="PartNumber" type="xs:string" /> <xs:anyAttribute processContents="skip" /> </xs:complexType> </xs:element>
Then generateDS.py will generate a class with a member variable anyAttributes_ containing a dictionary. Any attributes found in the instance XML document that are not explicitly defined for this element will be stored in this dictionary. generateDS.py also generates getters and setters as well as code for parsing and export. generateDS.py ignores processContents. See section anyAttribute for more details.
generateDS.py now generates subclasses for extensions, that is when an element definition contains something like this:
<xs:extension base="sometag">
Limitation -- There is an important limitation, however: member names duplicated (overridden ?) in an extension generate erroneous code. Sigh. I guess I needed something more to do.
Several of the generated methods have been refactored so that subclasses can reuse the code in their superclasses. Take a look at the generated code to learn how to use it.
The Python compiler/interpreter requires that it has seen a superclass before it sees the subclass that uses it. Because of this, generateDS.py delays generating a subclass until after its superclass has been generated. Therefore, the order in which classes are generated may be different from what you expect.
generateDS.py now handles definition and use of attribute groups. For example: the use of something like the following:
<xs:attributeGroup name="favorites"> <xs:attribute name="fruit" /> <xs:attribute name="vegetable" /> </xs:attributeGroup>
And, a reference or use like the following:
<xs:element name="person"> <xs:complexType mixed="0"> <xs:attributeGroup ref="favorites" /> o o o
Results in generation of class person that contains members fruit and vegetable.
generateDS.py now handles a limited range of substitution groups, but, there is an important limitation, in particular generateDS.py handles substitution groups that involve complex types, but does not handle those that involve (substitute for) simple types (for example, xs:string, xs:integer, etc). This is because the code generated for members defined as simple types does not provide the needed information to handle substitution groups.
generateDS.py supports some, but not all, simple types defined in "XML Schema Part 0: Primer Second Edition" ( http://www.w3.org/TR/xmlschema-0/. See section "Simple Types" and appendix B). Validation is performed for some simple types. When performed, validation is done while the XML document is being read and instances are created.
Here is a list of supported simple types:
generateDS.py generates minimal support for members defined as simpleType. However, the code generated by generateDS.py does not enforce restrictions. For notes on how to enforce restrictions, see section simpleType and validators.
A simpleType can be a restriction on a primitive type or on a defined element type. So, for example, the following will generate valid code:
<xs:element name="percent"> <xs:simpleType> <xs:restriction base="xs:integer"> <xs:minInclusive value="1"/> <xs:maxInclusive value="100"/> </xs:restriction> </xs:simpleType> </xs:element>
And, the following will also generate valid code:
<xs:simpleType name="emptyString"> <xs:restriction base="xs:string"> <xs:whiteSpace value="collapse"/> </xs:restriction> </xs:simpleType> <xs:element name="merge"> <xs:complexType> <xs:simpleContent> <xs:extension base="emptyString"> <xs:attribute name="fromTag" type="xs:string"/> <xs:attribute name="toTag" type="xs:string"/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element>
For elements defined with maxOccurs="unbounded", generateDS.py generates code that processes a list of elements.
For elements defined with minOccurs="0" and maxOccurs="1", generateDS.py generates code that exports an element only if that element has a (non-None) value.
Here are a few notes that should help you use validator methods to enforce restrictions.
Default behavior -- The generated code, by default, treats the value of a member whose type is a simpleType as if it were declared as type xs:string.
Validator method stubs -- For a member variable name declared as a simpleType named X, a validator method validate_X is generated. Example -- from:
<xs:simpleType name="tAnyName"> <xs:restriction base="xs:string"/> </xs:simpleType>
The class generated by generateDS.py will contain the following method definition:
def validate_tAnyName(self, value): # Validate type tAnyName, a restriction on xs:string. pass
Calls to validator methods -- For a member variable declared as a simpleType X, a call to validate X is added to the build method. Example -- from:
<xs:element name="person"> <xs:complexType mixed="0"> <xs:sequence> <xs:element name="test2" type="tAnyName"/> </xs:sequence> </xs:complexType> </xs:element>
generateDS.py produces the following call:
self.validate_tAnyName(self.test2) # validate type tAnyName
Code bodies for validator methods can be added either (1) manually or (2) automatically from an external source. See command line flag --validator-bodies and see below.
You can add code to the validator method stub to enforce the restriction for the base type and further restrictions imposed on that base type. This can be done in the following ways:
The support for simpleType in generateDS.py has the following limitations (among others, I'm sure):
It only works for simpleType defined with and referenced through a name. It does not work for "in-line" definitions. So, for example, the following works:
<xs:element name="person"> <xs:complexType> <xs:sequence> <xs:element name="test3" type="tAnyName"/> </xs:sequence> </xs:complexType> </xs:element> <xs:simpleType name="tAnyName"> <xs:restriction base="xs:string"/> </xs:simpleType>
But, the following does not work:
<xs:element name="person"> <xs:complexType> <xs:sequence> <xs:element name="test3"> <xs:simpleType name="tAnyName"> <xs:restriction base="xs:string"/> </xs:simpleType> </xs:element> </xs:sequence> </xs:complexType> </xs:element>
Attributes defined as a simple type are not supported.
By default, generateDS.py will insert content from files referenced by include elements into the XML Schema to be processed. This behavior can be turned off by using the --no-process-includes command line flag.
include elements are processed and the referenced content is inserted in the XML Schema by importing and using process_includes.py, which is included in the generateDS.py distribution.
process_includes.py will use either lxml or ElementTree, but its preference is lxml because lxml attempts to preserve namespace prefixes. So if your XML Schemas have <include ... /> elements in them, you might want to consider installing lxml, even though ElementTree is in the Python standard library for Python versions >= 2.5.
The include file processing is capable of retrieve included files via FTP and HTTP internet protocols as well as from the local file system.
Also see command line option --search-path (see Running generateDS.py), which can be used to specify a colon separated list of directories where include processing will look for included schemas.
generateDS.py has support for abstract types. For more on this, see: XML Schema Part 0: Primer Second Edition: Abstract Elements and Types -- http://www.w3.org/TR/xmlschema-0/#abstract.
generateDS.py actually accepts a subset of XML Schema. The sample XML Schema file should give you a picture of how to describe an XML file and the Python classes that you will generate. And here are some notes that should help:
Specify the tag in the XML file and the name of the generated Python class in the name attribute on the xs:element. For example, to generate a Python class named "person", which will be populated from an XML element/tag "person", use the following XML Schema snippet:
<xs:element name="person" ...
To specify a data member for a generated Python class that will be propogated from an attribute in an element in an XML file, use the XML Schema xs:attribute. For attributes, generateDS recognizes the following types: "xs:string", "xs:integer", and "xs:float". For example, the following adds member data items "hobby" and "category" with types "xs:string" and "xs:integer":
<xs:element name="person"> <complexType> <xs:attribute name="hobby" type="xs:string" /> <xs:attribute name="category" type="xs:integer" /> </complexType> </xs:element>
To specify a data member for a generated Python class whose value is a string, integer, or float and which will be populated from a nested (simple) element, specify a nested XML Schema element whose type is "xs:string", "xs:integer", or "xs:float". Here is an example which defines a Python class "person" with a data member "description" which is a string and which is populated from a (simple) nested element:
<xs:element name="person"> <complexType> <sequence> <xs:element name="description" type="xs:string" /> <sequence> </complexType> </xs:element>
To specify a data member of a generated Python class that will be populated from a nested XML element, refer to the nested object in the "type" attribute and then define another element/type whose name is that type. For example, the following specifies that the person class will have a data member named "transportation" that will be populated from a nested XML element "bicycle" and whose value will be an instance of the generated class "bicycle":
<xs:element name="person"> <complexType> <sequence> <xs:element name="transportation" type="bicycle" /> <sequence> </complexType> </xs:element> <xs:element name="bicycle"> o o o </xs:element>
To specify a data member of a generated Python class that will contain a list of instances of a generated classes and populated from nested XML elements, add the "maxOccurs" attribute with value "unbounded". Here is an example:
<xs:element name="person"> <complexType> <sequence> <xs:element name="transportation" type="bicycle" maxOccurs="unbounded" /> <xs:element name="description" type="xs:string" maxOccurs="unbounded" /> <sequence> </complexType> </xs:element> <xs:element name="bicycle"> o o o </xs:element>
Here are a few additional rules that will help you to write XML Schema files for generateDS.py:
Here are a few additional constructions that generateDS.py understands.
You can use the <complexType> element at top level (instead of <element>) to define an element. So, for example, instead of:
<xs:element name="server-type"> <xs:complexType> <xs:sequence> <xs:element name="server-name" type="xs:string"/> <xs:element name="server-description" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element>
you can use the following, which is equivalent:
<xs:complexType name="server-type"> <xs:sequence> <xs:element name="server-name" type="xs:string"/> <xs:element name="server-description" type="xs:string"/> </xs:sequence> </xs:complexType>
You can use the "ref" attribute to refer to another element definition, instead of using the "name" and "type" attributes. So, for example, you can use the following:
<xs:element name="server-info"> <xs:complexType> <xs:sequence> <xs:element name="server-comment" type="xs:string"/> <xs:element ref="server-type" /> </xs:sequence> </xs:complexType> </xs:element> in place of this: <xs:element name="server-info"> <xs:complexType> <xs:sequence> <xs:element name="server-comment" type="xs:string"/> <xs:element name="server-type" type="server-type"/> </xs:sequence> </xs:complexType> </xs:element>
generateDS.py generates a subclass for each element that that is defined as the extension of a base element. So, for the following:
<xs:complexType name="BType"> <xs:complexContent> <xs:extension base="AType"> <xs:sequence> o o o
generateDS.py will generate something like the following:
class BType(AType): o o o
generateDS.py generates special code to handle elements defined as containing mixed content, that is elements defined with attribute mixed="true". See section Mixed content for more details.
With the use of the "-b" command line flag, generateDS.py will also accept as input an XML document instance that describes behaviors to be added to subclasses when the subclass file is generated with the "-s" command line switch.
An example is provided in the Demos/Xmlbehavior sub-directory of the distribution.
The XMLBehaviors capability in generateDS.py was inspired and, for the most part, designed by gian paolo ciceri (gp.ciceri@suddenthinks.com). This work is part of our work on our application development project for Quixote.
This section describes the XMLBehavior XML document that is used as input to generateDS.py. The XMLBehavior XML document is an XML instance document (given as an argument to the "-b" command line flag) that describes behaviors (methods) to be added to class definitions in the subclass file (generated with the "-s" command line flag).
See file xmlbehavior_po.xml in the Demos/Xmlbehavior directory in the distribution for an example that you can use as a model.
The elements in the XMLBehavior document type are the following:
generateDS.py contains a function get_impl_body() that implements the ability to retrieve implementation bodies. The current implementation retrieves implementation bodies from an Internet Web URL. Other sources for implementation bodies can be implemented by modifying get_impl_body().
As an example, the version that follows first tries to retrieve an implementation body from a Web address and, if that fails, attempts to obtain the implementation body from a file in the local file system using the <xb:base-impl-url> as a path to a directory containing files, each of which contains one implementation body and <xb:impl-url> as the file name. This implementation of get_impl_body was provided by Colin Dembovsky of Systemsfusion Inc. Thanks, Colin. (I've included it in the generateDS.py script, but commented out, for those who want to use and possibly extend it.):
def get_impl_body(classBehavior, baseImplUrl, implUrl): impl = ' pass\n' if implUrl: trylocal = 0 if baseImplUrl: implUrl = '%s%s' % (baseImplUrl, implUrl) try: implFile = urllib2.urlopen(implUrl) impl = implFile.read() implFile.close() except: trylocal = 1 if trylocal: try: implFile = file(implUrl) impl = implFile.read() implFile.close() except: print '*** Implementation at %s not found.' % implUrl return impl
Here are additional features, contributed by users such as Chris Allan. Many thanks.
xsd:list elements can be used with a child xsd:simpleType which confuses the XschemaHandler stack unrolling. xsd:list element support should allow the following XML Schema definition to be supported in generateDS.py:
<xsd:attribute name="Foo"> <xsd:simpleType> <xsd:list> <xsd:simpleType> ... </xsd:simpleType> </xsd:list> </xsd:simpleType> </xsd:attribute>
The enumerated values for the parent element are resolved and made available through the instance attribute values.
In order to properly resolve and query types which are unions in an XML Schema, an element's membership in an xsd:union is available through the instance attribute unionOf.
When a parent xsd:choice is exists, an element's "maxOccurs" and "minOccurs" values can be inherited from the xsd:choice rather than the element itself. xsd:choice elements have been added to the child element via the choice instance attribute and are now used in the "maxOccurs" and "minOccurs" attribute resolution. This should allow the following XML Schema definition to be supported in generateDS.py:
<xsd:element name="Foo"> <xsd:complexType> <xsd:choice maxOccurs="unbounded"> <xsd:element ref="Bar"/> <xsd:element ref="Baz"/> </xsd:choice> </xsd:complexType> </xsd:element>
Some applications require the availability of the "minOccurs" attribute in addition to the previous minimal support of "optionality". This is available through the getMinOccurs method (which follows the style of the existing API).
The previous content type and base type resolution is insufficient for some needs. Basically it was unable to handle more complex and shared element and simpleType definitions. This support has been extended to more correctly resolve the base type and properly indicate the content type of the element. This should provide the ability to handle more complex XML Schema definitions in generateDS.py. Documentation on the algorithm for how this is achieved is available as comments in the source code of generateDS.py -- see comments in method resolve_type in class XschemaElement.
Some developers working to extend the analysis and code generation in generateDS.py may be helped by additional information collected during the parsing of the XML Schema file.
Some applications need all the top level simpleTypes to be available for further queries after the SAX parser has completed its work and after all types have been resolved. These types are available as an instance attribute topLevelSimpleTypes inside XschemaHandler.
In some cases, the document produced by a call to an export method will contain elements that have namespace prefixes. For example, the following snippet contains namespace prefix "abc":
<abc:people > <abc:person> o o o </abc:person> </abc:people>
A way is needed to insert a namespace prefix definition into the generated document. Here is how generateDS.py fills that need.
Each generated export method takes an optional argument namespacedef_. If provided, the value of that parameter is inserted in the exported element. So, for example, the following call:
people.export(sys.stdout, 0, namespacedef_='xmlns:abc="http://www.abc.com/namespace"')
might produce:
<abc:people xmlns:abc="http://www.abc.com/namespace"> <abc:person> o o o </abc:person> </abc:people>
If this is an issue for you, then you may also want to consider using the "--namespacedef=" command line option when you run generateDS.py. The value of this option will be passed in to the export function in the generated parse functions. So, for example, running generateDS.py as follows:
generateDS.py --namespacedef='xmlns:abc="http://www.abc.com/namespace.xsd"' -o mylib.py -s myapp.py myschema.xsd
will generate parse methods that automatically add the namespacedef_ argument to the call to export.
The simplest use is to call one of the parsing functions in the generated source file. You may be able to use one of these functions without change, or can modify one to fit your needs. generateDS.py generates the following parsing functions:
These parsing functions are generated in both the superclass and the subclass files. Note the call to the export method. You may need to comment out or un-comment this call to export according to your needs.
For example, if the generated source is in people.py, then, from the command line, run something like the following:
python people.py people.xml
Or, from within other Python code, use something like the following:
import people rootObject = people.parse('people.xml')
The generated classes contain methods export and exportLiteral which can be called to export classes to several text formats, in particular to an XML instance document and a Python module containing Python literals. See the generated parse functions for examples showing how to call the export methods.
The export method in generated classes writes out an XML document that represents the instance that contains it and its child elements. So, for example, if your instance tree was created by one of the parsing functions described above, then calling export on the root element should reproduce the input XML document, differing only with respect to ignorable white space.
generateDS.py generates Python classes that represent the elements in an XML document, given an Xschema definition of the XML document type. The exportLiteral method will export a Python literal representation of the Python instances of the classes that represent an XML document.
When generateDS.py generates the Python source code for your classes, this new feature also generates an exportLiteral method in each class. If you call this method on the root (top-most) object, it will write out a literal representation of your class instances as Python code.
generateDS.py also generates a function at top level (parseLiteral) that parses an XML document and calls the "exportLiteral" method on the root object to write the data structure (instances of your generated classes) as a Python module that you can import to (re-)create instances of the classes that represent your XML document.
generateDS.py was designed and built with the assumption that we are not interested in marking up text content at all. What we really want is a way to represent structured and nested date in text. It takes the statement, "I want to represent nested data structures in text.", entirely seriously. Given that assumption, there may be times when you want a more "Pythonic" textual representation of the Python data structures for which generateDS.py has generated code. exportLiteral enables you to produce that representation.
This feature means that the classes that you generate from an XML schema support the interchangeability of XML and Python literals. This means that, given classes generated by generateDS.py for your XML document type, you can perform the following transformations:
This capability enables you to:
See the generated function parseLiteral for an example of how to use exportLiteral.
If you have an instance of a minidom node that represents an element in an XML document, you can also use the 'build' member function to populate an instance of the corresponding class. Here is an example:
from xml.dom import minidom from xml.dom import Node doc = minidom.parse(inFileName) rootNode = doc.childNodes[0] people = [] for child in rootNode.childNodes: if child.nodeType == Node.ELEMENT_NODE and child.nodeName == 'person': obj = person() obj.build(child) people.append(obj)
If you choose to use the generated subclass module, and I encourage you to do so, you may need to edit and modify that file. Here are some of the things that you must do (look for "???"):
You can also (and most likely will want to) add methods to the generated classes. See the section How-to Modify the Generated Code for more on this.
The classes generated from each element definition provide getter and setter methods to access its attributes and child elements.
Elements that are referenced but not defined (i.e. that are simple, for example strings, integers, floats, and booleans) are accessed through getter and setter methods in the class in which they are referenced.
Element definitions that contain attributes but no nested child elements provide access to their data content through getter and setter methods getValueOf_ and setValueOf_ and member variable valueOf_.
The goal of generateDS.py is to support data structures represented in XML as opposed to text mark-up. However, it does provides some support for mixed content. But, for mixed content, the data structures and code generated by generateDS.py are fundamentally different from those for elements that do not contain mixed content.
There are limitations, of course. A known limitation is related to extension elements. Specifically, if an element contains mixed content, and this element extends a base class, then the base class and any classes it extends must be defined to contain mixed content. This is due to the fact that generateDS.py generates a data structure (class) for elements containing mixed content that is fundamentally different from that generated for other elements.
Here is an example of mixed content:
<note>This is a <bold>nice</bold> comment.</note>
When an element is defined with something like the following:
<xs:complexType mixed="true"> <xs:sequence> o o o
then, instead of generating a class whose named members refer to nested elements, a class containing a list of instances of class MixedContainer is generated. In order to process the content of a mixed content element, the code you write will need to walk this list of instances of MixedContainer and check the type of each item in that list. Basically, the structure becomes more DOM-like in the sense that it has a list of children, rather than named fields.
Instances of MixedContainer have the following methods:
Note that elements defined with attributes but with no nested sub-elements do not need to be declared as "mixed". For these elements, character data is captured in a member variable valueOf_, and can be accessed with member methods getValueOf_ and setValueOf_.
For elements that specify anyAttributes, generateDS.py produces a class containing the following:
Note: Attributes that are explicitly defined for an element are not stored in the dictionary anyAttributes_.
generateDS.py ignores the processContents attribute on the anyAttribute element in the XML Schema
generateDS.py provides a mechanism that enables you to attach user defined methods to specific generated classes. In order to do so, create a Python module containing specifications of those methods and indicate that module on the command line with the "--user-methods" flag. Example:
python generateDS.py -f --super=people_sup -o people_sup.py -s people_sub.py --user-methods=gends_user_methods people.xsd
The module named with this flag must be located where generateDS.py can import it. You might need to add the directory containing your user methods module to the PYTHONPATH environment variable.
The module specified with the "--user-methods" flag should define a variable METHOD_SPECS which contains a list of instances of a class that implements methods match_name and get_interpolated_source.
See file gends_user_methods.py for an example of this specification file and the definition of class MethodSpec. Read the comments in that file for more guidance.
The _member_data_items class variable -- User methods, especially those attached to more than one class, are likely to need a list of the members in the current class. Each generated class has a class variable containing a list of specifications of the members in the class. Each item in this list is an instance of class _MemberSpec, which is defined near the top of your generated (super-class) file. Use the following to access the information in each member specification:
There are a number of things of interest in this sample file (gends_user_methods.py):
Although, the MethodSpec class must be included in your user methods specification module, you can modify this class. For example, for special situations, it might be useful to modify either of the methods MethodSpec.match_name or MethodSpec.get_interpolated_source. These methods are called by generateDS.py. See comments on the definitions of these methods in gends_user_methods.py.
A method set_up is attached to the root class. (This user method specification module is intended to be used with people.xsd/people.xml in the Demos/People directory.) It performs initialization, before the walk method is called. In particular, set_up initializes a counter and imports the types module (which saves us from having to modify the generated code).
The walk_and_update and walk_and_show methods provide an example showing how to walk the entire document object tree.
The method walk_and_update uses the _member_data_items class variable to obtain a list of members of the class. It's a list of instances of class _MemberSpec, which support the m.get_name(), m.get_data_type()``, and m.get_container() methods described above.
In method walk_and_show, note the use of getattr to retrieve the value of a member variable and the use of setattr to set the value of a member variable.
The expression "%(class_name)s" is used to insert the class name into the generated source code.
Notice how the types module is used to determine whether a member variable contains a simple type or an instance of a class. Example:
obj1 = getattr(self, member[0]) if type(obj1) == types.InstanceType: ...
In string formatting operations, you will need to use double percent signs in order to "pass through" a single percent sign, for example:
print '%%d. class: %(class_name)s depth: %%d' %% (counter, depth, )
where the single percent signs are interpolated ("%(class_name)s" is replace by the class name), and double percent signs are replace by single percent signs ("%%d" becomes "%d").
Suggestion -- How to begin:
generateDS.py generates calls to several methods that each have a default implementation in a superclass. The default superclass with default implementations is included in the generated code. The user can replace this default superclass by implementing a module named generatedssuper.py containing a class named GeneratedsSuper.
What to look for in the generated code:
Currently the following methods are implemented:
class GeneratedsSuper: def format_string(self, input_data, input_name=''): return input_data def format_integer(self, input_data, input_name=''): return '%d' % input_data def format_float(self, input_data, input_name=''): return '%f' % input_data def format_double(self, input_data, input_name=''): return '%e' % input_data def format_boolean(self, input_data, input_name=''): return '%s' % input_data
Caution: Overriding any of the format_xxxx() methods enables you to export invalid XML. So, use at your own risk, test before using, etc.
How to modify the behavior of the default methods:
Where to put (implement) methods that override the default methods -- You can place the implementations of methods that override the default methods in the following places:
In a class named GeneratedsSuper in a separate module named generatedssuper. Since this class would replace the default implementations, you should provide implementations of all the default methods listed above in that class. The distribution contains a generatedssuper.py which you can modify for your specific needs.
In individual generated (super) classes (the ones generated with the "-o" command line option) using the User Methods feature.
In individual classes in a subclass module generated with the "-s" command line option.
If you want to use the same method in more than one generated subclass, then you might consider putting that method in a "mix-in" class and inherited that method in the generated subclass. With this approach, you must put the mix-in class containing your methods before the regular superclass, so that Python will find your custom methods before the default ones. That is, you must use:
class clientSub(MySpecialMethods, supermod.client):
not:
class clientSub(supermod.client, MySpecialMethods):
If you choose to implement module generatedssuper, here are a few suggestions:
Implement a module generatedssuper.py containing definition of a class GeneratedsSuper. Note that a default version of this module is included in the distribution.
Put this module in a location where it can be imported when your generated code is run.
An easy way to begin is to copy the default definition of the class GeneratedsSuper from a module generated with the "-o" command line option into a module named generatedssuper.py. Then modify your (copied) implementation. Or, use the default module included in the distribution.
To implement a method that does a task specific to particular class or a particular member of a class, do something like the following:
def format_string(self, input_data, input_name=''): if self.__class__.__name__ == 'person': return '[[%s]]' % input_data else: return input_data
or:
def format_string(self, input_data, input_name=''): if self.__class__.__name__ == 'booster' and input_name == 'lastname': return '[[%s]]' % input_data else: return input_data
Alternatively, to attach a method to a specific class, use the User Methods or a generated subclass module (command line option "-s"), as described above.
This section attempts to explain how to modify and add features to the generated code.
You can add new member definitions to a generated class. Look at the 'export' and 'exportLiteral' member functions for examples of how to access member variables and how to walk nested sub-elements.
Here are interesting places to look in each class definition:
And, if you need methods that are common to and shared by several of the generated subclasses, you can put them in a new class and add that class to the superclass list for each of your subclasses.
Although you can add your own methods to the generated superclasses, I'm recommeding that you add methods to the generated subclasses in the subclass module generated with the -s command line flage, and then edit the subclass module in order to build your application. Why?
Here are some alternatives to using the subclass file:
Under the directory Demos are several examples:
Suggested uses:
The following extension employs a user method (see User Methods) in order to capture elements defined as xs:date as date objects.
Thanks to Lars Ericson for this code and explanation.
By default, generateDS.py treats elements declared as type xs:date as though they are strings.
To get xs:dates stored as dates, in your local copy, add the following user method (User Methods), a slight modification of the sample (in gends_user_methods.py):
method1 = MethodSpec(name='walk_and_update', source='''\ def walk_and_update(self): members = %(class_name)s._member_data_items for member in members: obj1 = getattr(self, member.get_name()) if member.get_data_type() == 'xs:date': newvalue = date_calcs.date_from_string(obj1) setattr(self, member.get_name(), newvalue) elif member.get_container(): for child in obj1: if type(child) == types.InstanceType: child.walk_and_update() else: obj1 = getattr(self, member.get_name()) if type(obj1) == types.InstanceType: obj1.walk_and_update() ''', class_names=r'^.*$', )
Then, define date_calcs.py as:
#!/usr/bin/env python # -*- mode: pymode; coding: latin1; -*- import datetime # 2007-09-01 # test="2007-09-01" # print test # print date_from_string(test) def date_from_string(str): year=int(str[:4]) month=int(str[5:7]) day=int(str[8:10]) dt=datetime.date(year, month, day) return dt
And, add a "str" here in generateDS.py:
def quote_xml(inStr): s1 = str(inStr) s1 = s1.replace('&', '&') s1 = s1.replace('<', '<') s1 = s1.replace('"', '"') return s1
Also, add these imports to TEMPLATE_HEADER in generateDS.py:
import date_calcs import types
There are things in Xschema that are not supported. You will have to use a restricted sub-set of Xschema to define your data structures. See above for supported features. See people.xsd and people.xml for examples.
And, then, try it on your XML Schema, and let me know about what does not work.
Warning -- This section describes an optional generated SAX parser which, I believe, is currently broken for all but the simplest schemas. Generation of a SAX parser has not been updated for the latest changes to generateDS.py. In particular, when names of elements are reused (in different parent elements), the SAX parser becomes confused. Until I've been able to figure out how to fix this, you are advised not to use the SAX parser.
generateDS.py generates two kinds of parsers: one kind is based on SAX and the other is build on minidom. See the generated functions saxParse, parse(), and parseString(). Using the SAX parser instead of the minidom parser should reduce memory requirements for large documents, since the minidom parser, but not the SAX parser, constructs a DOM tree for the entire document in memory.
However, both styles of parsers construct instances of the data structures generated by generateDS.py. This means that, even when the SAX parser is used, generateDS.py may not be well-suited for applications that read large XML documents, although what "large" means depends on your hardware. Notice that the minidom parsing functions (parse() and parseString()) over-write the variable doc so as to enable Python to reclaim the space occupied by the DOM tree, which may help alleviate the memory problem to some extent when the minidom parser is used.
While generateDS.py itself does not process XML Schema include elements, the distribution provides a script process_includes.py that can be used as a preprocessor. This script scans your XML Schema document and, recursively, documents that are included looking for include elements; it inserts all content into a single document, which it writes out.
Since process_includes.py uses the ElementTree API, in order to use process_includes.py you will need one of the following:
Here are samples of how you might use process_includes.py, if your schema contains include elements.
Example 1:
$ python process_includes.py definitions1.xsd | \ $ python generateDS.py -f --super=task1sup -o task1sup.py -s task1sub.py -
Example 2:
$ python process_includes.py definitions1.xsd tmp.xsd $ python generateDS.py -f --super=task1sup -o task1sup.py -s task1sub.py tmp.xsd
For help and usage information, run the following:
$ python process_includes.py --help
Many thanks to those who have used generateDS.py and have contributed their comments and suggestions. These comments have been valuable both in teaching me about things I needed to know in order to continue work and in motivating me to do the work in the first place.
And, a special thanks to those of you who have contributed patches for fixes and new features. Recent help has been provided by the following among others:
Python: The Python home page.
Dave's Page: My home page, which contains more Python stuff.


Before you begin:
Safe Harbor Statement
Each participant is assigned a VM where we have two container databases CDB1 and CDB2 running.
You will be doing the labs as the user oracle (password: oracle)
Location of labs: /u01/HOL/
In this folder, you will find 4 folders each containing the scripts that will walk you
through a set of features that we are planning to introduce in the upcoming release of the Oracle database.
|
Provisioning - Hot Clone,Refresh and Relocate
|
/u01/HOL/provisioning |
|
Lockdown Profiles
|
/u01/HOL/lockdown_profiles |
|
Application Containers
|
/u01/HOL/app_containers |
Note the OS password for the oracle user is oracle and the VNC password is welcome.
If you are using VNC please open a terminal to execute the scripts.
Note: While doing the labs you are expected to execute the scripts in sqlplus and go through the flow.
 If you do not see two databases running you can start them by executing
/u01/HOL/startdb.sh
change directory to /u01/HOL and type ./startdb.sh


[1]
facing the pool , the black coffee was good and the oldies-style music in the background .
[2]
entrance and lobby are in a very nice heritage building with stained glass windows .


Next: Ctype, Previous: Introduction, Up: Top [Contents][Index]
This chapter groups utility functions useful in a variety of programs. The corresponding declarations are in the header file stdlib.h.
| • _Exit: | End program execution without cleaning up | |
| • a64l: | String to long long | |
| • abort: | Abnormal termination of a program | |
| • abs: | Integer absolute value (magnitude) | |
| • assert: | Macro for Debugging Diagnostics | |
| • atexit: | Request execution of functions at program exit | |
| • atof: | String to double or float | |
| • atoi: | String to integer | |
| • atoll: | String to long long | |
| • bsearch: | Binary search | |
| • calloc: | Allocate space for arrays | |
| • div: | Divide two integers | |
| • ecvtbuf: | Double or float to string of digits | |
| • ecvt: | Double or float to string of digits (malloc result) | |
| • __env_lock: | Lock environment list for getenv and setenv | |
| • gcvt: | Format double or float as string | |
| • exit: | End program execution | |
| • getenv: | Look up environment variable | |
| • itoa: | Integer to string | |
| • labs: | Long integer absolute value (magnitude) | |
| • ldiv: | Divide two long integers | |
| • llabs: | Long long integer absolute value (magnitude) | |
| • lldiv: | Divide two long long integers | |
| • malloc: | Allocate and manage memory (malloc, realloc, free) | |
| • mallinfo: | Get information about allocated memory | |
| • __malloc_lock: | Lock memory pool for malloc and free | |
| • mbsrtowcs: | Convert a character string to a wide-character string | |
| • mbstowcs: | Minimal multibyte string to wide string converter | |
| • mblen: | Minimal multibyte length | |
| • mbtowc: | Minimal multibyte to wide character converter | |
| • on_exit: | Request execution of functions at program exit | |
| • qsort: | Array sort | |
| • rand: | Pseudo-random numbers | |
| • random: | Pseudo-random numbers | |
| • rand48: | Uniformly distributed pseudo-random numbers | |
| • rpmatch: | Determine whether response is affirmative or negative | |
| • strtod: | String to double or float | |
| • strtol: | String to long | |
| • strtoll: | String to long long | |
| • strtoul: | String to unsigned long | |
| • strtoull: | String to unsigned long long | |
| • wcsrtombs: | Convert a wide-character string to a character string | |
| • wcstod: | Wide string to double or float | |
| • wcstol: | Wide string to long | |
| • wcstoll: | Wide string to long long | |
| • wcstoul: | Wide string to unsigned long | |
| • wcstoull: | Wide string to unsigned long long | |
| • system: | Execute command string | |
| • utoa: | Unsigned integer to string | |
| • wcstombs: | Minimal wide string to multibyte string converter | |
| • wctomb: | Minimal wide character to multibyte converter |
Next: Ctype, Previous: Introduction, Up: Top [Contents][Index]


Search!
Close me
Songs on The Beatles - Sgt. Pepper's Lonely Hearts Club Band (1967)
Filter
{{song}}


--- layout: compress ---
{% comment %} We check to see what the page title is before appending "| Chris Cummins" to it, as otherwise this would result with an index title of "Chris Cummins | Chris Cummins". {% endcomment %} {% if page.title == "Chris Cummins" %}Full time geek with a passion for developing great software, often late at night.
{%include around-the-web.html %}


Documents Required for AdmissionSponsorship Letter from the Sponsor parent (NRI)Self Affidavit Self Affidavit - Mumbai Transfer Students 3rd Person Affidavit (Candidates below 18 years of age) 3rd Person Affidavit - Mumbai Transfer Students (Candidates below 18 years of age)
{{document_name}}
= 2">
Select specialization{{d.specialization}}
= 2">
0 && show == true">
Application Letter 0 && show1 == true">
Payment Reciepts 0"> 0"> 0"> 0 && show2 == true">
Provisional Eligibility Letter


{% extends 'base.html' %} {% block pagetitle %}Brian R. Bondy - English Language and Usage expected age by tag list{% endblock %} {% block title %} English Language and Usage expected age by tag list{% endblock %} {% block subtitle %}Calculated by using the expected value for the age each answer comes from{% endblock %} {% block main_content %}
This list contains the expected age per tag from the the English Language and Usage site, sorted by expected age.
The list was generated with the English Language and Usage April 2011 data dump on 4/25/2011 10:37:49 PM.
The creator of this list is Brian R. Bondy: Blog, Twitter, StackOverflow.
Please see the following link for other lists.


Home
About
GHazal
Marsia
Books
Blog
Contact
CONTACT
رابطہ
For all website suggestions/feedback, Please Contact:
Administrator at baquerzaidi.com
admin@baquerzaidi.com


 It's extremely worn, and the lower section is used as a locker. A few books are arranged on the shelves, and the locker is secured with a padlock which bears the mark of the Hellmann Family.
Take out a book and read it.
Examine the area around the bookshelf.


Rules
- You get a random number of stars from 1 to 9. You need to select one or more numbers that would sum up to the value of the stars.
- Press "=" button to check your answer. If it's wrong, you can unselect number from answer frame by clicking. If you're right, click again button "=" to continue the game.
- You will win when you use all the numbers in the bottom frame. Used numbers get green color.
- If you end up with a number of stars that has no possible correct combination, you can redraw it for 5 times.
- If you still end up with a number of stars with no possible correct combination out of all the remaining numbers, the you loose the game.
- Have fun!


Joe's Coffee Store
Home
Blog
Our Coffees
Accessories
Gifts
Find Us
Checkout
Come to our real-life store!


#include <midi.h>
|
| void | midiCallBack (double timeStamp, std::vector< unsigned char > *message, void *userData) |
| |
Definition at line 8 of file midi.h.
| void Midi::deviceSelect |
( |
| ) |
|
| void Midi::monitorMessages |
( |
| ) |
|
| void Midi::setNoteOff |
( |
char |
note, |
|
|
char |
velocity |
|
) |
| |
|
private |
Process a noteOff MIDI command.
Definition at line 281 of file midi.cpp.
| void Midi::setNoteOn |
( |
char |
note, |
|
|
char |
velocity |
|
) |
| |
|
private |
Process a noteOn MIDI command.
Definition at line 259 of file midi.cpp.
| void Midi::setSustainOff |
( |
| ) |
|
|
private |
| void Midi::setSustainOn |
( |
| ) |
|
|
private |
| void Midi::showDevices |
( |
int |
devCount | ) |
|
|
private |
| bool Midi::sustainIsOn |
( |
| ) |
|
|
inlineprivate |
| void Midi::transposeAdjust |
( |
| ) |
|
Interactive tranpose value gathering.
Definition at line 357 of file midi.cpp.
| void midiCallBack |
( |
double |
timeStamp, |
|
|
std::vector< unsigned char > * |
message, |
|
|
void * |
userData |
|
) |
| |
|
friend |
This is the callback method called by RtMidi to signify the reception of a new MIDI command by the application. This callback is responsible of parsing the command and dispatch to modify PIano voices state accordingly.
Definition at line 85 of file midi.cpp.
Mask of channels being listened by Midi.
Definition at line 28 of file midi.h.
RTMidiIn instance.
Definition at line 25 of file midi.h.
True if monitoring midi in interactive mode.
Definition at line 26 of file midi.h.
True if the sustain pedal is depressed by the user.
Definition at line 27 of file midi.h.
The documentation for this class was generated from the following files:


First, I believe that this nation should commit itself to achieving the goal, before this decade is out, of landing a man on the moon and returning him safely to the earth. No single space project in this period will be more impressive to mankind, or more important for the long-range exploration of space; and none will be so difficult or expensive to accomplish.
Dear Company,
Look again at that dot. That's here. That's home. That's us.  The aggregate of our joy and suffering, thousands of confident religions, ideologies, and economic doctrines, every hunter and forager, every hero and coward, every creator and destroyer of civilization, every king and peasant, every young couple in love, every mother and father, hopeful child, inventor and explorer, every teacher of morals, every corrupt politician, every "superstar," every "supreme leader," every saint and sinner in the history of our species lived there--on a mote of dust suspended in a sunbeam.
First, I believe that this nation should commit itself to achieving the goal, before this decade is out, of landing a man on the moon and returning him safely to the earth. No single space project in this period will be more impressive to mankind, or more important for the long-range exploration of space; and none will be so difficult or expensive to accomplish.
The Earth is a very small stage in a vast cosmic arena. Think of the rivers of blood spilled by all those generals and emperors so that, in glory and triumph, they could become the momentary masters of a fraction of a dot. Think of the endless cruelties visited by the inhabitants of one corner of this pixel on the scarcely distinguishable inhabitants of some other corner, how frequent their misunderstandings, how eager they are to kill one another, how fervent their hatreds.
We choose to go to the moon. We choose to go to the moon in this decade and do the other things, not because they are easy, but because they are hard, because that goal will serve to organize and measure the best of our energies and skills, because that challenge is one that we are willing to accept, one we are unwilling to postpone, and one which we intend to win, and the others, too.
The surface is fine and powdery. I can kick it up loosely with my toe. It does adhere in fine layers, like powdered charcoal, to the sole and sides of my boots. I only go in a small fraction of an inch, maybe an eighth of an inch, but I can see the footprints of my boots and the treads in the fine, sandy particles. There seems to be no difficult in moving around, as we suspected.
The view of the Earth from the Moon fascinated me-a small disk, 240,000 miles away. It was hard to think that that little thing held so many problems, so many frustrations. Raging nationalistic interests, famines, wars, pestilence don't show from that distance.
Sincerely,
First M. Last


Recipe: Dal (Lentil Curry)
by CBS NewsAt the Akal truck stop in Laramie, Wyoming, the Indian food that Mintu Pandher and his staff are cooking up in a small kitchen attracts truckers and locals from miles around, with food they can't find anywhere else along Interstate 80.
Turns out there's money in all those smells of tumeric, coriander, and other spices rarely used in truck stop cuisine: his cafe is a hit, especially with the changing face of trucking, since nearly 19% of long-haul truck drivers in America are now immigrants.
Pandher shared one of his recipes with "Sunday Morning":
Dal (Lentil Curry)
Recipe by Mintu Pandher
Ingredients:
2 tbsp ghee, or 1 tbsp oil + 1 tbsp butter
2 green cayenne chillies, deseeded and cut into chunks (optional)
1 medium onion, finely chopped (brown or yellow)
6 garlic cloves, finely chopped
1 tbsp ginger, finely chopped (3/5")
8 fresh curry leaves, or 6 dried
1 tomato, chopped
1/2 tsp ground cumin
1 cup dried chana dal, yellow split peas or other yellow lentils
4 cups water
1/2 tsp turmeric powder
1/8 tsp garam marsala
3/4 tsp salt
Fresh coriander/cilantro sprigs (optional)
Steamed basmati rice
Instructions:
- Rinse lentils and leave to soak in plenty of water for 1 hour. Drain in colander.
- Heat ghee/oil in a heavy-based saucepan over high heat. Add green chillies and fry for a minute until starting to blister.
- Add onions and fry until softened.
- Lower heat to medium; add garlic, ginger and curry leaves. Cook for 1 minute until garlic starts to turn golden and smells amazing.
- Add tomatoes and cumin; cook until tomatoes start to break down and thicken to a paste (about 2 minutes).
- Add lentils, water, tumeric and salt. Stir, bring to simmer, cover and simmer gently for 1 hour. Stir two or three times during the hour.
- Remove lid and simmer gently for 30 minutes to thicken, stirring every now and then. The dal is ready when it has a consistency like porridge – some lentils should be intact, but some have broken down to thicken the sauce.
- Stir through garam masala at the end. Adjust salt if desired.
- Serve Dal over rice, garnished with a sprig of coriander if desired.
For more info:
- Akal Travel Center, I-80. Laramie, Wyo.


--- layout: default title: Se rendre à Agile Pays Basque 2018 permalink: /logistics/ image: directions.jpg --- {% include top-section.html %}


org.icefaces.ace.component.column
public abstract class ColumnBase extends javax.faces.component.UIColumn implements IColumn
Component that represents a column in an ace:dataTable.
For more information, see the Column Wiki Documentation.
| Modifier and Type | Class and Description |
|---|---|
protected static class |
ColumnBase.PropertyKeys |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
COMPONENT_TYPE |
static java.lang.String |
RENDERER_TYPE |
| Constructor and Description |
|---|
ColumnBase() |
| Modifier and Type | Method and Description |
|---|---|
int |
getColspan()
Return the value of the
colspan property. |
java.lang.String |
getFamily() |
java.lang.Object |
getFilterBy()
Return the value of the
filterBy property. |
java.lang.String |
getFilterMatchMode()
Return the value of the
filterMatchMode property. |
java.lang.Object |
getFilterOptions()
Return the value of the
filterOptions property. |
java.lang.String |
getFilterStyle()
Return the value of the
filterStyle property. |
java.lang.String |
getFilterStyleClass()
Return the value of the
filterStyleClass property. |
java.lang.String |
getFilterValue()
Return the value of the
filterValue property. |
java.lang.String |
getFooterText()
Return the value of the
footerText property. |
java.lang.Object |
getGroupBy()
Return the value of the
groupBy property. |
java.lang.String |
getHeaderText()
Return the value of the
headerText property. |
java.lang.String |
getLazyColumnKey()
Return the value of the
lazyColumnKey property. |
java.lang.Integer |
getPinningOrder()
Return the value of the
pinningOrder property. |
int |
getRowspan()
Return the value of the
rowspan property. |
java.lang.Object |
getSortBy()
Return the value of the
sortBy property. |
java.util.Comparator |
getSortFunction()
Return the value of the
sortFunction property. |
java.lang.Integer |
getSortPriority()
Return the value of the
sortPriority property. |
java.lang.String |
getStyle()
Return the value of the
style property. |
java.lang.String |
getStyleClass()
Return the value of the
styleClass property. |
boolean |
isConfigurable()
Return the value of the
configurable property. |
protected boolean |
isPropertySet(java.lang.String finder) |
boolean |
isReorderable()
Return the value of the
reorderable property. |
java.lang.Boolean |
isSortAscending()
Return the value of the
sortAscending property. |
boolean |
isStacked()
Return the value of the
stacked property. |
void |
setColspan(int colspan)
Set the value of the
colspan property. |
void |
setConfigurable(boolean configurable)
Set the value of the
configurable property. |
void |
setFilterBy(java.lang.Object filterBy)
Set the value of the
filterBy property. |
void |
setFilterMatchMode(java.lang.String filterMatchMode)
Set the value of the
filterMatchMode property. |
void |
setFilterOptions(java.lang.Object filterOptions)
Set the value of the
filterOptions property. |
void |
setFilterStyle(java.lang.String filterStyle)
Set the value of the
filterStyle property. |
void |
setFilterStyleClass(java.lang.String filterStyleClass)
Set the value of the
filterStyleClass property. |
void |
setFilterValue(java.lang.String filterValue)
Set the value of the
filterValue property. |
void |
setFooterText(java.lang.String footerText)
Set the value of the
footerText property. |
void |
setGroupBy(java.lang.Object groupBy)
Set the value of the
groupBy property. |
void |
setHeaderText(java.lang.String headerText)
Set the value of the
headerText property. |
void |
setLazyColumnKey(java.lang.String lazyColumnKey)
Set the value of the
lazyColumnKey property. |
void |
setPinningOrder(java.lang.Integer pinningOrder)
Set the value of the
pinningOrder property. |
void |
setReorderable(boolean reorderable)
Set the value of the
reorderable property. |
void |
setRowspan(int rowspan)
Set the value of the
rowspan property. |
void |
setSortAscending(java.lang.Boolean sortAscending)
Set the value of the
sortAscending property. |
void |
setSortBy(java.lang.Object sortBy)
Set the value of the
sortBy property. |
void |
setSortFunction(java.util.Comparator sortFunction)
Set the value of the
sortFunction property. |
void |
setSortPriority(java.lang.Integer sortPriority)
Set the value of the
sortPriority property. |
void |
setStacked(boolean stacked)
Set the value of the
stacked property. |
void |
setStyle(java.lang.String style)
Set the value of the
style property. |
void |
setStyleClass(java.lang.String styleClass)
Set the value of the
styleClass property. |
void |
setValueExpression(java.lang.String name,
javax.el.ValueExpression binding) |
getFooter, getHeader, setFooter, setHeader
addClientBehavior, addFacesListener, broadcast, clearInitialState, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, getPassThroughAttributes, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, markInitialState, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, restoreState, saveAttachedState, saveState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, subscribeToEvent, unsubscribeFromEvent
encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getPassThroughAttributes, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInView, visitTree
public static final java.lang.String COMPONENT_TYPE
public static final java.lang.String RENDERER_TYPE
public java.lang.String getFamily()
getFamily
in class javax.faces.component.UIColumn
public void setColspan(int colspan)
Set the value of the colspan
property.
Contents: Defines the number of columns the rendered cell spans. Only significant to Column components within a column group.
setColspan
in interface IColumn
public int getColspan()
Return the value of the colspan
property.
Contents: Defines the number of columns the rendered cell spans. Only significant to Column components within a column group. Default = '1'.
getColspan
in interface IColumn
public void setConfigurable(boolean configurable)
Set the value of the configurable
property.
Contents: When disabled, this column is excluded from the list of columns available for configuration on a TableConfigPanel component.
setConfigurable
in interface IColumn
public boolean isConfigurable()
Return the value of the configurable
property.
Contents: When disabled, this column is excluded from the list of columns available for configuration on a TableConfigPanel component. Default = 'true'.
isConfigurable
in interface IColumn
public void setFilterBy(java.lang.Object filterBy)
Set the value of the filterBy
property.
Contents: Defines a ValueExpression of the value of this row to use when filtering this column. Setting this attribute, or the "value" attribute for a column enables filtering.
setFilterBy
in interface IColumn
public java.lang.Object getFilterBy()
Return the value of the filterBy
property.
Contents: Defines a ValueExpression of the value of this row to use when filtering this column. Setting this attribute, or the "value" attribute for a column enables filtering.
getFilterBy
in interface IColumn
public void setFilterMatchMode(java.lang.String filterMatchMode)
Set the value of the filterMatchMode
property.
Contents: Defines the method of filter comparison used, default is "startsWith". Types available include: "contains", "exact", "startsWith" and "endsWith".
setFilterMatchMode
in interface IColumn
public java.lang.String getFilterMatchMode()
Return the value of the filterMatchMode
property.
Contents: Defines the method of filter comparison used, default is "startsWith". Types available include: "contains", "exact", "startsWith" and "endsWith". Default = 'startsWith'.
getFilterMatchMode
in interface IColumn
public void setFilterOptions(java.lang.Object filterOptions)
Set the value of the filterOptions
property.
Contents: Defines a collection of SelectItem objects for use as filter choices.
setFilterOptions
in interface IColumn
public java.lang.Object getFilterOptions()
Return the value of the filterOptions
property.
Contents: Defines a collection of SelectItem objects for use as filter choices.
getFilterOptions
in interface IColumn
public void setFilterStyle(java.lang.String filterStyle)
Set the value of the filterStyle
property.
Contents: Defines additional CSS rules to be applied to the filter text input.
setFilterStyle
in interface IColumn
public java.lang.String getFilterStyle()
Return the value of the filterStyle
property.
Contents: Defines additional CSS rules to be applied to the filter text input.
getFilterStyle
in interface IColumn
public void setFilterStyleClass(java.lang.String filterStyleClass)
Set the value of the filterStyleClass
property.
Contents: Defines supplementary CSS classes to add to those already applied on this component.
setFilterStyleClass
in interface IColumn
public java.lang.String getFilterStyleClass()
Return the value of the filterStyleClass
property.
Contents: Defines supplementary CSS classes to add to those already applied on this component.
getFilterStyleClass
in interface IColumn
public void setFilterValue(java.lang.String filterValue)
Set the value of the filterValue
property.
Contents: Defines the string input filtering this column, coming from the client, or from the application via a value binding.
setFilterValue
in interface IColumn
public java.lang.String getFilterValue()
Return the value of the filterValue
property.
Contents: Defines the string input filtering this column, coming from the client, or from the application via a value binding.
getFilterValue
in interface IColumn
public void setFooterText(java.lang.String footerText)
Set the value of the footerText
property.
Contents: Defines a plain text footer with less effort than adding a facet.
setFooterText
in interface IColumn
public java.lang.String getFooterText()
Return the value of the footerText
property.
Contents: Defines a plain text footer with less effort than adding a facet.
getFooterText
in interface IColumn
public void setGroupBy(java.lang.Object groupBy)
Set the value of the groupBy
property.
Contents: Defines a value expression representing the value of this column per row when determining if the values of this column in sibling rows are equal. If they are equal, span the rows witha single column cell.
setGroupBy
in interface IColumn
public java.lang.Object getGroupBy()
Return the value of the groupBy
property.
Contents: Defines a value expression representing the value of this column per row when determining if the values of this column in sibling rows are equal. If they are equal, span the rows witha single column cell.
getGroupBy
in interface IColumn
public void setHeaderText(java.lang.String headerText)
Set the value of the headerText
property.
Contents: Defines a plain text header with less effort than adding a facet. Note that even when using a header facet this property should also be set as a short-form label for the column that will be used within the ace:tableConfigPanel.
setHeaderText
in interface IColumn
public java.lang.String getHeaderText()
Return the value of the headerText
property.
Contents: Defines a plain text header with less effort than adding a facet. Note that even when using a header facet this property should also be set as a short-form label for the column that will be used within the ace:tableConfigPanel.
getHeaderText
in interface IColumn
public void setLazyColumnKey(java.lang.String lazyColumnKey)
Set the value of the lazyColumnKey
property.
Contents: Specifies a string that will be used to identify this column when working in lazy mode. This string will be passed as a key of the filters map and will be returned from SortCriteria.getPropertyName() in the LazyDataModel.load() method. If this attribute is defined, then this value will be used instead of the value obtained by parsing the EL expressions of the sortyBy and filterBy attributes. This attribute is useful when using complex and/or dynamic EL expressions that can't be parsed nor resolved at render time, such as when using c:forEach to define the columns.
setLazyColumnKey
in interface IColumn
public java.lang.String getLazyColumnKey()
Return the value of the lazyColumnKey
property.
Contents: Specifies a string that will be used to identify this column when working in lazy mode. This string will be passed as a key of the filters map and will be returned from SortCriteria.getPropertyName() in the LazyDataModel.load() method. If this attribute is defined, then this value will be used instead of the value obtained by parsing the EL expressions of the sortyBy and filterBy attributes. This attribute is useful when using complex and/or dynamic EL expressions that can't be parsed nor resolved at render time, such as when using c:forEach to define the columns.
getLazyColumnKey
in interface IColumn
public void setPinningOrder(java.lang.Integer pinningOrder)
Set the value of the pinningOrder
property.
Contents: Define the position of this column in the pinned column region when column pinning and scrolling are enabled at the table level. Having a value in this field indicates a column is pinned. 1 indexed.
setPinningOrder
in interface IColumn
public java.lang.Integer getPinningOrder()
Return the value of the pinningOrder
property.
Contents: Define the position of this column in the pinned column region when column pinning and scrolling are enabled at the table level. Having a value in this field indicates a column is pinned. 1 indexed.
getPinningOrder
in interface IColumn
public void setReorderable(boolean reorderable)
Set the value of the reorderable
property.
Contents: Enables per-column control of column ordering when the attribute ("reorderableColumns") is true at the table level.
setReorderable
in interface IColumn
public boolean isReorderable()
Return the value of the reorderable
property.
Contents: Enables per-column control of column ordering when the attribute ("reorderableColumns") is true at the table level. Default = 'true'.
isReorderable
in interface IColumn
public void setRowspan(int rowspan)
Set the value of the rowspan
property.
Contents: Defines the number of rows the rendered cell spans. Only significant to Column components within a column group.
setRowspan
in interface IColumn
public int getRowspan()
Return the value of the rowspan
property.
Contents: Defines the number of rows the rendered cell spans. Only significant to Column components within a column group. Default = '1'.
getRowspan
in interface IColumn
public void setSortAscending(java.lang.Boolean sortAscending)
Set the value of the sortAscending
property.
Contents: Defines the direction of column values during sorting. The column directions incoming from the client during a sort request overwrite any set by the application. Processing the sorted columns is done by the component whenever a client edits a sort control or the application calls table.applySorting().
setSortAscending
in interface IColumn
public java.lang.Boolean isSortAscending()
Return the value of the sortAscending
property.
Contents: Defines the direction of column values during sorting. The column directions incoming from the client during a sort request overwrite any set by the application. Processing the sorted columns is done by the component whenever a client edits a sort control or the application calls table.applySorting(). Default = 'false'.
isSortAscending
in interface IColumn
public void setSortBy(java.lang.Object sortBy)
Set the value of the sortBy
property.
Contents: Defines a value expression representing the value of this column per row when sorting. Setting this attribute, or the "value" attribute for a column enables sorting.
public java.lang.Object getSortBy()
Return the value of the sortBy
property.
Contents: Defines a value expression representing the value of this column per row when sorting. Setting this attribute, or the "value" attribute for a column enables sorting.
public void setSortFunction(java.util.Comparator sortFunction)
Set the value of the sortFunction
property.
Contents: Defines an alternate method of sorting. Sort this column using a Comparator
setSortFunction
in interface IColumn
public java.util.Comparator getSortFunction()
Return the value of the sortFunction
property.
Contents: Defines an alternate method of sorting. Sort this column using a Comparator
getSortFunction
in interface IColumn
public void setSortPriority(java.lang.Integer sortPriority)
Set the value of the sortPriority
property.
Contents: Defines the priority of a column during sorting. The column priorities incoming from the client during a sort request overwrite any set by the application. Processing the sorted columns is done by the component whenever a client edits a sort control or the application calls table.applySorting().
setSortPriority
in interface IColumn
public java.lang.Integer getSortPriority()
Return the value of the sortPriority
property.
Contents: Defines the priority of a column during sorting. The column priorities incoming from the client during a sort request overwrite any set by the application. Processing the sorted columns is done by the component whenever a client edits a sort control or the application calls table.applySorting().
getSortPriority
in interface IColumn
public void setStacked(boolean stacked)
Set the value of the stacked
property.
Contents: When enabled, this column is rendered underneath the previous column.
setStacked
in interface IColumn
public boolean isStacked()
Return the value of the stacked
property.
Contents: When enabled, this column is rendered underneath the previous column.
public void setStyle(java.lang.String style)
Set the value of the style
property.
Contents: Custom inline CSS styles to use for this component. These styles are generally applied to the root DOM element of the component. This is intended for per-component basic style customizations. Note that due to browser CSS precedence rules, CSS rendered on a DOM element will take precedence over the external stylesheets used to provide the ThemeRoller theme on this component. If the CSS properties applied with this attribute do not affect the DOM element you want to style, you may need to create a custom theme styleClass for the theme CSS class that targets the particular DOM elements you wish to customize.
public java.lang.String getStyle()
Return the value of the style
property.
Contents: Custom inline CSS styles to use for this component. These styles are generally applied to the root DOM element of the component. This is intended for per-component basic style customizations. Note that due to browser CSS precedence rules, CSS rendered on a DOM element will take precedence over the external stylesheets used to provide the ThemeRoller theme on this component. If the CSS properties applied with this attribute do not affect the DOM element you want to style, you may need to create a custom theme styleClass for the theme CSS class that targets the particular DOM elements you wish to customize.
public void setStyleClass(java.lang.String styleClass)
Set the value of the styleClass
property.
Contents: Custom CSS style class(es) to use for this component. These style classes can be defined in your page or in a theme CSS file.
setStyleClass
in interface IColumn
public java.lang.String getStyleClass()
Return the value of the styleClass
property.
Contents: Custom CSS style class(es) to use for this component. These style classes can be defined in your page or in a theme CSS file.
getStyleClass
in interface IColumn
protected boolean isPropertySet(java.lang.String finder)
public void setValueExpression(java.lang.String name, javax.el.ValueExpression binding)
setValueExpression
in class javax.faces.component.UIComponent
Copyright 2014 ICEsoft Technologies Canada Corp., All Rights Reserved.


Saemapetch Fairtex Ready to Showcase Power Against Nong-O Gaiyanghadao
by Press ReleaseSaemapetch Fairtex is looking forward to ONE: EDGE OF GREATNESS on 22 November when he challenges Muay Thai legend Nong-O Gaiyanghadao for the ONE Bantamweight Muay Thai World Title in Singapore.
Getting the call to challenge the champion, Saemapetch is absolutely pumped for his first shot at ONE gold.
“I felt very happy when I heard the news,” Saemapetch said.
“Fighting for the title against a Muay Thai legend like Nong-O is a big honor. It’s the biggest fight in my entire career. It is a blessing for me to get to fight him.”
Saemapetch understands the expectations of the crowd to deliver their best performances. After all, Muay Thai athletes from Thailand have dedicated almost their entire lives for the “art of eight limbs.”
Saemapetch knows the crowd expects nothing but the best from two seasoned Thai athletes in the “art of eight limbs.” He feels some pressure but is excited to showcase his skills.
“Of course, this match brings a lot of pressure on me to perform,” Saemapetch said.
“There is a lot at stake, especially when a Thai fighter faces another Thai fighter. I just have to give it my all.”
Analyzing the champion, Saemapetch knows exactly what he’s up against. He also believes that he may have an edge where youth is concerned.
“Nong-O is very tactical and a very well-rounded Muay Thai fighter,” Saemapetch said.
“He can do it all, and he has lots of experience. I think age might be a factor in this one, I’m the younger guy. And he hasn’t faced a Thai fighter in a long time.”
If he’s able to unseat Nong-O from the throne, Saemapetch will have notched his greatest achievement so far. As such, his entire focus is on winning the World Title and beating a Thai legend.
“Winning the title would mean the world to me,” Saemapetch said.
“It’s the biggest most prestigious belt in the world. Fighting against a legend of Muay Thai is already great enough as it is, but winning that belt would be the icing on the cake. Not many people get this opportunity.”
Saemapetch hopes he doesn’t disappoint the fans in his biggest match to date. He has been working hard to make sure that he will be able to go all out and give it his everything.
“Obviously, I have to be in the best shape of my life and I’m training for that,” Saemapetch said.
“I have to showcase my power for this fight. I’m sure it’s going to be fun and the fans will love it. I’m very excited for everyone to watch.”


On September 30 the Florida Justice Technology Center effectively shut down. I
worked as a Project Manager then as Dev Team Leader for the FJTC for nearly two
years. I left the FJTC in August to work with the legal research company vLex.
A note about my work - I'm an independent contractor and have been for several
years. I work with vLex as well as Measures for Justice, and do consulting /
development on top of those. I consider myself lucky to have good clients who
pay my bills. There are precious few full-time jobs in legal technology in even fewer places, no
matter what it seems like from people talking about #crushing #it online. (Getting
paid in legal tech would make for a whole other blog post.) I was
an independent contractor for the FJTC as well.
I'm not going into the reasons the FJTC shut down. I'm going to regale you with
my take on what the FJTC did well, didn't do well, and how institutional structure
hobbled it from inception.
**What the FJTC did well:**
The FJTC's mission, paraphrased by me, was to develop technology to deliver access to
civil justice. I'll assume that if you're reading this you're familiar with the
sheer amount of people who can't even begin to seek some sort of remedy in the court
system. The FJTC was created to solve this problem through technology, at least
in Florida.
The FJTC did a number of things well:
1. It was agile: I'm not talking about the 'Agile Method' or 'Agile Development'
but rather the ability to adapt to a client's or user's needs. An example: we didn't
have a specific technology we worked with (i.e. we only worked with Salesforce),
rather we found what fit a client's needs and used that. This also became a drawback,
as you can imagine.
2. It wasn't afraid to try: the FJTC's philosophy (paraphrased by me) was to 'start
with yes.' Got an idea for a whiz-bang thing that does XYZ? Let's figure it out?
In legal tech I think a lot of people start with 'no' as an automatic response, which
shuts down actual innovation before it can, well, innovate.
3. It showed up: the FJTC showed up to stuff, to conferences, client's offices,
legal clinics, Pride marches, etc. The longer I'm in this game the more I realize
the connections you make as an individual, and as a company, by showing up to things.
**What the FJTC didn't do well:**
The things the FJTC didn't do well sort of mirror the things it did well.
1. Lack of an 'institutional tech platform': Not having a standard set of
technologies created technical deficits in the tools the FJTC built, and made
maintenance difficult. One of the many things a group like Theory and Principle
does well is build from a common 'stack', or set of technology. You can waste a
lot of time and energy if you have 'new and shiny syndrome.' One of the things
I had been trying to implement at the FJTC when I left was the move to a standard
group of technologies that could be easily developed and maintained.
2. Hard time saying no: sometimes the right answer *is* no, when it's for the
right reasons. Sometimes chasing down a rabbit trail sin't worth it, and the
FJTC didn't have good institutional guards in place to vet things super early.
3. Remote is hard: having an entirely remote workforce in an inherently creative
business is hard. Maybe this is my personal bias talking, but sitting by myself
in my home office or a rented space with no one to talk to or bounce ideas off of
dampens the creative impulse. All of the FJTC's contractors were remote, in
different states, which really made coordination difficult and physical attendance
anywhere expensive.
4. Independent contracting is hard: especially when you have independent contractors
supervising, reporting to, and delegating to other independent contractors. Don't
get me wrong, independent contracting is great for some roles, but when you need
people to take ownership of some project being an independent contractor is an
impediment.
**Institutional hobbling:**
The FJTC was set up to compete with legal aid orgs for funding. The Florida
Bar Foundation created the FJTC and was its primary funder. The FBF was also
the primary funder for around half of the legal aid orgs in Florida (others are
funded by LSC or privately), and put the FJTC in the same funding situation as
the other orgs it funds. This essentially meant that the org meant to develop
tech to help legal aid orgs (the FJTC) was also competing with those legal aid
orgs for funding. Not a great system.
The FBF wanted the FJTC to be many things but, when funding time came, reduced it to one.
They wanted to have the FJTC be the tech arm of the legal aids under their purview,
but made them compete with the FJTC for dollars. Dollars that could be used to
hire staff, improve their internal technology, hire lawyers, you get the picture.
This is a tenuous arrangement at best if
the FJTC was dedicated only to developing tools that all the other FBF-funded orgs
can use. But that wasn't the FJTC's mission. This funding structure is, in my mind,
one of the main reasons the FJTC wasn't set up for success.
There are other issues too that I won't go into. But I'm proud, *damn* proud of
the work I did for the FJTC, and I still the world needs a
multi-jurisdictional pro-bono legal tech development shop with piles of funding (if you
know of one please let me know). I'm sad to see the FJTC go.


Mathematical utilities (skhep.math)¶
Subpackage for mathematical functions and utilities¶
Mathematical functions relevant to kinematics¶
-
skhep.math.kinematics.
Kallen_function
(x, y, z)¶ The Kallen function, aka triangle or lambda function, named after physicist Anders Olof Gunnar Kallen [Kallen].
Definition: \[\begin{split}\begin{eqnarray} \lambda(x,y,z) &=& x^2 + y^2 + z^2 - 2 x y - 2 y z - 2 z x \\ &=& (x-y-z)^2 - 4 y z \\ &=& [ x - (\sqrt{y}+\sqrt{z})^2 ] [ x - (\sqrt{y}-\sqrt{z})^2 ] \,\,\,\mathrm{if} \,\,\,y, z > 0 \end{eqnarray}\end{split}\]Example: Calculate in the rest frame of a particle of mass M decaying to 2 particles labeled 1 and 2, \(P (M) \to p1 (m1) + p2 (m2)\), the momenta of 1 and 2 given by \(p = |\mathbf{p1}| = |\mathbf{p2}|\):
>>> from skhep.math import Kallen_function >>> from skhep.units import MeV, GeV >>> from math import sqrt >>> M = 5.279 * GeV; m1 = 493.7 * MeV; m2 = 139.6 * MeV >>> p = sqrt( Kallen_function( M**2, m1**2, m2**2 ) ) / (2*M) >>> print p / GeV # print the CMS momentum in GeV 2.61453580221
Reference: [Kallen] https://en.wikipedia.org/wiki/K%C3%A4ll%C3%A9n_function


We use only the highest quality products in all our services. Innovative nail and skin products are essential for healthy hands and feet. We provide our customers the most luxurious manicures, artificial nails, facials and waxing
Find Out More7 Sisters is the perfect place to host social events such as birthday parties, bachelorette parties, bridal shower parties, graduation or anniversary celebrations.
Monday - Friday 10:00am - 7:00pm
Saturday 9:00am - 6:00pm
Sunday 11:00am - 5:00pm
Delight Manicure $25
Royal Organic Manicure $35
Delight Pedicure $40
Royal Organic Pedicure $50
Deluxe Pearl Pedicure $60
Chocolate Pedicure $70
French Manicure $30
Acrylic Set $50
Gel Set $55
Nail Shellac $40
Silk Set $50
Two Tone $60
Refill Acrylic $40
Refill Gel $45
Refill Silk $40
Refill Two Tone $50
Paraffin Hands $15
Paraffin Feet $20
Callus Treatment $20
Natural $15
Acrylic $20
Toenail $20
Acrylic removal $15
Nail Repair $5
Soak your hands in soothing water, followed by nail shaping, cuticle care, nail buffing and moisture massage. Finish with the beautiful polishing color of your choice.
In addition to Delight Manicure: Soak your hands in silky water with fresh lime slices and flowers, applying a salt scrub, wrap with organic mask then a organic aromatic massage with hot stones.
Personalized foot care treatment includes: Nail shaping, cleaning, cuticle care, salt glow exfoliation, hot towel wrapping, moisture massage and polish color of your choice.
Bathe your feet in silky warm water with organic oil, fresh lime and flowers, organic mask and scrub exfoliation, volcanic stone massage and organic cream hydration
An exotic beauty pearl powder which uses our secret extract form the sea. The Pedi-Pearl Powder contains a variety of minerals and amino acids that naturally moisturize your skin and protects it from harsh and dry conditions.
The luxurious chocolate treatment will leave your feet feeling smooth and rejuvenated.
Forehead $20
Eyebrow $18
Eyebrow Tint $20
Upper Lip $15
Chin $15
Sideburns $25
Full face $60
Under Arms $25
Arms (half) $35 & up
Arms (full) $50 & up
Legs (half) $40 & up
Legs (full) $60 & up
Back $50 & up
Brazilian $60 & up
Bikini Line $30 & up
Natural tapered synthetic extensions are
attached one by one to your natural
upper lashes
Light Lashes $120
Medium Lashes $140
Full Lashes $250
Touch-up $140 & up
Treatment to help maintain a healthy skin complexion. Includes cleanse, steam, exfoliation and a soothing mask. Visible results will leave you feeling refreshed. 45 minutes
An excellent introduction to our facial treatment and professional skin care. cleanse, steam, exfoliation, facial massage and customized mask followed by a moisturized head, neck and shoulder massage. This treatment clarifies, purifies, and rejuvenates any skin type. 60 minutes
A relaxing and refreshing anti-aging facial treatment for all skin types. Includes extraction, cleanse, steam, purifying exfoliation, facial massage and customized mask selected for each individual skin type, followed by a head neck, and shoulder massage. This relaxing treatment will leave your skin renewed, refreshed, hydrated and refined. 75 minutes
Call us today to schedule your next nail service at 7 Sisters Nail Spa


Journal articles
- Identification of miR-29b targets using 3-cyanovinylcarbazole containing mimics
RNA
2018
- Transcriptional Convergence of Oligodendrocyte Lineage Progenitors during Development
Developmental cell
2018
- Human iPSC-Derived Cerebellar Neurons from a Patient with Ataxia-Telangiectasia Reveal Disrupted Gene Regulatory Networks
Frontiers in cellular neuroscience
2017
- Challenges in defining the role of intron retention in normal biology and disease
2017
- Amiodarone induces cell wall channel formation in yeast Hansenula polymorpha
SpringerPlus
2015
- The long non-coding RNA Gomafu is acutely regulated in response to neuronal activation and involved in schizophrenia-associated alternative splicing
Molecular psychiatry
2014
- RevSex duplication-induced and sex-related differences in the SOX9 regulatory region chromatin landscape in human fibroblasts
Epigenetics
2014
Conference presentations
- The Grammar of Graphics
In Sydney ResBaz 2018 Macquarie University (invited talk)
2018
- Training the trainer: Software Carpentry Instructor Training
In ANDS-NECTAR-RDS Workshop: Powering up your 2018 (data skills) training (invited talk)
2018
- Big Data Biology for Pythonistas: Getting in on the Genomics Revolution
In PyCon Au (talk selected from abstracts)
2016
- Temporal and developmental dynamics of the oligodendrocyte precursor transcriptome
In Sydney Bioinformatics Research Symposium (talk selected from abstracts)
2016
- Temporal and developmental dynamics of the oligodendrocyte precursor transcriptome
In Proceedings of the 37th Lorne Genome Conference (poster presentation)
2016
- Ataxia-telangiectasia iPS-derived neuronal transcriptome
In Proceedings of the 35th Lorne Genome Conference (poster presentation)
2014
- Activity-dependent transcriptional dynamics in mouse cortical and human iPS - derived neurons
In Proceedings of the 33rd Lorne Genome Conference (poster presentation)
2012
- A Novel Non-coding Human Transcript from Locus ATP4A-HAUS5 (Chr19)
In XVII International student, postgraduate and young scientist conference ’Lomonosov’ (poster presentation)
2010
- A Novel Non-coding Human Transcript from Locus ATP4A-HAUS5 (Chr19)
In 14th International Pushchino School-Conference for Young Scientists ’Biology- Science of the XXI century’ (poster presentation)
2010
- Characterization of a Novel Transcript from Human Locus ATP4A-KIAA0841 (Chr19)
In XXII Winter School for Young Scientists ’Promising Areas of Physico-chemical Biology and Biotechnology’ (poster presentation)
2010
PhD
- Marvellous complexity: Characterising the transcriptome of the mammalian nervous system using RNA sequencing
2016