• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java XSModelGroup类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.sun.xml.internal.xsom.XSModelGroup的典型用法代码示例。如果您正苦于以下问题:Java XSModelGroup类的具体用法?Java XSModelGroup怎么用?Java XSModelGroup使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



XSModelGroup类属于com.sun.xml.internal.xsom包,在下文中一共展示了XSModelGroup类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: containingChoice

import com.sun.xml.internal.xsom.XSModelGroup; //导入依赖的package包/类
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;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:AbstractMappingImpl.java


示例2: isApplicable

import com.sun.xml.internal.xsom.XSModelGroup; //导入依赖的package包/类
public boolean isApplicable(XSComplexType ct) {
    if( !bgmBuilder.getGlobalBinding().isChoiceContentPropertyEnabled() )
        return false;

    if( ct.getBaseType()!=schemas.getAnyType() )
        // My reading of the spec is that if a complex type is
        // derived from another complex type by extension,
        // its top level model group is always a sequence
        // that combines the base type content model and
        // the extension defined in the new complex type.
        return false;

    XSParticle p = ct.getContentType().asParticle();
    if(p==null)
        return false;

    XSModelGroup mg = getTopLevelModelGroup(p);

    if( mg.getCompositor()!=XSModelGroup.CHOICE )
        return false;

    if( p.isRepeated() )
        return false;

    return true;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:27,代码来源:ChoiceContentComplexTypeBuilder.java


示例3: modelGroup

import com.sun.xml.internal.xsom.XSModelGroup; //导入依赖的package包/类
public Multiplicity modelGroup(XSModelGroup group) {
    boolean isChoice = group.getCompositor() == XSModelGroup.CHOICE;

    Multiplicity r = ZERO;

    for( XSParticle p : group.getChildren()) {
        Multiplicity m = particle(p);

        if(r==null) {
            r=m;
            continue;
        }
        if(isChoice) {
            r = Multiplicity.choice(r,m);
        } else {
            r = Multiplicity.group(r,m);
        }
    }
    return r;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:MultiplicityCounter.java


示例4: modelGroup

import com.sun.xml.internal.xsom.XSModelGroup; //导入依赖的package包/类
/**
 * 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();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:SchemaTreeTraverser.java


示例5: modelGroup

import com.sun.xml.internal.xsom.XSModelGroup; //导入依赖的package包/类
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()));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:SchemaWriter.java


示例6: modelGroup

import com.sun.xml.internal.xsom.XSModelGroup; //导入依赖的package包/类
public Iterator<T> modelGroup(XSModelGroup group) {
    // compensate for particles that are ignored in SCD
    return new Iterators.Map<T,XSParticle>(group.iterator()) {
        protected Iterator<? extends T> apply(XSParticle p) {
            return particle(p);
        }
    };
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:AbstractAxisImpl.java


示例7: descendants

import com.sun.xml.internal.xsom.XSModelGroup; //导入依赖的package包/类
/**
 * Iterate all descendant model groups of the given model group, including itself.
 */
private Iterator<XSComponent> descendants(XSModelGroup mg) {
    // TODO: write a tree iterator
    // for now, we do it eagerly because I'm lazy
    List<XSComponent> r = new ArrayList<XSComponent>();
    visit(mg,r);
    return r.iterator();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:Axis.java


示例8: visit

import com.sun.xml.internal.xsom.XSModelGroup; //导入依赖的package包/类
private void visit(XSModelGroup mg, List<XSComponent> r) {
    // since model groups never form a cycle, no cycle check is needed
    r.add(mg);
    for (XSParticle p : mg) {
        XSModelGroup child = p.getTerm().asModelGroup();
        if(child!=null)
            visit(child,r);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:Axis.java


示例9: filter

import com.sun.xml.internal.xsom.XSModelGroup; //导入依赖的package包/类
private Iterator<XSModelGroup> filter(XSModelGroup mg) {
    if(mg==null)
        return empty();
    if(mg.getCompositor() == compositor || compositor == null)
        return singleton(mg);
    else
        return empty();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:Axis.java


示例10: mangleClassName

import com.sun.xml.internal.xsom.XSModelGroup; //导入依赖的package包/类
/**
 * 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;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:24,代码来源:BISchemaBinding.java


示例11: modelGroup

import com.sun.xml.internal.xsom.XSModelGroup; //导入依赖的package包/类
public void modelGroup(XSModelGroup mg) {
    // choice gets mapped to a property
    if(mg.getCompositor()== XSModelGroup.Compositor.CHOICE && builder.getGlobalBinding().isChoiceContentPropertyEnabled()) {
        mark(outerParticle);
        return;
    }

    for( XSParticle child : mg.getChildren() )
        particle(child);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:DefaultParticleBinder.java


示例12: modelGroup

import com.sun.xml.internal.xsom.XSModelGroup; //导入依赖的package包/类
public void modelGroup(XSModelGroup group) {
    if(!visited.add(group))  return;

    for (XSParticle p : group.getChildren()) {
        particle(p);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:RefererFinder.java



注:本文中的com.sun.xml.internal.xsom.XSModelGroup类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ValidationManager类代码示例发布时间:2022-05-23
下一篇:
Java RecordSet类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap