本文整理汇总了Java中com.sun.xml.internal.xsom.XSAttGroupDecl类的典型用法代码示例。如果您正苦于以下问题:Java XSAttGroupDecl类的具体用法?Java XSAttGroupDecl怎么用?Java XSAttGroupDecl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
XSAttGroupDecl类属于com.sun.xml.internal.xsom包,在下文中一共展示了XSAttGroupDecl类的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: attGroupDecl
import com.sun.xml.internal.xsom.XSAttGroupDecl; //导入依赖的package包/类
public void attGroupDecl(XSAttGroupDecl decl) {
SchemaTreeNode newNode = new SchemaTreeNode("Attribute group \""
+ decl.getName() + "\"", decl.getLocator());
this.currNode.add(newNode);
this.currNode = newNode;
Iterator itr;
itr = decl.iterateAttGroups();
while (itr.hasNext()) {
dumpRef((XSAttGroupDecl) itr.next());
}
itr = decl.iterateDeclaredAttributeUses();
while (itr.hasNext()) {
attributeUse((XSAttributeUse) itr.next());
}
this.currNode = (SchemaTreeNode) this.currNode.getParent();
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:SchemaTreeTraverser.java
示例2: attGroupDecl
import com.sun.xml.internal.xsom.XSAttGroupDecl; //导入依赖的package包/类
public void attGroupDecl( XSAttGroupDecl decl ) {
Iterator itr;
println(MessageFormat.format("<attGroup name=\"{0}\">", decl.getName()));
indent++;
// TODO: wildcard
itr = decl.iterateAttGroups();
while(itr.hasNext())
dumpRef( (XSAttGroupDecl)itr.next() );
itr = decl.iterateDeclaredAttributeUses();
while(itr.hasNext())
attributeUse( (XSAttributeUse)itr.next() );
indent--;
println("</attGroup>");
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:SchemaWriter.java
示例3: getAttributeUse
import com.sun.xml.internal.xsom.XSAttGroupDecl; //导入依赖的package包/类
public XSAttributeUse getAttributeUse( String nsURI, String localName ) {
UName name = new UName(nsURI,localName);
if(prohibitedAtts.contains(name)) return null;
XSAttributeUse o = attributes.get(name);
if(o==null) {
Iterator itr = iterateAttGroups();
while(itr.hasNext() && o==null)
o = ((XSAttGroupDecl)itr.next()).getAttributeUse(nsURI,localName);
}
if(o==null) {
XSType base = getBaseType();
if(base.asComplexType()!=null)
o = base.asComplexType().getAttributeUse(nsURI,localName);
}
return o;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:23,代码来源:ComplexTypeImpl.java
示例4: iterateAttGroupDecls
import com.sun.xml.internal.xsom.XSAttGroupDecl; //导入依赖的package包/类
public Iterator<XSAttGroupDecl> iterateAttGroupDecls() {
return new Iterators.Map<XSAttGroupDecl,XSSchema>(iterateSchema()) {
protected Iterator<XSAttGroupDecl> apply(XSSchema u) {
return u.iterateAttGroupDecls();
}
};
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:SchemaSetImpl.java
示例5: getAttributeUses
import com.sun.xml.internal.xsom.XSAttGroupDecl; //导入依赖的package包/类
/**
* Returns the attribute uses by looking at attribute groups and etc.
* Searching for the base type is done in {@link ComplexTypeImpl}.
*/
public Collection<XSAttributeUse> getAttributeUses() {
// TODO: this is fairly inefficient
List<XSAttributeUse> v = new ArrayList<XSAttributeUse>();
v.addAll(attributes.values());
for( XSAttGroupDecl agd : getAttGroups() )
v.addAll(agd.getAttributeUses());
return v;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:AttributesHolder.java
示例6: iterateAttGroups
import com.sun.xml.internal.xsom.XSAttGroupDecl; //导入依赖的package包/类
public Iterator<XSAttGroupDecl> iterateAttGroups() {
return new Iterators.Adapter<XSAttGroupDecl,Ref.AttGroup>(attGroups.iterator()) {
protected XSAttGroupDecl filter(AttGroup u) {
return u.get();
}
};
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:AttributesHolder.java
示例7: getAttGroups
import com.sun.xml.internal.xsom.XSAttGroupDecl; //导入依赖的package包/类
public Set<XSAttGroupDecl> getAttGroups() {
return new AbstractSet<XSAttGroupDecl>() {
public Iterator<XSAttGroupDecl> iterator() {
return iterateAttGroups();
}
public int size() {
return attGroups.size();
}
};
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:AttributesHolder.java
示例8: getAttributeUse
import com.sun.xml.internal.xsom.XSAttGroupDecl; //导入依赖的package包/类
public XSAttributeUse getAttributeUse( String nsURI, String localName ) {
UName name = new UName(nsURI,localName);
XSAttributeUse o=null;
Iterator itr = iterateAttGroups();
while(itr.hasNext() && o==null)
o = ((XSAttGroupDecl)itr.next()).getAttributeUse(nsURI,localName);
if(o==null) o = attributes.get(name);
return o;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:AttGroupDeclImpl.java
示例9: schema
import com.sun.xml.internal.xsom.XSAttGroupDecl; //导入依赖的package包/类
public void schema(XSSchema s) {
// QUICK HACK: don't print the built-in components
if (s.getTargetNamespace().equals(Const.schemaNamespace)) {
return;
}
SchemaTreeNode newNode = new SchemaTreeNode("Schema "
+ s.getLocator().getSystemId(), s.getLocator());
this.currNode = newNode;
this.model.addSchemaNode(newNode);
for (XSAttGroupDecl groupDecl : s.getAttGroupDecls().values()) {
attGroupDecl(groupDecl);
}
for (XSAttributeDecl attrDecl : s.getAttributeDecls().values()) {
attributeDecl(attrDecl);
}
for (XSComplexType complexType : s.getComplexTypes().values()) {
complexType(complexType);
}
for (XSElementDecl elementDecl : s.getElementDecls().values()) {
elementDecl(elementDecl);
}
for (XSModelGroupDecl modelGroupDecl : s.getModelGroupDecls().values()) {
modelGroupDecl(modelGroupDecl);
}
for (XSSimpleType simpleType : s.getSimpleTypes().values()) {
simpleType(simpleType);
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:36,代码来源:SchemaTreeTraverser.java
示例10: dumpRef
import com.sun.xml.internal.xsom.XSAttGroupDecl; //导入依赖的package包/类
/**
* Creates node of attribute group decalration reference.
*
* @param decl Attribute group decalration reference.
*/
public void dumpRef(XSAttGroupDecl decl) {
SchemaTreeNode newNode = new SchemaTreeNode("Attribute group ref \"{"
+ decl.getTargetNamespace() + "}" + decl.getName() + "\"", decl
.getLocator());
this.currNode.add(newNode);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:SchemaTreeTraverser.java
示例11: dumpComplexTypeAttribute
import com.sun.xml.internal.xsom.XSAttGroupDecl; //导入依赖的package包/类
/**
* Creates node for complex type.
*
* @param type Complex type.
*/
private void dumpComplexTypeAttribute(XSComplexType type) {
Iterator itr;
itr = type.iterateAttGroups();
while (itr.hasNext()) {
dumpRef((XSAttGroupDecl) itr.next());
}
itr = type.iterateDeclaredAttributeUses();
while (itr.hasNext()) {
attributeUse((XSAttributeUse) itr.next());
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:19,代码来源:SchemaTreeTraverser.java
示例12: schema
import com.sun.xml.internal.xsom.XSAttGroupDecl; //导入依赖的package包/类
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>");
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:39,代码来源:SchemaWriter.java
示例13: dumpComplexTypeAttribute
import com.sun.xml.internal.xsom.XSAttGroupDecl; //导入依赖的package包/类
private void dumpComplexTypeAttribute( XSComplexType type ) {
Iterator itr;
itr = type.iterateAttGroups();
while(itr.hasNext())
dumpRef( (XSAttGroupDecl)itr.next() );
itr = type.iterateDeclaredAttributeUses();
while(itr.hasNext())
attributeUse( (XSAttributeUse)itr.next() );
XSWildcard awc = type.getAttributeWildcard();
if(awc!=null)
wildcard("anyAttribute",awc,"");
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:16,代码来源:SchemaWriter.java
示例14: getAttributeWildcard
import com.sun.xml.internal.xsom.XSAttGroupDecl; //导入依赖的package包/类
public XSWildcard getAttributeWildcard() {
WildcardImpl complete = localAttWildcard;
Iterator itr = iterateAttGroups();
while( itr.hasNext() ) {
WildcardImpl w = (WildcardImpl)((XSAttGroupDecl)itr.next()).getAttributeWildcard();
if(w==null) continue;
if(complete==null)
complete = w;
else
// TODO: the spec says it's intersection,
// but I think it has to be union.
complete = complete.union(ownerDocument,w);
}
if( getDerivationMethod()==RESTRICTION ) return complete;
WildcardImpl base=null;
XSType baseType = getBaseType();
if(baseType.asComplexType()!=null)
base = (WildcardImpl)baseType.asComplexType().getAttributeWildcard();
if(complete==null) return base;
if(base==null) return complete;
return complete.union(ownerDocument,base);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:30,代码来源:ComplexTypeImpl.java
示例15: attContainer
import com.sun.xml.internal.xsom.XSAttGroupDecl; //导入依赖的package包/类
public void attContainer(XSAttContainer cont) {
// inline
Iterator itr = cont.iterateDeclaredAttributeUses();
while(itr.hasNext())
builder.ying((XSAttributeUse)itr.next(),cont);
itr = cont.iterateAttGroups();
while(itr.hasNext())
builder.ying((XSAttGroupDecl)itr.next(),cont);
XSWildcard w = cont.getAttributeWildcard();
if(w!=null)
builder.ying(w,cont);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:BindGreen.java
示例16: attContainer
import com.sun.xml.internal.xsom.XSAttGroupDecl; //导入依赖的package包/类
private void attContainer( XSAttContainer cont ) {
for( Iterator itr = cont.iterateAttGroups(); itr.hasNext(); )
((XSAttGroupDecl)itr.next()).visit(this);
for( Iterator itr = cont.iterateDeclaredAttributeUses(); itr.hasNext(); )
((XSAttributeUse)itr.next()).visit(this);
XSWildcard wc = cont.getAttributeWildcard();
if(wc!=null) wc.visit(this);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:UnusedCustomizationChecker.java
注:本文中的com.sun.xml.internal.xsom.XSAttGroupDecl类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论