com.sun.org.apache.xerces.internal.xs.XSAttributeDeclaration Java Examples

The following examples show how to use com.sun.org.apache.xerces.internal.xs.XSAttributeDeclaration. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: XSDHandler.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
private void expandRelatedComponents(XSObject component, Vector componentList, Map<String, Vector> 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;
    }
}
 
Example #2
Source File: XSDHandler.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
private void expandRelatedComponents(XSObject component, Vector componentList, Map<String, Vector> 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;
    }
}
 
Example #3
Source File: XSDHandler.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
private void expandRelatedComponents(XSObject component, Vector componentList, Map<String, Vector> 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;
    }
}
 
Example #4
Source File: XSDHandler.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
private void expandRelatedComponents(XSObject component, Vector componentList, Map<String, Vector> 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;
    }
}
 
Example #5
Source File: XSDHandler.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
private void expandRelatedComponents(XSObject component, Vector componentList, Map<String, Vector> 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;
    }
}
 
Example #6
Source File: XSDHandler.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
private void expandRelatedComponents(XSObject component, Vector componentList, Map<String, Vector> 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;
    }
}
 
Example #7
Source File: XSDHandler.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
private void expandRelatedComponents(XSObject component, Vector componentList, Map<String, Vector> 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;
    }
}
 
Example #8
Source File: XSDHandler.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
private void expandRelatedComponents(XSObject component, Vector componentList, Map<String, Vector> 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;
    }
}
 
Example #9
Source File: XSDHandler.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private void expandRelatedAttributeComponents(XSAttributeDeclaration decl, Vector componentList, String namespace, Map<String, Vector> dependencies) {
    addRelatedType(decl.getTypeDefinition(), componentList, namespace, dependencies);

    /*final XSComplexTypeDefinition enclosingType = decl.getEnclosingCTDefinition();
    if (enclosingType != null) {
        addRelatedType(enclosingType, componentList, namespace, dependencies);
    }*/
}
 
Example #10
Source File: XSModelImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Convenience method. Returns a top-level attribute declaration.
 * @param name The name of the declaration.
 * @param namespace The namespace of the definition, otherwise null.
 * @return A top-level attribute declaration or null if such declaration
 *   does not exist.
 */
public XSAttributeDeclaration getAttributeDeclaration(String name,
                                               String namespace) {
    SchemaGrammar sg = (SchemaGrammar)fGrammarMap.get(null2EmptyString(namespace));
    if (sg == null) {
        return null;
    }
    return (XSAttributeDeclaration)sg.fGlobalAttrDecls.get(name);
}
 
Example #11
Source File: XSDHandler.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private void expandRelatedAttributeComponents(XSAttributeDeclaration decl, Vector componentList, String namespace, Map<String, Vector> dependencies) {
    addRelatedType(decl.getTypeDefinition(), componentList, namespace, dependencies);

    /*final XSComplexTypeDefinition enclosingType = decl.getEnclosingCTDefinition();
    if (enclosingType != null) {
        addRelatedType(enclosingType, componentList, namespace, dependencies);
    }*/
}
 
Example #12
Source File: XSModelImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Convenience method. Returns a top-level attribute declaration.
 * @param name The name of the declaration.
 * @param namespace The namespace of the definition, otherwise null.
 * @return A top-level attribute declaration or null if such declaration
 *   does not exist.
 */
public XSAttributeDeclaration getAttributeDeclaration(String name,
                                               String namespace) {
    SchemaGrammar sg = (SchemaGrammar)fGrammarMap.get(null2EmptyString(namespace));
    if (sg == null) {
        return null;
    }
    return (XSAttributeDeclaration)sg.fGlobalAttrDecls.get(name);
}
 
Example #13
Source File: XSDHandler.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private void expandRelatedAttributeComponents(XSAttributeDeclaration decl, Vector componentList, String namespace, Map<String, Vector> dependencies) {
    addRelatedType(decl.getTypeDefinition(), componentList, namespace, dependencies);

    /*final XSComplexTypeDefinition enclosingType = decl.getEnclosingCTDefinition();
    if (enclosingType != null) {
        addRelatedType(enclosingType, componentList, namespace, dependencies);
    }*/
}
 
