Examples of SymbolHash


Examples of com.sun.org.apache.xerces.internal.util.SymbolHash

        fSymbolTable = symbolTable;

        // REVISIT: do we know the numbers of the following global decls
        // when creating this grammar? If so, we can pass the numbers in,
        // and use that number to initialize the following hashtables.
        fGlobalAttrDecls  = new SymbolHash();
        fGlobalAttrGrpDecls = new SymbolHash();
        fGlobalElemDecls = new SymbolHash();
        fGlobalGroupDecls = new SymbolHash();
        fGlobalNotationDecls = new SymbolHash();
        fGlobalIDConstraintDecls = new SymbolHash();

        // Extended tables
        fGlobalAttrDeclsExt  = new SymbolHash();
        fGlobalAttrGrpDeclsExt = new SymbolHash();
        fGlobalElemDeclsExt = new SymbolHash();
        fGlobalGroupDeclsExt = new SymbolHash();
        fGlobalNotationDeclsExt = new SymbolHash();
        fGlobalIDConstraintDeclsExt = new SymbolHash();
        fGlobalTypeDeclsExt = new SymbolHash();

        // All global elements table
        fAllGlobalElemDecls = new SymbolHash();

        // if we are parsing S4S, put built-in types in first
        // they might get overwritten by the types from S4S, but that's
        // considered what the application wants to do.
        if (fTargetNamespace == SchemaSymbols.URI_SCHEMAFORSCHEMA)
            fGlobalTypeDecls = SG_SchemaNS.fGlobalTypeDecls.makeClone();
        else
            fGlobalTypeDecls = new SymbolHash();
    } // <init>(String, XSDDescription)
View Full Code Here

