com.sun.xml.internal.xsom.XSModelGroupDecl Java Examples

The following examples show how to use com.sun.xml.internal.xsom.XSModelGroupDecl. 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: SchemaWriter.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public void schema( XSSchema s ) {

        // QUICK HACK: don't print the built-in components
        if(s.getTargetNamespace().equals(Const.schemaNamespace))
            return;

        println(MessageFormat.format("<schema targetNamespace=\"{0}\">", s.getTargetNamespace()));
        indent++;

        Iterator itr;

        itr = s.iterateAttGroupDecls();
        while(itr.hasNext())
            attGroupDecl( (XSAttGroupDecl)itr.next() );

        itr = s.iterateAttributeDecls();
        while(itr.hasNext())
            attributeDecl( (XSAttributeDecl)itr.next() );

        itr = s.iterateComplexTypes();
        while(itr.hasNext())
            complexType( (XSComplexType)itr.next() );

        itr = s.iterateElementDecls();
        while(itr.hasNext())
            elementDecl( (XSElementDecl)itr.next() );

        itr = s.iterateModelGroupDecls();
        while(itr.hasNext())
            modelGroupDecl( (XSModelGroupDecl)itr.next() );

        itr = s.iterateSimpleTypes();
        while(itr.hasNext())
            simpleType( (XSSimpleType)itr.next() );

        indent--;
        println("</schema>");
    }
 
Example #2
Source File: BISchemaBinding.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Transforms the default name produced from XML name
 * by following the customization.
 *
 * This shouldn't be applied to a class name specified
 * by a customization.
 *
 * @param cmp
 *      The schema component from which the default name is derived.
 */
public String mangleClassName( String name, XSComponent cmp ) {
    if( cmp instanceof XSType )
        return nameXmlTransform.typeName.mangle(name);
    if( cmp instanceof XSElementDecl )
        return nameXmlTransform.elementName.mangle(name);
    if( cmp instanceof XSAttributeDecl )
        return nameXmlTransform.attributeName.mangle(name);
    if( cmp instanceof XSModelGroup || cmp instanceof XSModelGroupDecl )
        return nameXmlTransform.modelGroupName.mangle(name);

    // otherwise no modification
    return name;
}
 
Example #3
Source File: SchemaWriter.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public void modelGroupDecl( XSModelGroupDecl decl ) {
    println(MessageFormat.format("<group name=\"{0}\">", decl.getName()));
    indent++;

    modelGroup(decl.getModelGroup());

    indent--;
    println("</group>");
}
 
Example #4
Source File: BISchemaBinding.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Transforms the default name produced from XML name
 * by following the customization.
 *
 * This shouldn't be applied to a class name specified
 * by a customization.
 *
 * @param cmp
 *      The schema component from which the default name is derived.
 */
public String mangleClassName( String name, XSComponent cmp ) {
    if( cmp instanceof XSType )
        return nameXmlTransform.typeName.mangle(name);
    if( cmp instanceof XSElementDecl )
        return nameXmlTransform.elementName.mangle(name);
    if( cmp instanceof XSAttributeDecl )
        return nameXmlTransform.attributeName.mangle(name);
    if( cmp instanceof XSModelGroup || cmp instanceof XSModelGroupDecl )
        return nameXmlTransform.modelGroupName.mangle(name);

    // otherwise no modification
    return name;
}
 
Example #5
Source File: SchemaTreeTraverser.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public void modelGroupDecl(XSModelGroupDecl decl) {
    SchemaTreeNode newNode = new SchemaTreeNode(MessageFormat.format(
            "Group name=\"{0}\"", new Object[]{decl.getName()}),
            decl.getLocator());
    this.currNode.add(newNode);
    this.currNode = newNode;

    modelGroup(decl.getModelGroup());

    this.currNode = (SchemaTreeNode) this.currNode.getParent();
}
 
Example #6
Source File: SchemaWriter.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public void modelGroupDecl( XSModelGroupDecl decl ) {
    println(MessageFormat.format("<group name=\"{0}\">", decl.getName()));
    indent++;

    modelGroup(decl.getModelGroup());

    indent--;
    println("</group>");
}
 
Example #7
Source File: BISchemaBinding.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Transforms the default name produced from XML name
 * by following the customization.
 *
 * This shouldn't be applied to a class name specified
 * by a customization.
 *
 * @param cmp
 *      The schema component from which the default name is derived.
 */
public String mangleClassName( String name, XSComponent cmp ) {
    if( cmp instanceof XSType )
        return nameXmlTransform.typeName.mangle(name);
    if( cmp instanceof XSElementDecl )
        return nameXmlTransform.elementName.mangle(name);
    if( cmp instanceof XSAttributeDecl )
        return nameXmlTransform.attributeName.mangle(name);
    if( cmp instanceof XSModelGroup || cmp instanceof XSModelGroupDecl )
        return nameXmlTransform.modelGroupName.mangle(name);

    // otherwise no modification
    return name;
}
 
Example #8
Source File: SchemaWriter.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public void modelGroupDecl( XSModelGroupDecl decl ) {
    println(MessageFormat.format("<group name=\"{0}\">", decl.getName()));
    indent++;

    modelGroup(decl.getModelGroup());

    indent--;
    println("</group>");
}
 
