本文整理汇总了Java中com.sun.xml.internal.xsom.XSSchema类的典型用法代码示例。如果您正苦于以下问题:Java XSSchema类的具体用法?Java XSSchema怎么用?Java XSSchema使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
XSSchema类属于com.sun.xml.internal.xsom包,在下文中一共展示了XSSchema类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: checkMultipleSchemaBindings
import com.sun.xml.internal.xsom.XSSchema; //导入依赖的package包/类
/** Reports an error if there are more than one jaxb:schemaBindings customization. */
private void checkMultipleSchemaBindings( XSSchema schema ) {
ArrayList<Locator> locations = new ArrayList<Locator>();
BindInfo bi = getBindInfo(schema);
for( BIDeclaration bid : bi ) {
if( bid.getName()==BISchemaBinding.NAME )
locations.add( bid.getLocation() );
}
if(locations.size()<=1) return; // OK
// error
getErrorReporter().error( locations.get(0),
Messages.ERR_MULTIPLE_SCHEMA_BINDINGS,
schema.getTargetNamespace() );
for( int i=1; i<locations.size(); i++ )
getErrorReporter().error( (Locator)locations.get(i),
Messages.ERR_MULTIPLE_SCHEMA_BINDINGS_LOCATION);
}
示例2: iterateElementDecls
import com.sun.xml.internal.xsom.XSSchema; //导入依赖的package包/类
public Iterator<XSElementDecl> iterateElementDecls() {
return new Iterators.Map<XSElementDecl,XSSchema>(iterateSchema()) {
protected Iterator<XSElementDecl> apply(XSSchema u) {
return u.iterateElementDecls();
}
};
}
示例3: iterateTypes
import com.sun.xml.internal.xsom.XSSchema; //导入依赖的package包/类
public Iterator<XSType> iterateTypes() {
return new Iterators.Map<XSType,XSSchema>(iterateSchema()) {
protected Iterator<XSType> apply(XSSchema u) {
return u.iterateTypes();
}
};
}
示例4: iterateAttributeDecls
import com.sun.xml.internal.xsom.XSSchema; //导入依赖的package包/类
public Iterator<XSAttributeDecl> iterateAttributeDecls() {
return new Iterators.Map<XSAttributeDecl,XSSchema>(iterateSchema()) {
protected Iterator<XSAttributeDecl> apply(XSSchema u) {
return u.iterateAttributeDecls();
}
};
}
示例5: iterateAttGroupDecls
import com.sun.xml.internal.xsom.XSSchema; //导入依赖的package包/类
public Iterator<XSAttGroupDecl> iterateAttGroupDecls() {
return new Iterators.Map<XSAttGroupDecl,XSSchema>(iterateSchema()) {
protected Iterator<XSAttGroupDecl> apply(XSSchema u) {
return u.iterateAttGroupDecls();
}
};
}
示例6: iterateModelGroupDecls
import com.sun.xml.internal.xsom.XSSchema; //导入依赖的package包/类
public Iterator<XSModelGroupDecl> iterateModelGroupDecls() {
return new Iterators.Map<XSModelGroupDecl,XSSchema>(iterateSchema()) {
protected Iterator<XSModelGroupDecl> apply(XSSchema u) {
return u.iterateModelGroupDecls();
}
};
}
示例7: iterateSimpleTypes
import com.sun.xml.internal.xsom.XSSchema; //导入依赖的package包/类
public Iterator<XSSimpleType> iterateSimpleTypes() {
return new Iterators.Map<XSSimpleType,XSSchema>(iterateSchema()) {
protected Iterator<XSSimpleType> apply(XSSchema u) {
return u.iterateSimpleTypes();
}
};
}
示例8: iterateComplexTypes
import com.sun.xml.internal.xsom.XSSchema; //导入依赖的package包/类
public Iterator<XSComplexType> iterateComplexTypes() {
return new Iterators.Map<XSComplexType,XSSchema>(iterateSchema()) {
protected Iterator<XSComplexType> apply(XSSchema u) {
return u.iterateComplexTypes();
}
};
}
示例9: iterateNotations
import com.sun.xml.internal.xsom.XSSchema; //导入依赖的package包/类
public Iterator<XSNotation> iterateNotations() {
return new Iterators.Map<XSNotation,XSSchema>(iterateSchema()) {
protected Iterator<XSNotation> apply(XSSchema u) {
return u.iterateNotations();
}
};
}
示例10: iterateIdentityConstraints
import com.sun.xml.internal.xsom.XSSchema; //导入依赖的package包/类
public Iterator<XSIdentityConstraint> iterateIdentityConstraints() {
return new Iterators.Map<XSIdentityConstraint,XSSchema>(iterateSchema()) {
protected Iterator<XSIdentityConstraint> apply(XSSchema u) {
return u.getIdentityConstraints().values().iterator();
}
};
}
示例11: getElementDecls
import com.sun.xml.internal.xsom.XSSchema; //导入依赖的package包/类
public List<XSElementDecl> getElementDecls() {
ArrayList declList = new ArrayList();
XSSchemaSet schemaSet = getRoot();
for (XSSchema sch : schemaSet.getSchemas()) {
for (XSElementDecl decl : sch.getElementDecls().values()) {
if (decl.getType().equals(this)) {
declList.add(decl);
}
}
}
return declList;
}
示例12: schema
import com.sun.xml.internal.xsom.XSSchema; //导入依赖的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);
}
}
示例13: visit
import com.sun.xml.internal.xsom.XSSchema; //导入依赖的package包/类
public void visit( XSSchemaSet s ) {
Iterator itr = s.iterateSchema();
while(itr.hasNext()) {
schema((XSSchema)itr.next());
println();
}
}
示例14: schema
import com.sun.xml.internal.xsom.XSSchema; //导入依赖的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>");
}
示例15: iterator
import com.sun.xml.internal.xsom.XSSchema; //导入依赖的package包/类
public Iterator<XSSchema> iterator(Iterator<? extends XSComponent> contextNodes) {
if(!contextNodes.hasNext())
return Iterators.empty();
else
// this assumes that all current nodes belong to the same owner.
return iterator(contextNodes.next());
}