/** * Returns the <code>AttributeTable</code> with the given name. * * @param name the name of the <code>AttributeTable</code> to return. * @return the <code>AttributeTable</code> with the specified name, or null * if there is no matching <code>AttributeTable</code>. * @see AttributeTable */ public final AttributeTable getAttributeTableN(String name) { AttributeTable at = null; Attribute a = getAttribute(name); if (a != null) { if (a.isContainer()) { at = a.getContainerN(); } } return (at); }
assertTrue(attributeNameSet.contains("NC_GLOBAL")); final AttributeTable attributeTableLat = das.getAttribute("lat").getContainer(); final Enumeration attributeTableLatNames = attributeTableLat.getNames(); testLatLonAttributes(attributeTableLat, attributeTableLatNames, "Latitude", 88.0f, -88.0f, "latitude_north", "y"); final AttributeTable attributeTableLon = das.getAttribute("lon").getContainer(); final Enumeration attributeTableLonNames = attributeTableLon.getNames(); testLatLonAttributes(attributeTableLon, attributeTableLonNames, "Longitude", 0.0f, 358.0f, "longitude_east", "x");
/** * Returns the <code>AttributeTable</code> with the given name. * * @param name the name of the <code>AttributeTable</code> to return. * @return the <code>AttributeTable</code> with the specified name, or null * if there is no matching <code>AttributeTable</code>. * @throws NoSuchAttributeException There is no AttributeTable with the passed name. * @see AttributeTable */ public final AttributeTable getAttributeTable(String name) throws NoSuchAttributeException { AttributeTable at = null; Attribute a = getAttribute(name); if (a != null) { if (a.isContainer()) { at = a.getContainer(); } } return (at); }
/** * Returns the <code>AttributeTable</code> with the given name. * * @param name the name of the <code>AttributeTable</code> to return. * @return the <code>AttributeTable</code> with the specified name, or null * if there is no matching <code>AttributeTable</code>. * @see AttributeTable */ public final AttributeTable getAttributeTableN(String name) { AttributeTable at = null; Attribute a = getAttribute(name); if (a != null) { if (a.isContainer()) { at = a.getContainerN(); } } return (at); }
/** * Returns the <code>AttributeTable</code> with the given name. * * @param name the name of the <code>AttributeTable</code> to return. * @return the <code>AttributeTable</code> with the specified name, or null * if there is no matching <code>AttributeTable</code>. * @throws NoSuchAttributeException There is no AttributeTable with the passed name. * @see AttributeTable */ public final AttributeTable getAttributeTable(String name) throws NoSuchAttributeException { AttributeTable at = null; Attribute a = getAttribute(name); if (a != null) { if (a.isContainer()) { at = a.getContainer(); } } return (at); }
/** * 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"); } } }
DAPNode.log.debug("DAS.resolveAliases() - aName: " + aName); Attribute at = getAttribute(aName); if (at == null || !at.isContainer()) {