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

The following examples show how to use com.sun.xml.internal.xsom.XSContentType. 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: MultiWildcardComplexTypeBuilder.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public void build(XSComplexType ct) {
    XSContentType contentType = ct.getContentType();

    builder.recordBindingMode(ct, FALLBACK_CONTENT);
    BIProperty prop = BIProperty.getCustomization(ct);

    CPropertyInfo p;

    if(contentType.asEmpty()!=null) {
        p = prop.createValueProperty("Content",false,ct,CBuiltinLeafInfo.STRING,null);
    } else {
        RawTypeSet ts = RawTypeSetBuilder.build(contentType.asParticle(),false);
        p = prop.createReferenceProperty("Content", false, ct, ts, true, false, true, false);
    }

    selector.getCurrentBean().addProperty(p);

    // adds attributes and we are through.
    green.attContainer(ct);
}
 
Example #2
Source File: AbstractMappingImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
private boolean containingChoice(CClassInfo typeBean) {
    XSComponent component = typeBean.getSchemaComponent();
    if (component instanceof XSComplexType) {
        XSContentType contentType = ((XSComplexType) component).getContentType();
        XSParticle particle = contentType.asParticle();
        if (particle != null) {
            XSTerm term = particle.getTerm();
            XSModelGroup modelGroup = term.asModelGroup();
            if (modelGroup != null) {
                return (modelGroup.getCompositor() == XSModelGroup.Compositor.CHOICE);
            }
        }
    }

    return false;
}
 
Example #3
Source File: AbstractMappingImpl.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
private boolean containingChoice(CClassInfo typeBean) {
    XSComponent component = typeBean.getSchemaComponent();
    if (component instanceof XSComplexType) {
        XSContentType contentType = ((XSComplexType) component).getContentType();
        XSParticle particle = contentType.asParticle();
        if (particle != null) {
            XSTerm term = particle.getTerm();
            XSModelGroup modelGroup = term.asModelGroup();
            if (modelGroup != null) {
                return (modelGroup.getCompositor() == XSModelGroup.Compositor.CHOICE);
            }
        }
    }

    return false;
}
 
Example #4
Source File: MultiWildcardComplexTypeBuilder.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
public void build(XSComplexType ct) {
    XSContentType contentType = ct.getContentType();

    builder.recordBindingMode(ct, FALLBACK_CONTENT);
    BIProperty prop = BIProperty.getCustomization(ct);

    CPropertyInfo p;

    if(contentType.asEmpty()!=null) {
        p = prop.createValueProperty("Content",false,ct,CBuiltinLeafInfo.STRING,null);
    } else {
        RawTypeSet ts = RawTypeSetBuilder.build(contentType.asParticle(),false);
        p = prop.createReferenceProperty("Content", false, ct, ts, true, false, true, false);
    }

    selector.getCurrentBean().addProperty(p);

    // adds attributes and we are through.
    green.attContainer(ct);
}
 
Example #5
Source File: MultiWildcardComplexTypeBuilder.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public void build(XSComplexType ct) {
    XSContentType contentType = ct.getContentType();

    builder.recordBindingMode(ct, FALLBACK_CONTENT);
    BIProperty prop = BIProperty.getCustomization(ct);

    CPropertyInfo p;

    if(contentType.asEmpty()!=null) {
        p = prop.createValueProperty("Content",false,ct,CBuiltinLeafInfo.STRING,null);
    } else {
        RawTypeSet ts = RawTypeSetBuilder.build(contentType.asParticle(),false);
        p = prop.createReferenceProperty("Content", false, ct, ts, true, false, true, false);
    }

    selector.getCurrentBean().addProperty(p);

    // adds attributes and we are through.
    green.attContainer(ct);
}
 
Example #6
Source File: MultiWildcardComplexTypeBuilder.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public void build(XSComplexType ct) {
    XSContentType contentType = ct.getContentType();

    builder.recordBindingMode(ct, FALLBACK_CONTENT);
    BIProperty prop = BIProperty.getCustomization(ct);

    CPropertyInfo p;

    if(contentType.asEmpty()!=null) {
        p = prop.createValueProperty("Content",false,ct,CBuiltinLeafInfo.STRING,null);
    } else {
        RawTypeSet ts = RawTypeSetBuilder.build(contentType.asParticle(),false);
        p = prop.createReferenceProperty("Content", false, ct, ts, true, false, true, false);
    }

    selector.getCurrentBean().addProperty(p);

    // adds attributes and we are through.
    green.attContainer(ct);
}
 
Example #7
Source File: AbstractMappingImpl.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
private boolean containingChoice(CClassInfo typeBean) {
    XSComponent component = typeBean.getSchemaComponent();
    if (component instanceof XSComplexType) {
        XSContentType contentType = ((XSComplexType) component).getContentType();
        XSParticle particle = contentType.asParticle();
        if (particle != null) {
            XSTerm term = particle.getTerm();
            XSModelGroup modelGroup = term.asModelGroup();
            if (modelGroup != null) {
                return (modelGroup.getCompositor() == XSModelGroup.Compositor.CHOICE);
            }
        }
    }

    return false;
}
 
