当前位置: 首页>>代码示例>>Java>>正文


Java XmlSchemaObjectCollection.getCount方法代码示例

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


在下文中一共展示了XmlSchemaObjectCollection.getCount方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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

示例11: 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

示例12: 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

示例13: 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

示例14: 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

示例15: 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


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