Example #14
Source File: XSModelImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Convenience method. Returns a top-level attribute declaration.
 * @param name The name of the declaration.
 * @param namespace The namespace of the definition, otherwise null.
 * @param loc The schema location where the component was defined
 * @return A top-level attribute declaration or null if such declaration
 *   does not exist.
 */
public XSAttributeDeclaration getAttributeDeclaration(String name,
                                               String namespace,
                                               String loc) {
    SchemaGrammar sg = (SchemaGrammar)fGrammarMap.get(null2EmptyString(namespace));
    if (sg == null) {
        return null;
    }
    return sg.getGlobalAttributeDecl(name, loc);
}
 
Example #15
Source File: XSModelImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Convenience method. Returns a top-level attribute declaration.
 * @param name The name of the declaration.
 * @param namespace The namespace of the definition, otherwise null.
 * @param loc The schema location where the component was defined
 * @return A top-level attribute declaration or null if such declaration
 *   does not exist.
 */
public XSAttributeDeclaration getAttributeDeclaration(String name,
                                               String namespace,
                                               String loc) {
    SchemaGrammar sg = (SchemaGrammar)fGrammarMap.get(null2EmptyString(namespace));
    if (sg == null) {
        return null;
    }
    return sg.getGlobalAttributeDecl(name, loc);
}
 
Example #16
Source File: XSModelImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Convenience method. Returns a top-level attribute declaration.
 * @param name The name of the declaration.
 * @param namespace The namespace of the definition, otherwise null.
 * @return A top-level attribute declaration or null if such declaration
 *   does not exist.
 */
public XSAttributeDeclaration getAttributeDeclaration(String name,
                                               String namespace) {
    SchemaGrammar sg = (SchemaGrammar)fGrammarMap.get(null2EmptyString(namespace));
    if (sg == null) {
        return null;
    }
    return (XSAttributeDeclaration)sg.fGlobalAttrDecls.get(name);
}
 
Example #17
Source File: XSDHandler.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private void addRelatedAttribute(XSAttributeDeclaration decl, Vector componentList, String namespace, Map<String, Vector> 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 {
        expandRelatedAttributeComponents(decl, componentList, namespace, dependencies);
    }
}
 
Example #18
Source File: XSModelImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Convenience method. Returns a top-level attribute declaration.
 * @param name The name of the declaration.
 * @param namespace The namespace of the definition, otherwise null.
 * @param loc The schema location where the component was defined
 * @return A top-level attribute declaration or null if such declaration
 *   does not exist.
 */
public XSAttributeDeclaration getAttributeDeclaration(String name,
                                               String namespace,
                                               String loc) {
    SchemaGrammar sg = (SchemaGrammar)fGrammarMap.get(null2EmptyString(namespace));
    if (sg == null) {
        return null;
    }
    return sg.getGlobalAttributeDecl(name, loc);
}
 
Example #19
Source File: XSDHandler.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private void addRelatedAttribute(XSAttributeDeclaration decl, Vector componentList, String namespace, Map<String, Vector> 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 {
        expandRelatedAttributeComponents(decl, componentList, namespace, dependencies);
    }
}
 
Example #20
Source File: XSModelImpl.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * Convenience method. Returns a top-level attribute declaration.
 * @param name The name of the declaration.
 * @param namespace The namespace of the definition, otherwise null.
 * @param loc The schema location where the component was defined
 * @return A top-level attribute declaration or null if such declaration
 *   does not exist.
 */
public XSAttributeDeclaration getAttributeDeclaration(String name,
                                               String namespace,
                                               String loc) {
    SchemaGrammar sg = (SchemaGrammar)fGrammarMap.get(null2EmptyString(namespace));
    if (sg == null) {
        return null;
    }
    return sg.getGlobalAttributeDecl(name, loc);
}
 
Example #21
Source File: XSModelImpl.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * Convenience method. Returns a top-level attribute declaration.
 * @param name The name of the declaration.
 * @param namespace The namespace of the definition, otherwise null.
 * @return A top-level attribute declaration or null if such declaration
 *   does not exist.
 */
public XSAttributeDeclaration getAttributeDeclaration(String name,
                                               String namespace) {
    SchemaGrammar sg = (SchemaGrammar)fGrammarMap.get(null2EmptyString(namespace));
    if (sg == null) {
        return null;
    }
    return (XSAttributeDeclaration)sg.fGlobalAttrDecls.get(name);
}
 
