Java Code Examples for com.sun.xml.internal.xsom.XSType#isLocal()

The following examples show how to use com.sun.xml.internal.xsom.XSType#isLocal() . 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 TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Creates node for element declaration with additional attributes.
 *
 * @param decl      Element declaration.
 * @param extraAtts Additional attributes.
 */
private void elementDecl(XSElementDecl decl, String extraAtts) {
    XSType type = decl.getType();

    // TODO: various other attributes

    String str = MessageFormat.format("Element name=\"{0}\"{1}{2}",
            new Object[]{
                decl.getName(),
                type.isLocal() ? "" : " type=\"{"
            + type.getTargetNamespace() + "}"
            + type.getName() + "\"", extraAtts});

    SchemaTreeNode newNode = new SchemaTreeNode(str, decl.getLocator());
    this.currNode.add(newNode);
    this.currNode = newNode;

    if (type.isLocal()) {
        if (type.isLocal()) {
            type.visit(this);
        }
    }

    this.currNode = (SchemaTreeNode) this.currNode.getParent();
}
 
Example 2
Source File: SchemaTreeTraverser.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Creates node for element declaration with additional attributes.
 *
 * @param decl      Element declaration.
 * @param extraAtts Additional attributes.
 */
private void elementDecl(XSElementDecl decl, String extraAtts) {
    XSType type = decl.getType();

    // TODO: various other attributes

    String str = MessageFormat.format("Element name=\"{0}\"{1}{2}",
            new Object[]{
                decl.getName(),
                type.isLocal() ? "" : " type=\"{"
            + type.getTargetNamespace() + "}"
            + type.getName() + "\"", extraAtts});

    SchemaTreeNode newNode = new SchemaTreeNode(str, decl.getLocator());
    this.currNode.add(newNode);
    this.currNode = newNode;

    if (type.isLocal()) {
        if (type.isLocal()) {
            type.visit(this);
        }
    }

    this.currNode = (SchemaTreeNode) this.currNode.getParent();
}
 
Example 3
Source File: SchemaTreeTraverser.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Creates node for element declaration with additional attributes.
 *
 * @param decl      Element declaration.
 * @param extraAtts Additional attributes.
 */
private void elementDecl(XSElementDecl decl, String extraAtts) {
    XSType type = decl.getType();

    // TODO: various other attributes

    String str = MessageFormat.format("Element name=\"{0}\"{1}{2}",
            new Object[]{
                decl.getName(),
                type.isLocal() ? "" : " type=\"{"
            + type.getTargetNamespace() + "}"
            + type.getName() + "\"", extraAtts});

    SchemaTreeNode newNode = new SchemaTreeNode(str, decl.getLocator());
    this.currNode.add(newNode);
    this.currNode = newNode;

    if (type.isLocal()) {
        if (type.isLocal()) {
            type.visit(this);
        }
    }

    this.currNode = (SchemaTreeNode) this.currNode.getParent();
}
 
Example 4
Source File: SchemaTreeTraverser.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Creates node for element declaration with additional attributes.
 *
 * @param decl      Element declaration.
 * @param extraAtts Additional attributes.
 */
private void elementDecl(XSElementDecl decl, String extraAtts) {
    XSType type = decl.getType();

    // TODO: various other attributes

    String str = MessageFormat.format("Element name=\"{0}\"{1}{2}",
            new Object[]{
                decl.getName(),
                type.isLocal() ? "" : " type=\"{"
            + type.getTargetNamespace() + "}"
            + type.getName() + "\"", extraAtts});

    SchemaTreeNode newNode = new SchemaTreeNode(str, decl.getLocator());
    this.currNode.add(newNode);
    this.currNode = newNode;

    if (type.isLocal()) {
        if (type.isLocal()) {
            type.visit(this);
        }
    }

    this.currNode = (SchemaTreeNode) this.currNode.getParent();
}
 
Example 5
Source File: SchemaTreeTraverser.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Creates node for element declaration with additional attributes.
 *
 * @param decl      Element declaration.
 * @param extraAtts Additional attributes.
 */
