本文整理汇总了Java中com.sun.xml.internal.xsom.XSAttributeUse类的典型用法代码示例。如果您正苦于以下问题:Java XSAttributeUse类的具体用法?Java XSAttributeUse怎么用?Java XSAttributeUse使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
XSAttributeUse类属于com.sun.xml.internal.xsom包,在下文中一共展示了XSAttributeUse类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: attGroupDecl
import com.sun.xml.internal.xsom.XSAttributeUse; //导入依赖的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.XSAttributeUse; //导入依赖的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: attributeUse
import com.sun.xml.internal.xsom.XSAttributeUse; //导入依赖的package包/类
public void attributeUse( XSAttributeUse use ) {
XSAttributeDecl decl = use.getDecl();
String additionalAtts="";
if(use.isRequired())
additionalAtts += " use=\"required\"";
if(use.getFixedValue()!=null && use.getDecl().getFixedValue()==null)
additionalAtts += " fixed=\""+use.getFixedValue()+'\"';
if(use.getDefaultValue()!=null && use.getDecl().getDefaultValue()==null)
additionalAtts += " default=\""+use.getDefaultValue()+'\"';
if(decl.isLocal()) {
// this is anonymous attribute use
dump(decl,additionalAtts);
} else {
// reference to a global one
println(MessageFormat.format("<attribute ref=\"'{'{0}'}'{1}{2}\"/>",
decl.getTargetNamespace(), decl.getName(), additionalAtts));
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:22,代码来源:SchemaWriter.java
示例4: getAttributeUse
import com.sun.xml.internal.xsom.XSAttributeUse; //导入依赖的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
示例5: iterateAttributeUses
import com.sun.xml.internal.xsom.XSAttributeUse; //导入依赖的package包/类
public Iterator<XSAttributeUse> iterateAttributeUses() {
XSComplexType baseType = getBaseType().asComplexType();
if( baseType==null ) return super.iterateAttributeUses();
return new Iterators.Union<XSAttributeUse>(
new Iterators.Filter<XSAttributeUse>(baseType.iterateAttributeUses()) {
protected boolean matches(XSAttributeUse value) {
XSAttributeDecl u = value.getDecl();
UName n = new UName(u.getTargetNamespace(),u.getName());
return !prohibitedAtts.contains(n);
}
},
super.iterateAttributeUses() );
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:ComplexTypeImpl.java
示例6: createAttributeProperty
import com.sun.xml.internal.xsom.XSAttributeUse; //导入依赖的package包/类
public CAttributePropertyInfo createAttributeProperty( XSAttributeUse use, TypeUse tu ) {
boolean forConstant =
getCustomization(use).isConstantProperty() &&
use.getFixedValue()!=null;
String name = getPropertyName(forConstant);
if(name==null) {
NameConverter conv = getBuilder().getNameConverter();
if(forConstant)
name = conv.toConstantName(use.getDecl().getName());
else
name = conv.toPropertyName(use.getDecl().getName());
if(tu.isCollection() && getBuilder().getGlobalBinding().isSimpleMode())
name = JJavaName.getPluralForm(name);
}
markAsAcknowledged();
constantPropertyErrorCheck();
return wrapUp(new CAttributePropertyInfo(name,use,getCustomizations(use),use.getLocator(),
BGMBuilder.getName(use.getDecl()), tu,
BGMBuilder.getName(use.getDecl().getType()), use.isRequired() ),use);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:25,代码来源:BIProperty.java
注:本文中的com.sun.xml.internal.xsom.XSAttributeUse类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论