本文整理汇总了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;未经允许,请勿转载。 |
请发表评论