Example #9
Source File: SchemaSetImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public Iterator<XSModelGroupDecl> iterateModelGroupDecls() {
    return new Iterators.Map<XSModelGroupDecl,XSSchema>(iterateSchema()) {
        protected Iterator<XSModelGroupDecl> apply(XSSchema u) {
            return u.iterateModelGroupDecls();
        }
    };
}
 
Example #10
Source File: SchemaTreeTraverser.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public void modelGroupDecl(XSModelGroupDecl decl) {
    SchemaTreeNode newNode = new SchemaTreeNode(MessageFormat.format(
            "Group name=\"{0}\"", new Object[]{decl.getName()}),
            decl.getLocator());
    this.currNode.add(newNode);
    this.currNode = newNode;

    modelGroup(decl.getModelGroup());

    this.currNode = (SchemaTreeNode) this.currNode.getParent();
}
 
Example #11
Source File: SchemaWriter.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public void modelGroupDecl( XSModelGroupDecl decl ) {
    println(MessageFormat.format("<group name=\"{0}\">", decl.getName()));
    indent++;

    modelGroup(decl.getModelGroup());

    indent--;
    println("</group>");
}
 
Example #12
Source File: BindBlue.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public void modelGroupDecl(XSModelGroupDecl xsModelGroupDecl) {
    // TODO
    throw new UnsupportedOperationException();
}
 
Example #13
Source File: SchemaImpl.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public Map<String,XSModelGroupDecl> getModelGroupDecls() {
    return modelGroupsView;
}
 
Example #14
Source File: BindBlue.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public void modelGroupDecl(XSModelGroupDecl xsModelGroupDecl) {
    // TODO
    throw new UnsupportedOperationException();
}
 
Example #15
Source File: BindRed.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public void modelGroupDecl(XSModelGroupDecl xsModelGroupDecl) {
    throw new IllegalStateException();
}
 
Example #16
Source File: XSFinder.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
/**
 * @see com.sun.xml.internal.xsom.visitor.XSTermFunction#modelGroupDecl(com.sun.xml.internal.xsom.XSModelGroupDecl)
 */
public Boolean modelGroupDecl(XSModelGroupDecl decl) {
    return Boolean.FALSE;
}
 
Example #17
Source File: RawTypeSetBuilder.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public void modelGroupDecl(XSModelGroupDecl decl) {
    modelGroup(decl.getModelGroup());
}
 
Example #18
Source File: BindYellow.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public void modelGroupDecl(XSModelGroupDecl xsModelGroupDecl) {
    throw new IllegalStateException();
}
 
Example #19
Source File: Axis.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public Iterator<XSElementDecl> modelGroupDecl(XSModelGroupDecl decl) {
    return modelGroup(decl.getModelGroup());
}
 
Example #20
Source File: Axis.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public Iterator<XSModelGroup> modelGroupDecl(XSModelGroupDecl decl) {
    return filter(decl.getModelGroup());
}
 
Example #21
Source File: Axis.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public Iterator<XSElementDecl> modelGroupDecl(XSModelGroupDecl decl) {
    return modelGroup(decl.getModelGroup());
}
 
Example #22
Source File: AbstractExtendedComplexTypeBuilder.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
@Override
public NameClass modelGroupDecl(XSModelGroupDecl decl) {
    return modelGroup(decl.getModelGroup());
}
 
Example #23
Source File: SchemaSetImpl.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public XSModelGroupDecl getModelGroupDecl( String ns, String localName ) {
    XSSchema schema = getSchema(ns);
    if(schema==null)    return null;

    return schema.getModelGroupDecl(localName);
}
 
Example #24
Source File: BindYellow.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public void modelGroupDecl(XSModelGroupDecl xsModelGroupDecl) {
    throw new IllegalStateException();
}
 
Example #25
Source File: SchemaImpl.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public void addModelGroupDecl(XSModelGroupDecl newDecl, boolean overwrite) {
    if(overwrite || !modelGroups.containsKey(newDecl.getName()))
        modelGroups.put(newDecl.getName(), newDecl);
}
 
Example #26
Source File: SchemaImpl.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public XSModelGroupDecl getModelGroupDecl(String name) {
    return modelGroups.get(name);
}
 
Example #27
Source File: XSFinder.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * @see com.sun.xml.internal.xsom.visitor.XSTermFunction#modelGroupDecl(com.sun.xml.internal.xsom.XSModelGroupDecl)
 */
public Boolean modelGroupDecl(XSModelGroupDecl decl) {
    return Boolean.FALSE;
}
 
Example #28
Source File: SchemaImpl.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public XSModelGroupDecl getModelGroupDecl(String name) {
    return modelGroups.get(name);
}
 
Example #29
Source File: RefererFinder.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public void modelGroupDecl(XSModelGroupDecl decl) {
    if(!visited.add(decl))  return;

    modelGroup(decl.getModelGroup());
}
 
Example #30
Source File: RawTypeSetBuilder.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public void modelGroupDecl(XSModelGroupDecl decl) {
    modelGroup(decl.getModelGroup());
}