Example #22
Source File: XSDHandler.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private void addRelatedAttribute(XSAttributeDeclaration decl, Vector componentList, String namespace, Map<String, Vector> 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 {
        expandRelatedAttributeComponents(decl, componentList, namespace, dependencies);
    }
}
 
Example #23
Source File: XSModelImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Convenience method. Returns a top-level attribute declaration.
 * @param name The name of the declaration.
 * @param namespace The namespace of the definition, otherwise null.
 * @param loc The schema location where the component was defined
 * @return A top-level attribute declaration or null if such declaration
 *   does not exist.
 */
public XSAttributeDeclaration getAttributeDeclaration(String name,
                                               String namespace,
                                               String loc) {
    SchemaGrammar sg = (SchemaGrammar)fGrammarMap.get(null2EmptyString(namespace));
    if (sg == null) {
        return null;
    }
    return sg.getGlobalAttributeDecl(name, loc);
}
 
Example #24
Source File: XSModelImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Convenience method. Returns a top-level attribute declaration.
 * @param name The name of the declaration.
 * @param namespace The namespace of the definition, otherwise null.
 * @return A top-level attribute declaration or null if such declaration
 *   does not exist.
 */
public XSAttributeDeclaration getAttributeDeclaration(String name,
                                               String namespace) {
    SchemaGrammar sg = (SchemaGrammar)fGrammarMap.get(null2EmptyString(namespace));
    if (sg == null) {
        return null;
    }
    return (XSAttributeDeclaration)sg.fGlobalAttrDecls.get(name);
}
 
Example #25
Source File: XSDHandler.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private void addRelatedAttribute(XSAttributeDeclaration decl, Vector componentList, String namespace, Map<String, Vector> 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 {
        expandRelatedAttributeComponents(decl, componentList, namespace, dependencies);
    }
}
 
Example #26
Source File: XSDHandler.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private void expandRelatedAttributeComponents(XSAttributeDeclaration decl, Vector componentList, String namespace, Map<String, Vector> dependencies) {
    addRelatedType(decl.getTypeDefinition(), componentList, namespace, dependencies);

    /*final XSComplexTypeDefinition enclosingType = decl.getEnclosingCTDefinition();
    if (enclosingType != null) {
        addRelatedType(enclosingType, componentList, namespace, dependencies);
    }*/
}
 
Example #27
Source File: XSModelImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Convenience method. Returns a top-level attribute declaration.
 * @param name The name of the declaration.
 * @param namespace The namespace of the definition, otherwise null.
 * @param loc The schema location where the component was defined
 * @return A top-level attribute declaration or null if such declaration
 *   does not exist.
 */
public XSAttributeDeclaration getAttributeDeclaration(String name,
                                               String namespace,
                                               String loc) {
    SchemaGrammar sg = (SchemaGrammar)fGrammarMap.get(null2EmptyString(namespace));
    if (sg == null) {
        return null;
    }
    return sg.getGlobalAttributeDecl(name, loc);
}
 
Example #28
Source File: XSModelImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Convenience method. Returns a top-level attribute declaration.
 * @param name The name of the declaration.
 * @param namespace The namespace of the definition, otherwise null.
 * @return A top-level attribute declaration or null if such declaration
 *   does not exist.
 */
public XSAttributeDeclaration getAttributeDeclaration(String name,
                                               String namespace) {
    SchemaGrammar sg = (SchemaGrammar)fGrammarMap.get(null2EmptyString(namespace));
    if (sg == null) {
        return null;
    }
    return (XSAttributeDeclaration)sg.fGlobalAttrDecls.get(name);
}
 
Example #29
Source File: XSDHandler.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private void addRelatedAttribute(XSAttributeDeclaration decl, Vector componentList, String namespace, Map<String, Vector> 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 {
        expandRelatedAttributeComponents(decl, componentList, namespace, dependencies);
    }
}
 
Example #30
Source File: XSDHandler.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private void expandRelatedAttributeComponents(XSAttributeDeclaration decl, Vector componentList, String namespace, Map<String, Vector> dependencies) {
    addRelatedType(decl.getTypeDefinition(), componentList, namespace, dependencies);

    /*final XSComplexTypeDefinition enclosingType = decl.getEnclosingCTDefinition();
    if (enclosingType != null) {
        addRelatedType(enclosingType, componentList, namespace, dependencies);
    }*/
}