private void elementDecl(XSElementDecl decl, String extraAtts) {
    XSType type = decl.getType();

    // TODO: various other attributes

    String str = MessageFormat.format("Element name=\"{0}\"{1}{2}",
            new Object[]{
                decl.getName(),
                type.isLocal() ? "" : " type=\"{"
            + type.getTargetNamespace() + "}"
            + type.getName() + "\"", extraAtts});

    SchemaTreeNode newNode = new SchemaTreeNode(str, decl.getLocator());
    this.currNode.add(newNode);
    this.currNode = newNode;

    if (type.isLocal()) {
        if (type.isLocal()) {
            type.visit(this);
        }
    }

    this.currNode = (SchemaTreeNode) this.currNode.getParent();
}
 
Example 6
Source File: SchemaTreeTraverser.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Creates node for element declaration with additional attributes.
 *
 * @param decl      Element declaration.
 * @param extraAtts Additional attributes.
 */
private void elementDecl(XSElementDecl decl, String extraAtts) {
    XSType type = decl.getType();

    // TODO: various other attributes

    String str = MessageFormat.format("Element name=\"{0}\"{1}{2}",
            new Object[]{
                decl.getName(),
                type.isLocal() ? "" : " type=\"{"
            + type.getTargetNamespace() + "}"
            + type.getName() + "\"", extraAtts});

    SchemaTreeNode newNode = new SchemaTreeNode(str, decl.getLocator());
    this.currNode.add(newNode);
    this.currNode = newNode;

    if (type.isLocal()) {
        if (type.isLocal()) {
            type.visit(this);
        }
    }

    this.currNode = (SchemaTreeNode) this.currNode.getParent();
}
 
Example 7
Source File: SchemaWriter.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private void elementDecl( XSElementDecl decl, String extraAtts ) {
    XSType type = decl.getType();

    // TODO: various other attributes

    // qualified attr; Issue
    if(decl.getForm() != null) {
        extraAtts += " form=\"" + (decl.getForm() ? "qualified" : "unqualified" ) + "\"";
    }

    println(MessageFormat.format("<element name=\"{0}\"{1}{2}{3}>",
        decl.getName(),
        type.isLocal()?"":" type=\"{"+
        type.getTargetNamespace()+'}'+
        type.getName()+'\"',
        extraAtts,
        type.isLocal()?"":"/"));

    if(type.isLocal()) {
        indent++;

        if(type.isLocal())  type.visit(this);

        indent--;
        println("</element>");
    }
}
 
Example 8
Source File: SchemaWriter.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private void elementDecl( XSElementDecl decl, String extraAtts ) {
    XSType type = decl.getType();

    // TODO: various other attributes

    // qualified attr; Issue
    if(decl.getForm() != null) {
        extraAtts += " form=\"" + (decl.getForm() ? "qualified" : "unqualified" ) + "\"";
    }

    println(MessageFormat.format("<element name=\"{0}\"{1}{2}{3}>",
        decl.getName(),
        type.isLocal()?"":" type=\"{"+
        type.getTargetNamespace()+'}'+
        type.getName()+'\"',
        extraAtts,
        type.isLocal()?"":"/"));

    if(type.isLocal()) {
        indent++;

        if(type.isLocal())  type.visit(this);

        indent--;
        println("</element>");
    }
}
 
Example 9
Source File: SchemaWriter.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private void elementDecl( XSElementDecl decl, String extraAtts ) {
    XSType type = decl.getType();

    // TODO: various other attributes

    // qualified attr; Issue
    if(decl.getForm() != null) {
        extraAtts += " form=\"" + (decl.getForm() ? "qualified" : "unqualified" ) + "\"";
    }

    println(MessageFormat.format("<element name=\"{0}\"{1}{2}{3}>",
        decl.getName(),
        type.isLocal()?"":" type=\"{"+
        type.getTargetNamespace()+'}'+
        type.getName()+'\"',
        extraAtts,
        type.isLocal()?"":"/"));

    if(type.isLocal()) {
        indent++;

        if(type.isLocal())  type.visit(this);

        indent--;
        println("</element>");
    }
}
 