Examples of com.sun.org.apache.xerces.internal.util.SymbolHash

        if (fComponents == null)
            fComponents = new XSNamedMap[MAX_COMP_IDX+1];

        // get the hashtable for this type of components
        if (fComponents[objectType] == null) {
            SymbolHash table = null;
            switch (objectType) {
            case XSConstants.TYPE_DEFINITION:
            case XSTypeDefinition.COMPLEX_TYPE:
            case XSTypeDefinition.SIMPLE_TYPE:
                table = fGlobalTypeDecls;
View Full Code Here

Examples of com.sun.org.apache.xerces.internal.util.SymbolHash

        if (fComponentsExt == null)
            fComponentsExt = new ObjectList[MAX_COMP_IDX+1];

        // get the hashtable for this type of components
        if (fComponentsExt[objectType] == null) {
            SymbolHash table = null;
            switch (objectType) {
            case XSConstants.TYPE_DEFINITION:
            case XSTypeDefinition.COMPLEX_TYPE:
            case XSTypeDefinition.SIMPLE_TYPE:
                table = fGlobalTypeDeclsExt;
                break;
            case XSConstants.ATTRIBUTE_DECLARATION:
                table = fGlobalAttrDeclsExt;
                break;
            case XSConstants.ELEMENT_DECLARATION:
                table = fGlobalElemDeclsExt;
                break;
            case XSConstants.ATTRIBUTE_GROUP:
                table = fGlobalAttrGrpDeclsExt;
                break;
            case XSConstants.MODEL_GROUP_DEFINITION:
                table = fGlobalGroupDeclsExt;
                break;
            case XSConstants.NOTATION_DECLARATION:
                table = fGlobalNotationDeclsExt;
                break;
            }

            Object[] entries = table.getEntries();
            fComponentsExt[objectType] = new ObjectListImpl(entries, entries.length);
        }

        return fComponentsExt[objectType];
    }
View Full Code Here

Examples of com.sun.org.apache.xerces.internal.util.SymbolHash

                fGrammarDescription = new XSDDescription();
                fGrammarDescription.fContextType = XSDDescription.CONTEXT_PREPARSE;
                fGrammarDescription.setNamespace(SchemaSymbols.URI_SCHEMAFORSCHEMA);

                // no global decls other than types
                fGlobalAttrDecls  = new SymbolHash(1);
                fGlobalAttrGrpDecls = new SymbolHash(1);
                fGlobalElemDecls = new SymbolHash(1);
                fGlobalGroupDecls = new SymbolHash(1);
                fGlobalNotationDecls = new SymbolHash(1);
                fGlobalIDConstraintDecls = new SymbolHash(1);

                // no extended global decls
                fGlobalAttrDeclsExt  = new SymbolHash(1);
                fGlobalAttrGrpDeclsExt = new SymbolHash(1);
                fGlobalElemDeclsExt = new SymbolHash(1);
                fGlobalGroupDeclsExt = new SymbolHash(1);
                fGlobalNotationDeclsExt = new SymbolHash(1);
                fGlobalIDConstraintDeclsExt = new SymbolHash(1);
                fGlobalTypeDeclsExt = new SymbolHash(1);

                // all global element decls table
                fAllGlobalElemDecls = new SymbolHash(1);

                // get all built-in types
                fGlobalTypeDecls = schemaFactory.getBuiltInTypes();

                // assign the built-in schema grammar as the XSNamespaceItem
                // for each of the built-in simple type definitions.
                int length = fGlobalTypeDecls.getLength();
                XSTypeDefinition [] typeDefinitions = new XSTypeDefinition[length];
                fGlobalTypeDecls.getValues(typeDefinitions, 0);
                for (int i = 0; i < length; ++i) {
                    XSTypeDefinition xtd = typeDefinitions[i];
                    if (xtd instanceof XSSimpleTypeDecl) {
                        ((XSSimpleTypeDecl) xtd).setNamespaceItem(this);
                    }
                }

                // add anyType
                fGlobalTypeDecls.put(fAnyType.getName(), fAnyType);
            }
            else if (grammar == GRAMMAR_XSI) {
                // target namespace
                fTargetNamespace = SchemaSymbols.URI_XSI;
                // grammar description
                fGrammarDescription = new XSDDescription();
                fGrammarDescription.fContextType = XSDDescription.CONTEXT_PREPARSE;
                fGrammarDescription.setNamespace(SchemaSymbols.URI_XSI);

                // no global decls other than attributes
                fGlobalAttrGrpDecls = new SymbolHash(1);
                fGlobalElemDecls = new SymbolHash(1);
                fGlobalGroupDecls = new SymbolHash(1);
                fGlobalNotationDecls = new SymbolHash(1);
                fGlobalIDConstraintDecls = new SymbolHash(1);
                fGlobalTypeDecls = new SymbolHash(1);

                // no extended global decls
                fGlobalAttrDeclsExt  = new SymbolHash(1);
                fGlobalAttrGrpDeclsExt = new SymbolHash(1);
                fGlobalElemDeclsExt = new SymbolHash(1);
                fGlobalGroupDeclsExt = new SymbolHash(1);
                fGlobalNotationDeclsExt = new SymbolHash(1);
                fGlobalIDConstraintDeclsExt = new SymbolHash(1);
                fGlobalTypeDeclsExt = new SymbolHash(1);

                // no all global element decls
                fAllGlobalElemDecls = new SymbolHash(1);

                // 4 attributes, so initialize the size as 4*2 = 8
                fGlobalAttrDecls  = new SymbolHash(8);
                String name = null;
                String tns = null;
                XSSimpleType type = null;
                short scope = XSConstants.SCOPE_GLOBAL;

View Full Code Here

Examples of com.sun.org.apache.xerces.internal.util.SymbolHash

            fGrammarDescription.fContextType = XSDDescription.CONTEXT_PREPARSE;
            fGrammarDescription.setNamespace(SchemaSymbols.URI_SCHEMAFORSCHEMA);

            // no global decls other than types and
            // element declarations for <annotation>, <documentation> and <appinfo>.
            fGlobalAttrDecls  = new SymbolHash(1);
            fGlobalAttrGrpDecls = new SymbolHash(1);
            fGlobalElemDecls = new SymbolHash(6);
            fGlobalGroupDecls = new SymbolHash(1);
            fGlobalNotationDecls = new SymbolHash(1);
            fGlobalIDConstraintDecls = new SymbolHash(1);

            // no extended global decls
            fGlobalAttrDeclsExt  = new SymbolHash(1);
            fGlobalAttrGrpDeclsExt = new SymbolHash(1);
            fGlobalElemDeclsExt = new SymbolHash(6);
            fGlobalGroupDeclsExt = new SymbolHash(1);
            fGlobalNotationDeclsExt = new SymbolHash(1);
            fGlobalIDConstraintDeclsExt = new SymbolHash(1);
            fGlobalTypeDeclsExt = new SymbolHash(1);

            // all global element declarations
            fAllGlobalElemDecls = new SymbolHash(6);

            // get all built-in types
            fGlobalTypeDecls = SG_SchemaNS.fGlobalTypeDecls;

            // create element declarations for <annotation>, <documentation> and <appinfo>
View Full Code Here

Examples of com.sun.org.apache.xerces.internal.util.SymbolHash

            throw new XNIException(e);
        }

        // is there a DeclHandler?
        if(fDeclHandler != null) {
            fDeclaredAttrs = new SymbolHash();
        }

    } // doctypeDecl(String,String,String)
