com.sun.org.apache.xerces.internal.xs.XSObject Java Examples
The following examples show how to use
com.sun.org.apache.xerces.internal.xs.XSObject.
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 JDKSourceCode1.8 with MIT License | 6 votes |
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: XSModelImpl.java From jdk1.8-source-analysis with Apache License 2.0 | 6 votes |
private XSObjectListImpl getGlobalElements() { final SymbolHash[] tables = new SymbolHash[fGrammarCount]; int length = 0; for (int i = 0; i < fGrammarCount; i++) { tables[i] = fGrammarList[i].fAllGlobalElemDecls; length += tables[i].getLength(); } if (length == 0) { return XSObjectListImpl.EMPTY_LIST; } final XSObject[] components = new XSObject[length]; int start = 0; for (int i = 0; i < fGrammarCount; i++) { tables[i].getValues(components, start); start += tables[i].getLength(); } return new XSObjectListImpl(components, length); }
Example #3
Source File: XSDHandler.java From jdk1.8-source-analysis with Apache License 2.0 | 6 votes |
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: XSNamedMapImpl.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * Retrieves an <code>XSObject</code> specified by local name and * namespace URI. * <br>Per XML Namespaces, applications must use the value <code>null</code> as the * <code>namespace</code> parameter for methods if they wish to specify * no namespace. * @param namespace The namespace URI of the <code>XSObject</code> to * retrieve, or <code>null</code> if the <code>XSObject</code> has no * namespace. * @param localName The local name of the <code>XSObject</code> to * retrieve. * @return A <code>XSObject</code> (of any type) with the specified local * name and namespace URI, or <code>null</code> if they do not * identify any object in this map. */ public XSObject itemByName(String namespace, String localName) { for (int i = 0; i < fNSNum; i++) { if (isEqual(namespace, fNamespaces[i])) { // when this map is created from SymbolHash's // get the component from SymbolHash if (fMaps != null) { return (XSObject)fMaps[i].get(localName); } // Otherwise (it's created from an array) // go through the array to find a matching name XSObject ret; for (int j = 0; j < fLength; j++) { ret = fArray[j]; if (ret.getName().equals(localName)) { return ret; } } return null; } } return null; }
Example #5
Source File: XSModelImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
private XSObjectListImpl getGlobalElements() { final SymbolHash[] tables = new SymbolHash[fGrammarCount]; int length = 0; for (int i = 0; i < fGrammarCount; i++) { tables[i] = fGrammarList[i].fAllGlobalElemDecls; length += tables[i].getLength(); } if (length == 0) { return XSObjectListImpl.EMPTY_LIST; } final XSObject[] components = new XSObject[length]; int start = 0; for (int i = 0; i < fGrammarCount; i++) { tables[i].getValues(components, start); start += tables[i].getLength(); } return new XSObjectListImpl(components, length); }
Example #6
Source File: XSDHandler.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
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: XSNamedMapImpl.java From JDKSourceCode1.8 with MIT License | 6 votes |
/** * Construct an XSNamedMap implementation one namespace from an array * * @param array containing all components * @param length number of components */ public XSNamedMapImpl(XSObject[] array, int length) { if (length == 0) { fNamespaces = null; fMaps = null; fNSNum = 0; fArray = array; fLength = 0; return; } // because all components are from the same target namesapce, // get the namespace from the first one. fNamespaces = new String[]{array[0].getNamespace()}; fMaps = null; fNSNum = 1; // copy elements to the Vector fArray = array; fLength = length; }
Example #8
Source File: XSModelImpl.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
private XSObjectListImpl getGlobalElements() { final SymbolHash[] tables = new SymbolHash[fGrammarCount]; int length = 0; for (int i = 0; i < fGrammarCount; i++) { tables[i] = fGrammarList[i].fAllGlobalElemDecls; length += tables[i].getLength(); } if (length == 0) { return XSObjectListImpl.EMPTY_LIST; } final XSObject[] components = new XSObject[length]; int start = 0; for (int i = 0; i < fGrammarCount; i++) { tables[i].getValues(components, start); start += tables[i].getLength(); } return new XSObjectListImpl(components, length); }
Example #9
Source File: XSNamedMapImpl.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * Retrieves an <code>XSObject</code> specified by local name and * namespace URI. * <br>Per XML Namespaces, applications must use the value <code>null</code> as the * <code>namespace</code> parameter for methods if they wish to specify * no namespace. * @param namespace The namespace URI of the <code>XSObject</code> to * retrieve, or <code>null</code> if the <code>XSObject</code> has no * namespace. * @param localName The local name of the <code>XSObject</code> to * retrieve. * @return A <code>XSObject</code> (of any type) with the specified local * name and namespace URI, or <code>null</code> if they do not * identify any object in this map. */ public XSObject itemByName(String namespace, String localName) { for (int i = 0; i < fNSNum; i++) { if (isEqual(namespace, fNamespaces[i])) { // when this map is created from SymbolHash's // get the component from SymbolHash if (fMaps != null) { return (XSObject)fMaps[i].get(localName); } // Otherwise (it's created from an array) // go through the array to find a matching name XSObject ret; for (int j = 0; j < fLength; j++) { ret = fArray[j]; if (ret.getName().equals(localName)) { return ret; } } return null; } } return null; }
Example #10
Source File: XSNamedMapImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Construct an XSNamedMap implementation one namespace from an array * * @param array containing all components * @param length number of components */ public XSNamedMapImpl(XSObject[] array, int length) { if (length == 0) { fNamespaces = null; fMaps = null; fNSNum = 0; fArray = array; fLength = 0; return; } // because all components are from the same target namesapce, // get the namespace from the first one. fNamespaces = new String[]{array[0].getNamespace()}; fMaps = null; fNSNum = 1; // copy elements to the Vector fArray = array; fLength = length; }
Example #11
Source File: XSNamedMapImpl.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * Returns the <code>index</code>th item in the collection or * <code>null</code> if <code>index</code> is greater than or equal to * the number of objects in the list. The index starts at 0. * @param index index into the collection. * @return The <code>XSObject</code> at the <code>index</code>th * position in the <code>XSObjectList</code>, or <code>null</code> if * the index specified is not valid. */ public synchronized XSObject item(int index) { if (fArray == null) { // calculate the total number of elements getLength(); fArray = new XSObject[fLength]; int pos = 0; // get components from all SymbolHashes for (int i = 0; i < fNSNum; i++) { pos += fMaps[i].getValues(fArray, pos); } } if (index < 0 || index >= fLength) { return null; } return fArray[index]; }
Example #12
Source File: XSModelImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
private XSObjectListImpl getGlobalElements() { final SymbolHash[] tables = new SymbolHash[fGrammarCount]; int length = 0; for (int i = 0; i < fGrammarCount; i++) { tables[i] = fGrammarList[i].fAllGlobalElemDecls; length += tables[i].getLength(); } if (length == 0) { return XSObjectListImpl.EMPTY_LIST; } final XSObject[] components = new XSObject[length]; int start = 0; for (int i = 0; i < fGrammarCount; i++) { tables[i].getValues(components, start); start += tables[i].getLength(); } return new XSObjectListImpl(components, length); }
Example #13
Source File: XSDHandler.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
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 #14
Source File: XSDHandler.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
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 #15
Source File: XSNamedMapImpl.java From JDKSourceCode1.8 with MIT License | 6 votes |
/** * Retrieves an <code>XSObject</code> specified by local name and * namespace URI. * <br>Per XML Namespaces, applications must use the value <code>null</code> as the * <code>namespace</code> parameter for methods if they wish to specify * no namespace. * @param namespace The namespace URI of the <code>XSObject</code> to * retrieve, or <code>null</code> if the <code>XSObject</code> has no * namespace. * @param localName The local name of the <code>XSObject</code> to * retrieve. * @return A <code>XSObject</code> (of any type) with the specified local * name and namespace URI, or <code>null</code> if they do not * identify any object in this map. */ public XSObject itemByName(String namespace, String localName) { for (int i = 0; i < fNSNum; i++) { if (isEqual(namespace, fNamespaces[i])) { // when this map is created from SymbolHash's // get the component from SymbolHash if (fMaps != null) { return (XSObject)fMaps[i].get(localName); } // Otherwise (it's created from an array) // go through the array to find a matching name XSObject ret; for (int j = 0; j < fLength; j++) { ret = fArray[j]; if (ret.getName().equals(localName)) { return ret; } } return null; } } return null; }
Example #16
Source File: XSNamedMapImpl.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * Construct an XSNamedMap implementation one namespace from an array * * @param array containing all components * @param length number of components */ public XSNamedMapImpl(XSObject[] array, int length) { if (length == 0) { fNamespaces = null; fMaps = null; fNSNum = 0; fArray = array; fLength = 0; return; } // because all components are from the same target namesapce, // get the namespace from the first one. fNamespaces = new String[]{array[0].getNamespace()}; fMaps = null; fNSNum = 1; // copy elements to the Vector fArray = array; fLength = length; }
Example #17
Source File: XSModelImpl.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
private XSObjectListImpl getGlobalElements() { final SymbolHash[] tables = new SymbolHash[fGrammarCount]; int length = 0; for (int i = 0; i < fGrammarCount; i++) { tables[i] = fGrammarList[i].fAllGlobalElemDecls; length += tables[i].getLength(); } if (length == 0) { return XSObjectListImpl.EMPTY_LIST; } final XSObject[] components = new XSObject[length]; int start = 0; for (int i = 0; i < fGrammarCount; i++) { tables[i].getValues(components, start); start += tables[i].getLength(); } return new XSObjectListImpl(components, length); }
Example #18
Source File: XSNamedMapImpl.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * Returns the <code>index</code>th item in the collection or * <code>null</code> if <code>index</code> is greater than or equal to * the number of objects in the list. The index starts at 0. * @param index index into the collection. * @return The <code>XSObject</code> at the <code>index</code>th * position in the <code>XSObjectList</code>, or <code>null</code> if * the index specified is not valid. */ public synchronized XSObject item(int index) { if (fArray == null) { // calculate the total number of elements getLength(); fArray = new XSObject[fLength]; int pos = 0; // get components from all SymbolHashes for (int i = 0; i < fNSNum; i++) { pos += fMaps[i].getValues(fArray, pos); } } if (index < 0 || index >= fLength) { return null; } return fArray[index]; }
Example #19
Source File: XSNamedMapImpl.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public synchronized Set entrySet() { // Defer creation of the entry set until it is actually needed. if (fEntrySet == null) { final int length = getLength(); final XSNamedMapEntry[] entries = new XSNamedMapEntry[length]; for (int i = 0; i < length; ++i) { XSObject xso = item(i); entries[i] = new XSNamedMapEntry(new QName(xso.getNamespace(), xso.getName()), xso); } // Create a view of this immutable map. fEntrySet = new AbstractSet() { public Iterator iterator() { return new Iterator() { private int index = 0; public boolean hasNext() { return (index < length); } public Object next() { if (index < length) { return entries[index++]; } throw new NoSuchElementException(); } public void remove() { throw new UnsupportedOperationException(); } }; } public int size() { return length; } }; } return fEntrySet; }
Example #20
Source File: XSDHandler.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
/** * getSchemaDocument method uses XMLInputSource to parse a schema document. * @param schemaNamespace * @param schemaSource * @param mustResolve * @param referType * @param referElement * @return A schema Element. */ private Element getSchemaDocument(XSInputSource schemaSource, XSDDescription desc) { SchemaGrammar[] grammars = schemaSource.getGrammars(); short referType = desc.getContextType(); if (grammars != null && grammars.length > 0) { Vector expandedGrammars = expandGrammars(grammars); // check for existing grammars in our bucket // and if there exist any, and namespace growth is // not enabled - we do nothing if (fNamespaceGrowth || !existingGrammars(expandedGrammars)) { addGrammars(expandedGrammars); if (referType == XSDDescription.CONTEXT_PREPARSE) { desc.setTargetNamespace(grammars[0].getTargetNamespace()); } } } else { XSObject[] components = schemaSource.getComponents(); if (components != null && components.length > 0) { Map<String, Vector> importDependencies = new HashMap(); Vector expandedComponents = expandComponents(components, importDependencies); if (fNamespaceGrowth || canAddComponents(expandedComponents)) { addGlobalComponents(expandedComponents, importDependencies); if (referType == XSDDescription.CONTEXT_PREPARSE) { desc.setTargetNamespace(components[0].getNamespace()); } } } } return null; }
Example #21
Source File: XSObjectListImpl.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public void addXSObject(XSObject object) { if (fLength == fArray.length) { XSObject[] temp = new XSObject[fLength + 4]; System.arraycopy(fArray, 0, temp, 0, fLength); fArray = temp; } fArray[fLength++] = object; }
Example #22
Source File: XSNamedMap4Types.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Retrieves an <code>XSObject</code> specified by local name and namespace * URI. * @param namespace The namespace URI of the <code>XSObject</code> to * retrieve. * @param localName The local name of the <code>XSObject</code> to retrieve. * @return A <code>XSObject</code> (of any type) with the specified local * name and namespace URI, or <code>null</code> if they do not * identify any <code>XSObject</code> in this map. */ public XSObject itemByName(String namespace, String localName) { for (int i = 0; i < fNSNum; i++) { if (isEqual(namespace, fNamespaces[i])) { XSTypeDefinition type = (XSTypeDefinition)fMaps[i].get(localName); // only return it if it matches the required type if (type != null && type.getTypeCategory() == fType) { return type; } return null; } } return null; }
Example #23
Source File: XSDHandler.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
void fillInLocalElemInfo(Element elmDecl, XSDocumentInfo schemaDoc, int allContextFlags, XSObject parent, XSParticleDecl particle) { // if the stack is full, increase the size if (fParticle.length == fLocalElemStackPos) { // increase size XSParticleDecl[] newStackP = new XSParticleDecl[fLocalElemStackPos+INC_STACK_SIZE]; System.arraycopy(fParticle, 0, newStackP, 0, fLocalElemStackPos); fParticle = newStackP; Element[] newStackE = new Element[fLocalElemStackPos+INC_STACK_SIZE]; System.arraycopy(fLocalElementDecl, 0, newStackE, 0, fLocalElemStackPos); fLocalElementDecl = newStackE; XSDocumentInfo [] newStackE_schema = new XSDocumentInfo[fLocalElemStackPos+INC_STACK_SIZE]; System.arraycopy(fLocalElementDecl_schema, 0, newStackE_schema, 0, fLocalElemStackPos); fLocalElementDecl_schema = newStackE_schema; int[] newStackI = new int[fLocalElemStackPos+INC_STACK_SIZE]; System.arraycopy(fAllContext, 0, newStackI, 0, fLocalElemStackPos); fAllContext = newStackI; XSObject[] newStackC = new XSObject[fLocalElemStackPos+INC_STACK_SIZE]; System.arraycopy(fParent, 0, newStackC, 0, fLocalElemStackPos); fParent = newStackC; String [][] newStackN = new String [fLocalElemStackPos+INC_STACK_SIZE][]; System.arraycopy(fLocalElemNamespaceContext, 0, newStackN, 0, fLocalElemStackPos); fLocalElemNamespaceContext = newStackN; } fParticle[fLocalElemStackPos] = particle; fLocalElementDecl[fLocalElemStackPos] = elmDecl; fLocalElementDecl_schema[fLocalElemStackPos] = schemaDoc; fAllContext[fLocalElemStackPos] = allContextFlags; fParent[fLocalElemStackPos] = parent; fLocalElemNamespaceContext[fLocalElemStackPos++] = schemaDoc.fNamespaceSupport.getEffectiveLocalContext(); }
Example #24
Source File: XSNamedMap4Types.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Retrieves an <code>XSObject</code> specified by local name and namespace * URI. * @param namespace The namespace URI of the <code>XSObject</code> to * retrieve. * @param localName The local name of the <code>XSObject</code> to retrieve. * @return A <code>XSObject</code> (of any type) with the specified local * name and namespace URI, or <code>null</code> if they do not * identify any <code>XSObject</code> in this map. */ public XSObject itemByName(String namespace, String localName) { for (int i = 0; i < fNSNum; i++) { if (isEqual(namespace, fNamespaces[i])) { XSTypeDefinition type = (XSTypeDefinition)fMaps[i].get(localName); // only return it if it matches the required type if (type != null && type.getTypeCategory() == fType) { return type; } return null; } } return null; }
Example #25
Source File: XSDHandler.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
void fillInLocalElemInfo(Element elmDecl, XSDocumentInfo schemaDoc, int allContextFlags, XSObject parent, XSParticleDecl particle) { // if the stack is full, increase the size if (fParticle.length == fLocalElemStackPos) { // increase size XSParticleDecl[] newStackP = new XSParticleDecl[fLocalElemStackPos+INC_STACK_SIZE]; System.arraycopy(fParticle, 0, newStackP, 0, fLocalElemStackPos); fParticle = newStackP; Element[] newStackE = new Element[fLocalElemStackPos+INC_STACK_SIZE]; System.arraycopy(fLocalElementDecl, 0, newStackE, 0, fLocalElemStackPos); fLocalElementDecl = newStackE; XSDocumentInfo [] newStackE_schema = new XSDocumentInfo[fLocalElemStackPos+INC_STACK_SIZE]; System.arraycopy(fLocalElementDecl_schema, 0, newStackE_schema, 0, fLocalElemStackPos); fLocalElementDecl_schema = newStackE_schema; int[] newStackI = new int[fLocalElemStackPos+INC_STACK_SIZE]; System.arraycopy(fAllContext, 0, newStackI, 0, fLocalElemStackPos); fAllContext = newStackI; XSObject[] newStackC = new XSObject[fLocalElemStackPos+INC_STACK_SIZE]; System.arraycopy(fParent, 0, newStackC, 0, fLocalElemStackPos); fParent = newStackC; String [][] newStackN = new String [fLocalElemStackPos+INC_STACK_SIZE][]; System.arraycopy(fLocalElemNamespaceContext, 0, newStackN, 0, fLocalElemStackPos); fLocalElemNamespaceContext = newStackN; } fParticle[fLocalElemStackPos] = particle; fLocalElementDecl[fLocalElemStackPos] = elmDecl; fLocalElementDecl_schema[fLocalElemStackPos] = schemaDoc; fAllContext[fLocalElemStackPos] = allContextFlags; fParent[fLocalElemStackPos] = parent; fLocalElemNamespaceContext[fLocalElemStackPos++] = schemaDoc.fNamespaceSupport.getEffectiveLocalContext(); }
Example #26
Source File: XSNamedMap4Types.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * Retrieves an <code>XSObject</code> specified by local name and namespace * URI. * @param namespace The namespace URI of the <code>XSObject</code> to * retrieve. * @param localName The local name of the <code>XSObject</code> to retrieve. * @return A <code>XSObject</code> (of any type) with the specified local * name and namespace URI, or <code>null</code> if they do not * identify any <code>XSObject</code> in this map. */ public XSObject itemByName(String namespace, String localName) { for (int i = 0; i < fNSNum; i++) { if (isEqual(namespace, fNamespaces[i])) { XSTypeDefinition type = (XSTypeDefinition)fMaps[i].get(localName); // only return it if it matches the required type if (type != null && type.getTypeCategory() == fType) { return type; } return null; } } return null; }
Example #27
Source File: XSDHandler.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
void fillInLocalElemInfo(Element elmDecl, XSDocumentInfo schemaDoc, int allContextFlags, XSObject parent, XSParticleDecl particle) { // if the stack is full, increase the size if (fParticle.length == fLocalElemStackPos) { // increase size XSParticleDecl[] newStackP = new XSParticleDecl[fLocalElemStackPos+INC_STACK_SIZE]; System.arraycopy(fParticle, 0, newStackP, 0, fLocalElemStackPos); fParticle = newStackP; Element[] newStackE = new Element[fLocalElemStackPos+INC_STACK_SIZE]; System.arraycopy(fLocalElementDecl, 0, newStackE, 0, fLocalElemStackPos); fLocalElementDecl = newStackE; XSDocumentInfo [] newStackE_schema = new XSDocumentInfo[fLocalElemStackPos+INC_STACK_SIZE]; System.arraycopy(fLocalElementDecl_schema, 0, newStackE_schema, 0, fLocalElemStackPos); fLocalElementDecl_schema = newStackE_schema; int[] newStackI = new int[fLocalElemStackPos+INC_STACK_SIZE]; System.arraycopy(fAllContext, 0, newStackI, 0, fLocalElemStackPos); fAllContext = newStackI; XSObject[] newStackC = new XSObject[fLocalElemStackPos+INC_STACK_SIZE]; System.arraycopy(fParent, 0, newStackC, 0, fLocalElemStackPos); fParent = newStackC; String [][] newStackN = new String [fLocalElemStackPos+INC_STACK_SIZE][]; System.arraycopy(fLocalElemNamespaceContext, 0, newStackN, 0, fLocalElemStackPos); fLocalElemNamespaceContext = newStackN; } fParticle[fLocalElemStackPos] = particle; fLocalElementDecl[fLocalElemStackPos] = elmDecl; fLocalElementDecl_schema[fLocalElemStackPos] = schemaDoc; fAllContext[fLocalElemStackPos] = allContextFlags; fParent[fLocalElemStackPos] = parent; fLocalElemNamespaceContext[fLocalElemStackPos++] = schemaDoc.fNamespaceSupport.getEffectiveLocalContext(); }
Example #28
Source File: XSDHandler.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
void fillInLocalElemInfo(Element elmDecl, XSDocumentInfo schemaDoc, int allContextFlags, XSObject parent, XSParticleDecl particle) { // if the stack is full, increase the size if (fParticle.length == fLocalElemStackPos) { // increase size XSParticleDecl[] newStackP = new XSParticleDecl[fLocalElemStackPos+INC_STACK_SIZE]; System.arraycopy(fParticle, 0, newStackP, 0, fLocalElemStackPos); fParticle = newStackP; Element[] newStackE = new Element[fLocalElemStackPos+INC_STACK_SIZE]; System.arraycopy(fLocalElementDecl, 0, newStackE, 0, fLocalElemStackPos); fLocalElementDecl = newStackE; XSDocumentInfo [] newStackE_schema = new XSDocumentInfo[fLocalElemStackPos+INC_STACK_SIZE]; System.arraycopy(fLocalElementDecl_schema, 0, newStackE_schema, 0, fLocalElemStackPos); fLocalElementDecl_schema = newStackE_schema; int[] newStackI = new int[fLocalElemStackPos+INC_STACK_SIZE]; System.arraycopy(fAllContext, 0, newStackI, 0, fLocalElemStackPos); fAllContext = newStackI; XSObject[] newStackC = new XSObject[fLocalElemStackPos+INC_STACK_SIZE]; System.arraycopy(fParent, 0, newStackC, 0, fLocalElemStackPos); fParent = newStackC; String [][] newStackN = new String [fLocalElemStackPos+INC_STACK_SIZE][]; System.arraycopy(fLocalElemNamespaceContext, 0, newStackN, 0, fLocalElemStackPos); fLocalElemNamespaceContext = newStackN; } fParticle[fLocalElemStackPos] = particle; fLocalElementDecl[fLocalElemStackPos] = elmDecl; fLocalElementDecl_schema[fLocalElemStackPos] = schemaDoc; fAllContext[fLocalElemStackPos] = allContextFlags; fParent[fLocalElemStackPos] = parent; fLocalElemNamespaceContext[fLocalElemStackPos++] = schemaDoc.fNamespaceSupport.getEffectiveLocalContext(); }
Example #29
Source File: XSDHandler.java From hottub with GNU General Public License v2.0 | 5 votes |
void fillInLocalElemInfo(Element elmDecl, XSDocumentInfo schemaDoc, int allContextFlags, XSObject parent, XSParticleDecl particle) { // if the stack is full, increase the size if (fParticle.length == fLocalElemStackPos) { // increase size XSParticleDecl[] newStackP = new XSParticleDecl[fLocalElemStackPos+INC_STACK_SIZE]; System.arraycopy(fParticle, 0, newStackP, 0, fLocalElemStackPos); fParticle = newStackP; Element[] newStackE = new Element[fLocalElemStackPos+INC_STACK_SIZE]; System.arraycopy(fLocalElementDecl, 0, newStackE, 0, fLocalElemStackPos); fLocalElementDecl = newStackE; XSDocumentInfo [] newStackE_schema = new XSDocumentInfo[fLocalElemStackPos+INC_STACK_SIZE]; System.arraycopy(fLocalElementDecl_schema, 0, newStackE_schema, 0, fLocalElemStackPos); fLocalElementDecl_schema = newStackE_schema; int[] newStackI = new int[fLocalElemStackPos+INC_STACK_SIZE]; System.arraycopy(fAllContext, 0, newStackI, 0, fLocalElemStackPos); fAllContext = newStackI; XSObject[] newStackC = new XSObject[fLocalElemStackPos+INC_STACK_SIZE]; System.arraycopy(fParent, 0, newStackC, 0, fLocalElemStackPos); fParent = newStackC; String [][] newStackN = new String [fLocalElemStackPos+INC_STACK_SIZE][]; System.arraycopy(fLocalElemNamespaceContext, 0, newStackN, 0, fLocalElemStackPos); fLocalElemNamespaceContext = newStackN; } fParticle[fLocalElemStackPos] = particle; fLocalElementDecl[fLocalElemStackPos] = elmDecl; fLocalElementDecl_schema[fLocalElemStackPos] = schemaDoc; fAllContext[fLocalElemStackPos] = allContextFlags; fParent[fLocalElemStackPos] = parent; fLocalElemNamespaceContext[fLocalElemStackPos++] = schemaDoc.fNamespaceSupport.getEffectiveLocalContext(); }
Example #30
Source File: XSObjectListImpl.java From JDKSourceCode1.8 with MIT License | 5 votes |
public void addXSObject(XSObject object) { if (fLength == fArray.length) { XSObject[] temp = new XSObject[fLength + 4]; System.arraycopy(fArray, 0, temp, 0, fLength); fArray = temp; } fArray[fLength++] = object; }