Enumeration edas = das.getNames();
public void writeGlobalAttributes(DAS das, DDS dds) { pWrt.print("<tr>\n" + "<td align=\"right\" valign=\"top\">\n" + "<h3><a href=\"opendap_form_help.html#global_attr\">Global Attributes:</a></h3>\n" + "<td><textarea name=\"global_attr\" rows=" + _attrRows + " cols=" + _attrCols + ">\n" ); Enumeration edas = das.getNames(); while (edas.hasMoreElements()) { String name = (String) edas.nextElement(); if (!dasTools.nameInKillFile(name) && (dasTools.nameIsGlobal(name) || !dasTools.nameInDDS(name, dds))) { try { AttributeTable attr = das.getAttributeTable(name); writeAttributes(attr); } catch (NoSuchAttributeException nsae) { } } } pWrt.print("</textarea><p>\n\n"); }
public void writeGlobalAttributes(DAS das, DDS dds) { pWrt.print("<tr>\n" + "<td align=\"right\" valign=\"top\">\n" + "<h3><a href=\"opendap_form_help.html#global_attr\">Global Attributes:</a></h3>\n" + "<td><textarea name=\"global_attr\" rows=" + _attrRows + " cols=" + _attrCols + ">\n" ); Enumeration edas = das.getNames(); while (edas.hasMoreElements()) { String name = (String) edas.nextElement(); if (!dasTools.nameInKillFile(name) && (dasTools.nameIsGlobal(name) || !dasTools.nameInDDS(name, dds))) { try { AttributeTable attr = das.getAttributeTable(name); writeAttributes(attr); } catch (NoSuchAttributeException nsae) { } } } pWrt.print("</textarea><p>\n\n"); }
Enumeration tableNames = das.getNames(); while (tableNames.hasMoreElements()) { String tableName = (String) tableNames.nextElement();
Enumeration edas = das.getNames();
Enumeration e = getNames(); while (e.hasMoreElements()) { String aName = (String) e.nextElement();
/** * This method searchs through the <code>DAS</code> * for Alias members. When an Alias is found the method attempts to * resolve it to a specific Attribute. * <p/> * This method is invoked by <code>parse(InputStream is)</code>, and is * used to search for Aliases in AttributeTables found in the DAS. * <p/> * If you are building a DAS from it's API it is important to call * this method prior to returning said DAS to an application. If * this call is not made, Aliases will not work correctly. * * @see Alias * @see DDS#resolveAliases() */ public void resolveAliases() throws MalformedAliasException, UnresolvedAliasException, NoSuchAttributeException { resolveAliases(this); // Enforce the rule that Aliases at the highest level of the DAS // must point to a container (AttributeTable) Enumeration e = getNames(); while (e.hasMoreElements()) { String aName = (String) e.nextElement(); if (Debug.isSet("DAS")) System.out.println("DAS.resolveAliases() - aName: " + aName); Attribute at = getAttribute(aName); if (at == null || !at.isContainer()) { throw new MalformedAliasException("Aliases at the top-level of a DAS MUST reference a container (AttributeTable), not a simple Attribute"); } } }
Enumeration tableNames = das.getNames(); while (tableNames.hasMoreElements()) { String tableName = (String) tableNames.nextElement();
public void testGetDAS() throws Exception { final DAS das = dConnect.getDAS(); final Enumeration attributeNames = das.getNames(); assertTrue(attributeNames.hasMoreElements()); final Set<String> attributeNameSet = new HashSet<String>();