Example 10
Source File: SchemaWriter.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private void elementDecl( XSElementDecl decl, String extraAtts ) {
    XSType type = decl.getType();

    // TODO: various other attributes

    // qualified attr; Issue
    if(decl.getForm() != null) {
        extraAtts += " form=\"" + (decl.getForm() ? "qualified" : "unqualified" ) + "\"";
    }

    println(MessageFormat.format("<element name=\"{0}\"{1}{2}{3}>",
        decl.getName(),
        type.isLocal()?"":" type=\"{"+
        type.getTargetNamespace()+'}'+
        type.getName()+'\"',
        extraAtts,
        type.isLocal()?"":"/"));

    if(type.isLocal()) {
        indent++;

        if(type.isLocal())  type.visit(this);

        indent--;
        println("</element>");
    }
}
 
Example 11
Source File: SchemaWriter.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private void elementDecl( XSElementDecl decl, String extraAtts ) {
    XSType type = decl.getType();

    // TODO: various other attributes

    // qualified attr; Issue
    if(decl.getForm() != null) {
        extraAtts += " form=\"" + (decl.getForm() ? "qualified" : "unqualified" ) + "\"";
    }

    println(MessageFormat.format("<element name=\"{0}\"{1}{2}{3}>",
        decl.getName(),
        type.isLocal()?"":" type=\"{"+
        type.getTargetNamespace()+'}'+
        type.getName()+'\"',
        extraAtts,
        type.isLocal()?"":"/"));

    if(type.isLocal()) {
        indent++;

        if(type.isLocal())  type.visit(this);

        indent--;
        println("</element>");
    }
}
 
Example 12
Source File: SchemaWriter.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private void elementDecl( XSElementDecl decl, String extraAtts ) {
    XSType type = decl.getType();

    // TODO: various other attributes

    // qualified attr; Issue
    if(decl.getForm() != null) {
        extraAtts += " form=\"" + (decl.getForm() ? "qualified" : "unqualified" ) + "\"";
    }

    println(MessageFormat.format("<element name=\"{0}\"{1}{2}{3}>",
        decl.getName(),
        type.isLocal()?"":" type=\"{"+
        type.getTargetNamespace()+'}'+
        type.getName()+'\"',
        extraAtts,
        type.isLocal()?"":"/"));

    if(type.isLocal()) {
        indent++;

        if(type.isLocal())  type.visit(this);

        indent--;
        println("</element>");
    }
}
 
Example 13
Source File: SchemaWriter.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private void elementDecl( XSElementDecl decl, String extraAtts ) {
    XSType type = decl.getType();

    // TODO: various other attributes

    // qualified attr; Issue
    if(decl.getForm() != null) {
        extraAtts += " form=\"" + (decl.getForm() ? "qualified" : "unqualified" ) + "\"";
    }

    println(MessageFormat.format("<element name=\"{0}\"{1}{2}{3}>",
        decl.getName(),
        type.isLocal()?"":" type=\"{"+
        type.getTargetNamespace()+'}'+
        type.getName()+'\"',
        extraAtts,
        type.isLocal()?"":"/"));

    if(type.isLocal()) {
        indent++;

        if(type.isLocal())  type.visit(this);

        indent--;
        println("</element>");
    }
}
 
Example 14
Source File: Util.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public static void buildSubstitutables( XSType _this, Set substitutables ) {
    if( _this.isLocal() )    return;
    buildSubstitutables( _this, _this, substitutables );
}
 
Example 15
Source File: Util.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public static void buildSubstitutables( XSType _this, Set substitutables ) {
    if( _this.isLocal() )    return;
    buildSubstitutables( _this, _this, substitutables );
}
 
Example 16
Source File: Util.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public static void buildSubstitutables( XSType _this, Set substitutables ) {
    if( _this.isLocal() )    return;
    buildSubstitutables( _this, _this, substitutables );
}
 
Example 17
Source File: Step.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
protected boolean match(XSType node) {
    return node.isLocal();
}
 
Example 18
Source File: Util.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public static void buildSubstitutables( XSType _this, Set substitutables ) {
    if( _this.isLocal() )    return;
    buildSubstitutables( _this, _this, substitutables );
}
 
Example 19
Source File: Step.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
protected boolean match(XSType node) {
    return node.isLocal();
}
 
Example 20
Source File: Step.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
protected boolean match(XSType node) {
    return node.isLocal();
}