View Full Code Here

Examples of com.sun.org.apache.xerces.internal.util.SymbolHash

                }
            }
        }

        // establish the mapping from namespace to grammars
        fGrammarMap = new SymbolHash(len*2);
        for (i = 0; i < len; i++) {
            fGrammarMap.put(null2EmptyString(fNamespaces[i]), fGrammarList[i]);
            // update the idc field
            if (fGrammarList[i].hasIDConstraints())
                fHasIDC = true;
View Full Code Here

Examples of com.sun.org.apache.xerces.internal.util.SymbolHash

            sgHandler.addSubstitutionGroup(fGrammarList[i].getSubstitutionGroups());
        }

        XSNamedMap elements = getComponents(XSConstants.ELEMENT_DECLARATION);
        int len = elements.getLength();
        fSubGroupMap = new SymbolHash(len*2);
        XSElementDecl head;
        XSElementDeclaration[] subGroup;
        for (int i = 0; i < len; i++) {
            head = (XSElementDecl)elements.item(i);
            subGroup = sgHandler.getSubstitutionGroup(head);
View Full Code Here

Examples of com.sun.org.apache.xerces.internal.util.SymbolHash

        if (i == fGrammarCount)
            return XSNamedMapImpl.EMPTY_MAP;
       
        // get the hashtable for this type of components
        if (fNSComponents[i][objectType] == null) {
            SymbolHash table = null;
            switch (objectType) {
            case XSConstants.TYPE_DEFINITION:
            case XSTypeDefinition.COMPLEX_TYPE:
            case XSTypeDefinition.SIMPLE_TYPE:
                table = fGrammarList[i].fGlobalTypeDecls;
View Full Code Here

Examples of com.sun.org.apache.xerces.internal.util.SymbolHash

                fGrammarDescription = new XSDDescription();
                fGrammarDescription.fContextType = XSDDescription.CONTEXT_PREPARSE;
                fGrammarDescription.setNamespace(SchemaSymbols.URI_SCHEMAFORSCHEMA);
       
                // no global decls other than types
                fGlobalAttrDecls  = new SymbolHash(1);
                fGlobalAttrGrpDecls = new SymbolHash(1);
                fGlobalElemDecls = new SymbolHash(1);
                fGlobalGroupDecls = new SymbolHash(1);
                fGlobalNotationDecls = new SymbolHash(1);
                fGlobalIDConstraintDecls = new SymbolHash(1);
       
                // get all built-in types
                fGlobalTypeDecls = schemaFactory.getBuiltInTypes();
                // add anyType
                fGlobalTypeDecls.put(fAnyType.getName(), fAnyType);
            }
            else if (grammar == GRAMMAR_XSI) {
                // target namespace
                fTargetNamespace = SchemaSymbols.URI_XSI;
                // grammar description
                fGrammarDescription = new XSDDescription();
                fGrammarDescription.fContextType = XSDDescription.CONTEXT_PREPARSE;
                fGrammarDescription.setNamespace(SchemaSymbols.URI_XSI);
       
                // no global decls other than attributes
                fGlobalAttrGrpDecls = new SymbolHash(1);
                fGlobalElemDecls = new SymbolHash(1);
                fGlobalGroupDecls = new SymbolHash(1);
                fGlobalNotationDecls = new SymbolHash(1);
                fGlobalIDConstraintDecls = new SymbolHash(1);
                fGlobalTypeDecls = new SymbolHash(1);
   
                // 4 attributes, so initialize the size as 4*2 = 8
                fGlobalAttrDecls  = new SymbolHash(8);
                String name = null;
                String tns = null;
                XSSimpleType type = null;
                short scope = XSConstants.SCOPE_GLOBAL;
               
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.