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

Java XmlSchemaObjectCollection类代码示例

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

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



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

示例1: walkSimpleTypeRestriction

import org.apache.ws.commons.schema.XmlSchemaObjectCollection; //导入依赖的package包/类
protected void walkSimpleTypeRestriction(XmlSchema xmlSchema, XmlSchemaSimpleTypeRestriction obj) {
	walkAnnotated(xmlSchema, obj);
	QName qname = obj.getBaseTypeName();
	if ((qname != null) && (deep)) {
		walkByTypeName(xmlSchema, qname);
	} else {
		XmlSchemaSimpleType type = obj.getBaseType();
		if (type != null) {
			walkSimpleType(xmlSchema, type);
		}
	}
	
	XmlSchemaObjectCollection facets = obj.getFacets();
       for (int i = 0; i < facets.getCount(); i++) {
       	XmlSchemaFacet facet = (XmlSchemaFacet) facets.getItem(i);
       	walkFacet(xmlSchema, facet);
       }
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:19,代码来源:XmlSchemaWalker.java


示例2: walkChoice

import org.apache.ws.commons.schema.XmlSchemaObjectCollection; //导入依赖的package包/类
protected void walkChoice(XmlSchema xmlSchema, XmlSchemaChoice obj) {
	walkAnnotated(xmlSchema, obj);
       XmlSchemaObjectCollection children = obj.getItems();
       for (int i = 0; i < children.getCount(); i++) {
           XmlSchemaObject child = children.getItem(i);
           if (child instanceof XmlSchemaElement) {
           	walkElement(xmlSchema, (XmlSchemaElement)child);
           } else if (child instanceof XmlSchemaGroupRef) {
           	walkGroupRef(xmlSchema, (XmlSchemaGroupRef)child);
           } else if (child instanceof XmlSchemaChoice) {
           	walkChoice(xmlSchema, (XmlSchemaChoice)child);
           } else if (child instanceof XmlSchemaSequence) {
           	walkSequence(xmlSchema, (XmlSchemaSequence)child);
           } else if (child instanceof XmlSchemaAny) {
           	walkAny(xmlSchema, (XmlSchemaAny)child);
           }
       }
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:19,代码来源:XmlSchemaWalker.java


示例3: walkSequence

import org.apache.ws.commons.schema.XmlSchemaObjectCollection; //导入依赖的package包/类
protected void walkSequence(XmlSchema xmlSchema, XmlSchemaSequence obj) {
	walkAnnotated(xmlSchema, obj);
       XmlSchemaObjectCollection children = obj.getItems();
       for (int i = 0; i < children.getCount(); i++) {
           XmlSchemaObject child = children.getItem(i);
           if (child instanceof XmlSchemaElement) {
           	walkElement(xmlSchema, (XmlSchemaElement)child);
           } else if (child instanceof XmlSchemaGroupRef) {
           	walkGroupRef(xmlSchema, (XmlSchemaGroupRef)child);
           } else if (child instanceof XmlSchemaChoice) {
           	walkChoice(xmlSchema, (XmlSchemaChoice)child);
           } else if (child instanceof XmlSchemaSequence) {
           	walkSequence(xmlSchema, (XmlSchemaSequence)child);
           } else if (child instanceof XmlSchemaAny) {
           	walkAny(xmlSchema, (XmlSchemaAny)child);
           }
       }
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:19,代码来源:XmlSchemaWalker.java


示例4: walkSimpleContentExtension

import org.apache.ws.commons.schema.XmlSchemaObjectCollection; //导入依赖的package包/类
protected void walkSimpleContentExtension(XmlSchema xmlSchema, XmlSchemaSimpleContentExtension obj) {
	walkAnnotated(xmlSchema, obj);
	QName baseTypeName = obj.getBaseTypeName();
	if ((baseTypeName != null) && deep) {
		walkByTypeName(xmlSchema, baseTypeName);
	}
	
	XmlSchemaObjectCollection attributes = obj.getAttributes();
       for (int i = 0; i < attributes.getCount(); i++) {
           XmlSchemaObject attribute = attributes.getItem(i);
           if (attribute instanceof XmlSchemaAttribute) {
           	walkAttribute(xmlSchema, (XmlSchemaAttribute)attribute);
           } else if (attribute instanceof XmlSchemaAttributeGroupRef) {
           	walkAttributeGroupRef(xmlSchema, (XmlSchemaAttributeGroupRef)attribute);
           }
       }
	XmlSchemaAnyAttribute xmlSchemaAnyAttribute = obj.getAnyAttribute();
	if (xmlSchemaAnyAttribute != null) {
		walkAnyAttribute(xmlSchema, xmlSchemaAnyAttribute);
	}
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:22,代码来源:XmlSchemaWalker.java


示例5: walkAttributeGroup

import org.apache.ws.commons.schema.XmlSchemaObjectCollection; //导入依赖的package包/类
protected void walkAttributeGroup(XmlSchema xmlSchema, XmlSchemaAttributeGroup obj) {
	walkAnnotated(xmlSchema, obj);
	XmlSchemaObjectCollection  attributes = obj.getAttributes();
       for (int i = 0; i < attributes.getCount(); i++) {
           XmlSchemaObject attribute = attributes.getItem(i);
           if (attribute instanceof XmlSchemaAttribute) {
           	walkAttribute(xmlSchema, (XmlSchemaAttribute)attribute);
           } else if (attribute instanceof XmlSchemaAttributeGroupRef) {
           	walkAttributeGroupRef(xmlSchema, (XmlSchemaAttributeGroupRef)attribute);
           }
       }
       XmlSchemaAnyAttribute xmlSchemaAnyAttribute = obj.getAnyAttribute();
       if (xmlSchemaAnyAttribute != null) {
       	walkAnyAttribute(xmlSchema, xmlSchemaAnyAttribute);
       }
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:17,代码来源:XmlSchemaWalker.java


示例6: cacheComplexTypes

import org.apache.ws.commons.schema.XmlSchemaObjectCollection; //导入依赖的package包/类
/**
 * extract all complex types from a schema and cache into a map
 */
private void cacheComplexTypes(XmlSchema schema) {
    XmlSchemaObjectCollection schemaItems = schema.getItems();

    int numElements = schemaItems.getCount();

    // Iterate XML Schema items
    for (int i = 0; i < numElements; i++) {
        XmlSchemaObject schemaObject = schemaItems.getItem(i);
        if (schemaObject instanceof XmlSchemaComplexType) {
            XmlSchemaComplexType complexType = (XmlSchemaComplexType) schemaObject;
            String elementTypeName = complexType.getName();
            complexTypes.put(elementTypeName, complexType);
        }
    }
}
 
开发者ID:inbloom,项目名称:secure-data-service,代码行数:19,代码来源:DidSchemaParser.java


示例7: parseFields

import org.apache.ws.commons.schema.XmlSchemaObjectCollection; //导入依赖的package包/类
private static final List<Attribute> parseFields(final XmlSchemaComplexType schemaComplexType,
        final XmlSchema schema, final Xsd2UmlConfig context) {
    final List<Attribute> attributes = new LinkedList<Attribute>();
    
    final XmlSchemaObjectCollection schemaItems = schemaComplexType.getAttributes();
    for (int i = 0, count = schemaItems.getCount(); i < count; i++) {
        final XmlSchemaObject schemaObject = schemaItems.getItem(i);
        if (schemaObject instanceof XmlSchemaAttribute) {
            final XmlSchemaAttribute schemaAttribute = (XmlSchemaAttribute) schemaObject;
            attributes.add(parseAttribute(schemaAttribute, schema, context));
            
        } else {
            throw new AssertionError(schemaObject);
        }
    }
    // parseAttributes(schemaComplexType.getAttributes(), schema);
    attributes.addAll(parseParticle(schemaComplexType.getParticle(), schema, context));
    
    return Collections.unmodifiableList(attributes);
}
 
开发者ID:inbloom,项目名称:secure-data-service,代码行数:21,代码来源:Xsd2UmlConvert.java


示例8: loadSchema

import org.apache.ws.commons.schema.XmlSchemaObjectCollection; //导入依赖的package包/类
void loadSchema(XmlSchema schema) {
    XmlSchemaObjectCollection schemaItems = schema.getItems();

    // Iterate XML Schema items
    for (int i = 0; i < schemaItems.getCount(); i++) {
        XmlSchemaObject schemaObject = schemaItems.getItem(i);

        NeutralSchema neutralSchema;
        if (schemaObject instanceof XmlSchemaType) {
            neutralSchema = parse((XmlSchemaType) schemaObject, schema);
        } else if (schemaObject instanceof XmlSchemaElement) {
            neutralSchema = parseElement((XmlSchemaElement) schemaObject, schema);
        } else if (schemaObject instanceof XmlSchemaInclude) {
            continue; // nothing to do for includes
        } else {
            throw new RuntimeException("Unhandled XmlSchemaObject: " + schemaObject.getClass().getCanonicalName());
        }
        schemas.put(neutralSchema.getType(), neutralSchema);
        partialSchemas.clear();
    }
}
 
开发者ID:inbloom,项目名称:secure-data-service,代码行数:22,代码来源:XsdToNeutralSchemaRepo.java


示例9: getTypesListFromXsd

import org.apache.ws.commons.schema.XmlSchemaObjectCollection; //导入依赖的package包/类
private ArrayList<String> getTypesListFromXsd() {
	ArrayList<String> types = new ArrayList<String>();
	try {
		String tns = transaction.getProject().getTargetNamespace();
		String projectName = transaction.getProject().getName();
		XmlSchema schema = Engine.theApp.schemaManager.getSchemaForProject(projectName);
		QName responseTypeQName = new QName(tns, transaction.getXsdResponseTypeName());
		XmlSchemaComplexType xmlSchemaType = (XmlSchemaComplexType) schema.getTypeByName(responseTypeQName);
		XmlSchemaParticle xmlSchemaParticle = xmlSchemaType.getParticle();
		if (xmlSchemaParticle != null && xmlSchemaParticle instanceof XmlSchemaSequence) {
			XmlSchemaObjectCollection xmlSchemaObjectCollection = ((XmlSchemaSequence)xmlSchemaParticle).getItems();
			for (int i=0;i<xmlSchemaObjectCollection.getCount();i++) {
				XmlSchemaObject xso = xmlSchemaObjectCollection.getItem(i);
				if (xso instanceof XmlSchemaElement) {
					XmlSchemaElement xmlSchemaElement = (XmlSchemaElement)xso;
					String elName = xmlSchemaElement.getName();
					QName elType = xmlSchemaElement.getSchemaTypeName();
					String value = "<xsd:element name=\""+elName+"\" type=\""+elType.getPrefix()+":"+elType.getLocalPart()+"\"/>";
					types.add(value);
				}
			}
		}
	}
	catch (Exception e) {
	}
	return types;
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:28,代码来源:TransactionXSDTypesDialogComposite.java


示例10: attributesToSortedSet

import org.apache.ws.commons.schema.XmlSchemaObjectCollection; //导入依赖的package包/类
public static SortedSet<XmlSchemaAttribute> attributesToSortedSet(XmlSchemaObjectCollection attrs) {
	SortedSet<XmlSchemaAttribute> result = new TreeSet<XmlSchemaAttribute>(XmlSchemaUtils.attributeNameComparator);
	for (Iterator<XmlSchemaAttribute> i = GenericUtils.cast(attrs.getIterator()); i.hasNext();) {
		result.add(i.next());
	}
	return result;
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:8,代码来源:XmlSchemaUtils.java


示例11: remove

import org.apache.ws.commons.schema.XmlSchemaObjectCollection; //导入依赖的package包/类
public static void remove(XmlSchemaObjectCollection xmlSchemaObjectCollection, XmlSchemaObject xmlSchemaObject) {
	Iterator<XmlSchemaObject> it = GenericUtils.cast(xmlSchemaObjectCollection.getIterator());
	while (it.hasNext()) {
		XmlSchemaObject ob = it.next();
		if (ob.hashCode() == (xmlSchemaObject.hashCode())) {
			it.remove();
			return;
		}
	}
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:11,代码来源:XmlSchemaUtils.java


示例12: indexOf

import org.apache.ws.commons.schema.XmlSchemaObjectCollection; //导入依赖的package包/类
public static int indexOf(XmlSchemaObjectCollection xmlSchemaObjectCollection, XmlSchemaObject xmlSchemaObject) {
	Iterator<XmlSchemaObject> it = GenericUtils.cast(xmlSchemaObjectCollection.getIterator());
	int i = 0;
	while (it.hasNext()) {
		XmlSchemaObject ob = it.next();
		if (ob.hashCode() == (xmlSchemaObject.hashCode())) {
			return i;
		}
		i++;
	}
	return -1;
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:13,代码来源:XmlSchemaUtils.java


示例13: walkComplexType

import org.apache.ws.commons.schema.XmlSchemaObjectCollection; //导入依赖的package包/类
protected void walkComplexType(XmlSchema xmlSchema, XmlSchemaComplexType obj) {
	walkAnnotated(xmlSchema, obj);
	XmlSchemaObjectCollection attributes = obj.getAttributes();
       for (int i = 0; i < attributes.getCount(); i++) {
           XmlSchemaObject attribute = attributes.getItem(i);
           if (attribute instanceof XmlSchemaAttribute) {
           	walkAttribute(xmlSchema, (XmlSchemaAttribute) attribute);
           } else if (attribute instanceof XmlSchemaAttributeGroupRef) {
           	walkAttributeGroupRef(xmlSchema, (XmlSchemaAttributeGroupRef) attribute);
           }
       }
	XmlSchemaContentModel xmlSchemaContentModel  = obj.getContentModel();
	XmlSchemaParticle xmlSchemaParticle = obj.getParticle();
	if (xmlSchemaContentModel != null) {
        if (xmlSchemaContentModel instanceof XmlSchemaSimpleContent) {
        	walkSimpleContent(xmlSchema, (XmlSchemaSimpleContent)xmlSchemaContentModel);
        } else if (xmlSchemaContentModel instanceof XmlSchemaComplexContent) {
        	walkComplexContent(xmlSchema, (XmlSchemaComplexContent)xmlSchemaContentModel);
        }
	} else if (xmlSchemaParticle != null) {
        if (xmlSchemaParticle instanceof XmlSchemaSequence) {
        	walkSequence(xmlSchema, (XmlSchemaSequence)xmlSchemaParticle);
        } else if (xmlSchemaParticle instanceof XmlSchemaChoice) {
        	walkChoice(xmlSchema, (XmlSchemaChoice)xmlSchemaParticle);
        } else if (xmlSchemaParticle instanceof XmlSchemaAll) {
        	walkAll(xmlSchema, (XmlSchemaAll)xmlSchemaParticle);
        } else if (xmlSchemaParticle instanceof XmlSchemaGroupRef) {
        	walkGroupRef(xmlSchema, (XmlSchemaGroupRef)xmlSchemaParticle);
        }
	}
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:32,代码来源:XmlSchemaWalker.java


示例14: walkAll

import org.apache.ws.commons.schema.XmlSchemaObjectCollection; //导入依赖的package包/类
protected void walkAll(XmlSchema xmlSchema, XmlSchemaAll obj) {
	walkAnnotated(xmlSchema, obj);
       XmlSchemaObjectCollection children = obj.getItems();
       for (int i = 0; i < children.getCount(); i++) {
           XmlSchemaObject child = children.getItem(i);
           if (child instanceof XmlSchemaElement) {
           	walkElement(xmlSchema, (XmlSchemaElement)child);
           }
       }
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:11,代码来源:XmlSchemaWalker.java


示例15: walkAnnotation

import org.apache.ws.commons.schema.XmlSchemaObjectCollection; //导入依赖的package包/类
protected void walkAnnotation(XmlSchema xmlSchema, XmlSchemaAnnotation obj) {
       XmlSchemaObjectCollection contents = obj.getItems();
       for (int i = 0; i < contents.getCount(); i++) {
           XmlSchemaObject item = contents.getItem(i);
           if (item instanceof XmlSchemaAppInfo) {
           	walkAppInfo(xmlSchema, (XmlSchemaAppInfo)item);
           } else if (item instanceof XmlSchemaDocumentation) {
           	walkDocumentation(xmlSchema, (XmlSchemaDocumentation)item);
           }
       }
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:12,代码来源:XmlSchemaWalker.java


示例16: walkSimpleContentRestriction

import org.apache.ws.commons.schema.XmlSchemaObjectCollection; //导入依赖的package包/类
protected void walkSimpleContentRestriction(XmlSchema xmlSchema, XmlSchemaSimpleContentRestriction obj) {
	walkAnnotated(xmlSchema, obj);
	QName baseTypeName = obj.getBaseTypeName();
	if ((baseTypeName != null) && deep) {
		walkByTypeName(xmlSchema, baseTypeName);
	}
	
	XmlSchemaObjectCollection attributes = obj.getAttributes();
       for (int i = 0; i < attributes.getCount(); i++) {
           XmlSchemaObject attribute = attributes.getItem(i);
           if (attribute instanceof XmlSchemaAttribute) {
           	walkAttribute(xmlSchema, (XmlSchemaAttribute)attribute);
           } else if (attribute instanceof XmlSchemaAttributeGroupRef) {
           	walkAttributeGroupRef(xmlSchema, (XmlSchemaAttributeGroupRef)attribute);
           }
       }
	XmlSchemaSimpleType xmlSchemaSimpleType = obj.getBaseType();
	if (xmlSchemaSimpleType != null) {
		walkSimpleType(xmlSchema, xmlSchemaSimpleType);
	}
	XmlSchemaAnyAttribute xmlSchemaAnyAttribute = obj.getAnyAttribute();
	if (xmlSchemaAnyAttribute != null) {
		walkAnyAttribute(xmlSchema, xmlSchemaAnyAttribute);
	}
       XmlSchemaObjectCollection facets = obj.getFacets();
       for (int i = 0; i < facets.getCount(); i++) {
       	XmlSchemaObject facet = facets.getItem(i);
       	walkFacet(xmlSchema, (XmlSchemaFacet)facet);
       }
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:31,代码来源:XmlSchemaWalker.java


示例17: walkComplexContentExtension

import org.apache.ws.commons.schema.XmlSchemaObjectCollection; //导入依赖的package包/类
protected void walkComplexContentExtension(XmlSchema xmlSchema, XmlSchemaComplexContentExtension obj) {
	walkAnnotated(xmlSchema, obj);
	QName baseTypeName = obj.getBaseTypeName();
	if ((baseTypeName != null) && deep) {
		walkByTypeName(xmlSchema, baseTypeName);
	}
	
	XmlSchemaParticle xmlSchemaParticle = obj.getParticle();
	if (xmlSchemaParticle != null) {
        if (xmlSchemaParticle instanceof XmlSchemaSequence) {
        	walkSequence(xmlSchema, (XmlSchemaSequence)xmlSchemaParticle);
        } else if (xmlSchemaParticle instanceof XmlSchemaChoice) {
        	walkChoice(xmlSchema, (XmlSchemaChoice)xmlSchemaParticle);
        } else if (xmlSchemaParticle instanceof XmlSchemaAll) {
        	walkAll(xmlSchema, (XmlSchemaAll)xmlSchemaParticle);
        } else if (xmlSchemaParticle instanceof XmlSchemaGroupRef) {
        	walkGroupRef(xmlSchema, (XmlSchemaGroupRef)xmlSchemaParticle);
        }
	}
	
	XmlSchemaObjectCollection attributes = obj.getAttributes();
       for (int i = 0; i < attributes.getCount(); i++) {
           XmlSchemaObject attribute = attributes.getItem(i);
           if (attribute instanceof XmlSchemaAttribute) {
           	walkAttribute(xmlSchema, (XmlSchemaAttribute)attribute);
           } else if (attribute instanceof XmlSchemaAttributeGroupRef) {
           	walkAttributeGroupRef(xmlSchema, (XmlSchemaAttributeGroupRef)attribute);
           }
       }
	XmlSchemaAnyAttribute xmlSchemaAnyAttribute = obj.getAnyAttribute();
	if (xmlSchemaAnyAttribute != null) {
		walkAnyAttribute(xmlSchema, xmlSchemaAnyAttribute);
	}
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:35,代码来源:XmlSchemaWalker.java


示例18: walkComplexContentRestriction

import org.apache.ws.commons.schema.XmlSchemaObjectCollection; //导入依赖的package包/类
protected void walkComplexContentRestriction(XmlSchema xmlSchema, XmlSchemaComplexContentRestriction obj) {
	walkAnnotated(xmlSchema, obj);
	QName baseTypeName = obj.getBaseTypeName();
	if ((baseTypeName != null) && deep) {
		walkByTypeName(xmlSchema, baseTypeName);
	}
	
	XmlSchemaParticle xmlSchemaParticle = obj.getParticle();
	if (xmlSchemaParticle != null) {
        if (xmlSchemaParticle instanceof XmlSchemaSequence) {
        	walkSequence(xmlSchema, (XmlSchemaSequence)xmlSchemaParticle);
        } else if (xmlSchemaParticle instanceof XmlSchemaChoice) {
        	walkChoice(xmlSchema, (XmlSchemaChoice)xmlSchemaParticle);
        } else if (xmlSchemaParticle instanceof XmlSchemaAll) {
        	walkAll(xmlSchema, (XmlSchemaAll)xmlSchemaParticle);
        } else if (xmlSchemaParticle instanceof XmlSchemaGroupRef) {
        	walkGroupRef(xmlSchema, (XmlSchemaGroupRef)xmlSchemaParticle);
        }
	}
	
	XmlSchemaObjectCollection attributes = obj.getAttributes();
       for (int i = 0; i < attributes.getCount(); i++) {
           XmlSchemaObject attribute = attributes.getItem(i);
           if (attribute instanceof XmlSchemaAttribute) {
           	walkAttribute(xmlSchema, (XmlSchemaAttribute)attribute);
           } else if (attribute instanceof XmlSchemaAttributeGroupRef) {
           	walkAttributeGroupRef(xmlSchema, (XmlSchemaAttributeGroupRef)attribute);
           }
       }
	XmlSchemaAnyAttribute xmlSchemaAnyAttribute = obj.getAnyAttribute();
	if (xmlSchemaAnyAttribute != null) {
		walkAnyAttribute(xmlSchema, xmlSchemaAnyAttribute);
	}
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:35,代码来源:XmlSchemaWalker.java


示例19: walkRedefine

import org.apache.ws.commons.schema.XmlSchemaObjectCollection; //导入依赖的package包/类
protected void walkRedefine(XmlSchema xmlSchema, XmlSchemaRedefine obj) {
	walkAnnotated(xmlSchema, obj);
	XmlSchemaObjectCollection items = obj.getItems();
       for (int i = 0; i < items.getCount(); i++) {
           XmlSchemaObject item = items.getItem(i);
           if (item instanceof XmlSchemaSimpleType) {
           	walkSimpleType(xmlSchema, (XmlSchemaSimpleType)item);
           } else if (item instanceof XmlSchemaComplexType) {
           	walkComplexType(xmlSchema, (XmlSchemaComplexType)item);
           } else if (item instanceof XmlSchemaGroupRef) {
           	walkGroupRef(xmlSchema, (XmlSchemaGroupRef)item);
           } else if (item instanceof XmlSchemaGroup) {
           	walkGroup(xmlSchema, (XmlSchemaGroup)item);
           } else if (item instanceof XmlSchemaAttributeGroup) {
           	walkAttributeGroup(xmlSchema, (XmlSchemaAttributeGroup)item);
           } else if (item instanceof XmlSchemaAttributeGroupRef) {
           	walkAttributeGroupRef(xmlSchema, (XmlSchemaAttributeGroupRef)item);
           }
       }
}
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:21,代码来源:XmlSchemaWalker.java


示例20: updateSchemaInternalsAndAssociations

import org.apache.ws.commons.schema.XmlSchemaObjectCollection; //导入依赖的package包/类
/**
 * Update the schema's internal import location according to the new registry URLs.
 * Furthermore, fill the associations arraylist according to the detectored associations.
 */
private void updateSchemaInternalsAndAssociations() throws RegistryException {
    for (SchemaInfo schemaInfo: schemas.values()) {
        XmlSchema schema = schemaInfo.getSchema();
        XmlSchemaObjectCollection includes = schema.getIncludes();
        if (includes != null) {
            for (Iterator iter = includes.getIterator(); iter.hasNext();) {
                Object externalComponent = iter.next();
                if (externalComponent instanceof XmlSchemaExternal) {
                    XmlSchemaExternal xmlSchemaExternal = (XmlSchemaExternal)externalComponent;
                    XmlSchema schema1 = xmlSchemaExternal.getSchema();
                    if (schema1 != null) {
                        String sourceURI = getAbsoluteSchemaURL(schema1.getSourceURI());
                        if (schemas.containsKey(sourceURI)) {
                            SchemaInfo info = schemas.get(sourceURI);
                            String relativeSchemaPath = WSDLUtil.computeRelativePathWithVersion(schemaInfo.getProposedRegistryURL(), info.getProposedRegistryURL(), registry);
                            xmlSchemaExternal.setSchemaLocation(relativeSchemaPath);
                        }
                    }
                }
            }
        }

        // creating associations
        for(String associatedTo : schemaInfo.getSchemaDependencies()) {
            SchemaInfo schemaInfoAssociated = schemas.get(associatedTo);
            if (schemaInfoAssociated != null) {
                associations.add(new Association(schemaInfo.getProposedRegistryURL(),
                        schemaInfoAssociated.getProposedRegistryURL(),
                        CommonConstants.DEPENDS));
                associations.add(new Association(schemaInfoAssociated.getProposedRegistryURL(),
                        schemaInfo.getProposedRegistryURL(),
                        CommonConstants.USED_BY));
            }
        }
    }
}
 
开发者ID:wso2,项目名称:carbon-registry,代码行数:41,代码来源:SchemaProcessor.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java NativeModuleCallExceptionHandler类代码示例发布时间:2022-05-23
下一篇:
Java Email类代码示例发布时间: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