/** * Returns the <code>index</code>th item in the map. The index starts at * 0. If <code>index</code> is greater than or equal to the number of * nodes in the list, this returns <code>null</code>. * @param index The position in the map from which the item is to be * retrieved. * @return The <code>XSObject</code> at the <code>index</code>th position * in the <code>XSNamedMap</code>, or <code>null</code> if that is * not a valid index. */ public synchronized XSObject item(int index) { if (fArray == null) { getLength(); } if (index < 0 || index >= fLength) { return null; } return fArray[index]; }
fComponents[objectType] = new XSNamedMap4Types(fTargetNamespace, table, objectType);
/** * 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; }
fGlobalComponents[objectType] = new XSNamedMap4Types(fNamespaces, tables, fGrammarCount, objectType);
fNSComponents[i][objectType] = new XSNamedMap4Types(namespace, table, objectType);