Java Code Examples for com.sun.xml.xsom.XSModelGroup#getSize()

The following examples show how to use com.sun.xml.xsom.XSModelGroup#getSize() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SchemaTreeTraverser.java    From jolie with GNU Lesser General Public License v2.1 5 votes vote down vote up
/**
 * Creates node for model group with additional attributes.
 *
 * @param group     Model group.
 * @param extraAtts Additional attributes.
 */
private void modelGroup(XSModelGroup group, String extraAtts) {
    SchemaTreeNode newNode = new SchemaTreeNode(MessageFormat.format(
            "{0}{1}", new Object[]{group.getCompositor(), extraAtts}),
            group.getLocator());
    this.currNode.add(newNode);
    this.currNode = newNode;

    final int len = group.getSize();
    for (int i = 0; i < len; i++) {
        particle(group.getChild(i));
    }

    this.currNode = (SchemaTreeNode) this.currNode.getParent();
}
 
Example 2
Source File: SchemaWriter.java    From jolie with GNU Lesser General Public License v2.1 5 votes vote down vote up
private void modelGroup( XSModelGroup group, String extraAtts ) {
    println(MessageFormat.format("<{0}{1}>",
        new Object[]{ group.getCompositor(), extraAtts }));
    indent++;

    final int len = group.getSize();
    for( int i=0; i<len; i++ )
        particle(group.getChild(i));

    indent--;
    println(MessageFormat.format("</{0}>",
        new Object[]{ group.getCompositor() }));
}
 
Example 3
Source File: JumbuneSchemaWriter.java    From jumbune with GNU Lesser General Public License v3.0 5 votes vote down vote up
private void modelGroup( XSModelGroup group, String extraAtts ) {
    println(MessageFormat.format("<{0}{1}>", group.getCompositor(), extraAtts));
    indent++;

    final int len = group.getSize();
    for( int i=0; i<len; i++ )
        particle(group.getChild(i));

    indent--;
    println(MessageFormat.format("</{0}>", group.getCompositor()));
}
 
Example 4
Source File: SchemaWriter.java    From citygml4j with Apache License 2.0 5 votes vote down vote up
private void modelGroup( XSModelGroup group, String extraAtts ) {
	println(MessageFormat.format("<{0}{1}>", group.getCompositor(), extraAtts));
	indent++;

	final int len = group.getSize();
	for( int i=0; i<len; i++ )
		particle(group.getChild(i));

	indent--;
	println(MessageFormat.format("</{0}>", group.getCompositor()));
}