本文整理汇总了Java中mf.org.apache.xerces.xs.XSElementDeclaration类的典型用法代码示例。如果您正苦于以下问题:Java XSElementDeclaration类的具体用法?Java XSElementDeclaration怎么用?Java XSElementDeclaration使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
XSElementDeclaration类属于mf.org.apache.xerces.xs包,在下文中一共展示了XSElementDeclaration类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: expandRelatedComponents
import mf.org.apache.xerces.xs.XSElementDeclaration; //导入依赖的package包/类
private void expandRelatedComponents(XSObject component, Vector componentList, Hashtable dependencies) {
short componentType = component.getType();
switch (componentType) {
case XSConstants.TYPE_DEFINITION :
expandRelatedTypeComponents((XSTypeDefinition) component, componentList, component.getNamespace(), dependencies);
break;
case XSConstants.ATTRIBUTE_DECLARATION :
expandRelatedAttributeComponents((XSAttributeDeclaration) component, componentList, component.getNamespace(), dependencies);
break;
case XSConstants.ATTRIBUTE_GROUP :
expandRelatedAttributeGroupComponents((XSAttributeGroupDefinition) component, componentList, component.getNamespace(), dependencies);
case XSConstants.ELEMENT_DECLARATION :
expandRelatedElementComponents((XSElementDeclaration) component, componentList, component.getNamespace(), dependencies);
break;
case XSConstants.MODEL_GROUP_DEFINITION :
expandRelatedModelGroupDefinitionComponents((XSModelGroupDefinition) component, componentList, component.getNamespace(), dependencies);
case XSConstants.ATTRIBUTE_USE :
//expandRelatedAttributeUseComponents((XSAttributeUse)component, componentList, dependencies);
case XSConstants.NOTATION_DECLARATION :
case XSConstants.IDENTITY_CONSTRAINT :
default :
break;
}
}
示例2: buildSubGroups_Org
import mf.org.apache.xerces.xs.XSElementDeclaration; //导入依赖的package包/类
private SymbolHash buildSubGroups_Org() {
SubstitutionGroupHandler sgHandler = new SubstitutionGroupHandler(null);
for (int i = 0 ; i < fGrammarCount; i++) {
sgHandler.addSubstitutionGroup(fGrammarList[i].getSubstitutionGroups());
}
final XSNamedMap elements = getComponents(XSConstants.ELEMENT_DECLARATION);
final int len = elements.getLength();
final SymbolHash subGroupMap = new SymbolHash(len*2);
XSElementDecl head;
XSElementDeclaration[] subGroup;
for (int i = 0; i < len; i++) {
head = (XSElementDecl)elements.item(i);
subGroup = sgHandler.getSubstitutionGroup(head);
subGroupMap.put(head, subGroup.length > 0 ?
new XSObjectListImpl(subGroup, subGroup.length) : XSObjectListImpl.EMPTY_LIST);
}
return subGroupMap;
}
示例3: buildSubGroups
import mf.org.apache.xerces.xs.XSElementDeclaration; //导入依赖的package包/类
private SymbolHash buildSubGroups() {
SubstitutionGroupHandler sgHandler = new SubstitutionGroupHandler(null);
for (int i = 0 ; i < fGrammarCount; i++) {
sgHandler.addSubstitutionGroup(fGrammarList[i].getSubstitutionGroups());
}
final XSObjectListImpl elements = getGlobalElements();
final int len = elements.getLength();
final SymbolHash subGroupMap = new SymbolHash(len*2);
XSElementDecl head;
XSElementDeclaration[] subGroup;
for (int i = 0; i < len; i++) {
head = (XSElementDecl)elements.item(i);
subGroup = sgHandler.getSubstitutionGroup(head);
subGroupMap.put(head, subGroup.length > 0 ?
new XSObjectListImpl(subGroup, subGroup.length) : XSObjectListImpl.EMPTY_LIST);
}
return subGroupMap;
}
示例4: expandRelatedElementComponents
import mf.org.apache.xerces.xs.XSElementDeclaration; //导入依赖的package包/类
private void expandRelatedElementComponents(XSElementDeclaration decl, Vector componentList, String namespace, Hashtable dependencies) {
addRelatedType(decl.getTypeDefinition(), componentList, namespace, dependencies);
/*final XSTypeDefinition enclosingType = decl.getEnclosingCTDefinition();
if (enclosingType != null) {
addRelatedType(enclosingType, componentList, namespace, dependencies);
}*/
final XSElementDeclaration subElemDecl = decl.getSubstitutionGroupAffiliation();
if (subElemDecl != null) {
addRelatedElement(subElemDecl, componentList, namespace, dependencies);
}
}
示例5: expandRelatedParticleComponents
import mf.org.apache.xerces.xs.XSElementDeclaration; //导入依赖的package包/类
private void expandRelatedParticleComponents(XSParticle component, Vector componentList,
String namespace, Hashtable dependencies) {
XSTerm term = component.getTerm();
switch (term.getType()) {
case XSConstants.ELEMENT_DECLARATION :
addRelatedElement((XSElementDeclaration) term, componentList, namespace, dependencies);
break;
case XSConstants.MODEL_GROUP :
expandRelatedModelGroupComponents((XSModelGroup) term, componentList, namespace, dependencies);
break;
default:
break;
}
}
示例6: addRelatedElement
import mf.org.apache.xerces.xs.XSElementDeclaration; //导入依赖的package包/类
private void addRelatedElement(XSElementDeclaration decl, Vector componentList, String namespace, Hashtable dependencies) {
if (decl.getScope() == XSConstants.SCOPE_GLOBAL) {
if (!componentList.contains(decl)) {
Vector importedNamespaces = findDependentNamespaces(namespace, dependencies);
addNamespaceDependency(namespace, decl.getNamespace(), importedNamespaces);
componentList.add(decl);
}
}
else {
expandRelatedElementComponents(decl, componentList, namespace, dependencies);
}
}
示例7: getElementDeclaration
import mf.org.apache.xerces.xs.XSElementDeclaration; //导入依赖的package包/类
/**
* Convenience method. Returns a top-level element declaration.
* @param name The name of the declaration.
* @param namespace The namespace of the definition, otherwise null.
* @return A top-level element declaration or null if such declaration
* does not exist.
*/
public XSElementDeclaration getElementDeclaration(String name,
String namespace) {
SchemaGrammar sg = (SchemaGrammar)fGrammarMap.get(null2EmptyString(namespace));
if (sg == null) {
return null;
}
return (XSElementDeclaration)sg.fGlobalElemDecls.get(name);
}
示例8: map
import mf.org.apache.xerces.xs.XSElementDeclaration; //导入依赖的package包/类
private static SchemaModel map(XSModel xsModel, int maxRecusiveDepth)
{
// get namespaces
StringList namespaces = xsModel.getNamespaces();
List<String> namesspaceList = new ArrayList<String>();
for (int i = 0; i < namespaces.getLength(); i++)
{
namesspaceList.add(namespaces.item(i));
}
// get top-level complex elements
XSNamedMap elements = xsModel.getComponents(XSConstants.ELEMENT_DECLARATION);
List<SchemaElementComplex> components = new ArrayList<SchemaElementComplex>();
for (int i = 0; i < elements.getLength(); i++)
{
XSObject object = elements.item(i);
if (!(object instanceof XSElementDeclaration))
{
continue;
}
XSElementDeclaration decl = (XSElementDeclaration) elements.item(i);
if (!isComplexTypeCategory(decl.getTypeDefinition().getTypeCategory()))
{
continue;
}
XSComplexTypeDefinition complexActualElement = (XSComplexTypeDefinition) decl.getTypeDefinition();
String name = object.getName();
String namespace = object.getNamespace();
Stack<NamespaceNamePair> nameNamespaceStack = new Stack<NamespaceNamePair>();
NamespaceNamePair nameNamespace = new NamespaceNamePair(namespace, name);
nameNamespaceStack.add(nameNamespace);
if (log.isDebugEnabled())
{
log.debug("Processing component " + namespace + " " + name);
}
SchemaElementComplex complexElement = process(name, namespace, complexActualElement, false, nameNamespaceStack, maxRecusiveDepth);
if (log.isDebugEnabled())
{
log.debug("Adding component " + namespace + " " + name);
}
components.add(complexElement);
}
return new SchemaModel(components, namesspaceList);
}
示例9: getElementDeclaration
import mf.org.apache.xerces.xs.XSElementDeclaration; //导入依赖的package包/类
/**
* An item isomorphic to the element declaration used to validate
* this element.
*
* @return an element declaration
*/
public XSElementDeclaration getElementDeclaration() {
return fDeclaration;
}
示例10: getElementDeclaration
import mf.org.apache.xerces.xs.XSElementDeclaration; //导入依赖的package包/类
/**
* Convenience method. Returns a top-level element declaration.
* @param name The name of the declaration.
* @return A top-level element declaration or null if such declaration
* does not exist.
*/
public XSElementDeclaration getElementDeclaration(String name) {
return getGlobalElementDecl(name);
}
示例11: getSubstitutionGroup
import mf.org.apache.xerces.xs.XSElementDeclaration; //导入依赖的package包/类
/**
* Convenience method. Returns a list containing the members of the
* substitution group for the given <code>XSElementDeclaration</code>
* or an empty <code>XSObjectList</code> if the substitution group
* contains no members.
* @param head The substitution group head.
* @return A list containing the members of the substitution group
* for the given <code>XSElementDeclaration</code> or an empty
* <code>XSObjectList</code> if the substitution group contains
* no members.
*/
public XSObjectList getSubstitutionGroup(XSElementDeclaration head) {
return (XSObjectList)fSubGroupMap.get(head);
}
示例12: getSubstitutionGroupAffiliation
import mf.org.apache.xerces.xs.XSElementDeclaration; //导入依赖的package包/类
/**
* {substitution group affiliation} Optional. A top-level element
* definition.
*/
public XSElementDeclaration getSubstitutionGroupAffiliation() {
return fSubGroup;
}