Example #8
Source File: BaseContentRef.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public XSContentType getContentType() {
    XSType t = baseType.getType();
    if(t.asComplexType()!=null)
        return t.asComplexType().getContentType();
    else
        return t.asSimpleType();
}
 
Example #9
Source File: BaseContentRef.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public XSContentType getContentType() {
    XSType t = baseType.getType();
    if(t.asComplexType()!=null)
        return t.asComplexType().getContentType();
    else
        return t.asSimpleType();
}
 
Example #10
Source File: AbstractExtendedComplexTypeBuilder.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Gets a {@link NameClass} that represents all the terms in the given content type.
 * If t is not a particle, just return an empty name class.
 */
private NameClass getNameClass(XSContentType t) {
    if(t==null) return NameClass.NULL;
    XSParticle p = t.asParticle();
    if(p==null) return NameClass.NULL;
    else        return p.getTerm().apply(contentModelNameClassBuilder);
}
 
Example #11
Source File: BaseContentRef.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public XSContentType getContentType() {
    XSType t = baseType.getType();
    if(t.asComplexType()!=null)
        return t.asComplexType().getContentType();
    else
        return t.asSimpleType();
}
 
Example #12
Source File: AbstractExtendedComplexTypeBuilder.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Gets a {@link NameClass} that represents all the terms in the given content type.
 * If t is not a particle, just return an empty name class.
 */
private NameClass getNameClass(XSContentType t) {
    if(t==null) return NameClass.NULL;
    XSParticle p = t.asParticle();
    if(p==null) return NameClass.NULL;
    else        return p.getTerm().apply(contentModelNameClassBuilder);
}
 
Example #13
Source File: AbstractExtendedComplexTypeBuilder.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Gets a {@link NameClass} that represents all the terms in the given content type.
 * If t is not a particle, just return an empty name class.
 */
private NameClass getNameClass(XSContentType t) {
    if(t==null) return NameClass.NULL;
    XSParticle p = t.asParticle();
    if(p==null) return NameClass.NULL;
    else        return p.getTerm().apply(contentModelNameClassBuilder);
}
 
Example #14
Source File: AbstractExtendedComplexTypeBuilder.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Gets a {@link NameClass} that represents all the terms in the given content type.
 * If t is not a particle, just return an empty name class.
 */
private NameClass getNameClass(XSContentType t) {
    if(t==null) return NameClass.NULL;
    XSParticle p = t.asParticle();
    if(p==null) return NameClass.NULL;
    else        return p.getTerm().apply(contentModelNameClassBuilder);
}
 
Example #15
Source File: AbstractExtendedComplexTypeBuilder.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Gets a {@link NameClass} that represents all the terms in the given content type.
 * If t is not a particle, just return an empty name class.
 */
private NameClass getNameClass(XSContentType t) {
    if(t==null) return NameClass.NULL;
    XSParticle p = t.asParticle();
    if(p==null) return NameClass.NULL;
    else        return p.getTerm().apply(contentModelNameClassBuilder);
}
 
Example #16
Source File: AbstractExtendedComplexTypeBuilder.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Gets a {@link NameClass} that represents all the terms in the given content type.
 * If t is not a particle, just return an empty name class.
 */
private NameClass getNameClass(XSContentType t) {
    if(t==null) return NameClass.NULL;
    XSParticle p = t.asParticle();
    if(p==null) return NameClass.NULL;
    else        return p.getTerm().apply(contentModelNameClassBuilder);
}
 
Example #17
Source File: BindRed.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public void empty(XSContentType xsContentType) {
    throw new IllegalStateException();
}
 
Example #18
Source File: BindBlue.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public void empty(XSContentType xsContentType) {
    // TODO
    throw new UnsupportedOperationException();
}
 
Example #19
Source File: SchemaTreeTraverser.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public void empty(XSContentType t) {
}
 
Example #20
Source File: BindYellow.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public void empty(XSContentType xsContentType) {
    throw new IllegalStateException();
}
 
Example #21
Source File: SchemaTreeTraverser.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public void empty(XSContentType t) {
}
 
Example #22
Source File: BindYellow.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public void empty(XSContentType xsContentType) {
    throw new IllegalStateException();
}
 
Example #23
Source File: BindRed.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public void empty(XSContentType xsContentType) {
    throw new IllegalStateException();
}
 
Example #24
Source File: ComplexTypeImpl.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public void setExplicitContent( XSContentType v ) {
    this.explicitContent = v;
}
 
Example #25
Source File: ClassBinderFilter.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public CElement empty(XSContentType xsContentType) {
    return core.empty(xsContentType);
}
 
Example #26
Source File: SchemaTreeTraverser.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public void empty(XSContentType t) {
}
 
Example #27
Source File: ComplexTypeImpl.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public void setExplicitContent( XSContentType v ) {
    this.explicitContent = v;
}
 
Example #28
Source File: BindRed.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public void empty(XSContentType xsContentType) {
    throw new IllegalStateException();
}
 
Example #29
Source File: BindPurple.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public void empty(XSContentType ct) {
    // empty generates nothing
}
 
Example #30
Source File: BindYellow.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public void empty(XSContentType xsContentType) {
    throw new IllegalStateException();
}