Package dap4.core.dmr

Class DapDataset

  • All Implemented Interfaces:
    DapDecl

    public class DapDataset
    extends DapGroup
    This is the root object of a DMR tree.
    • Constructor Detail

      • DapDataset

        public DapDataset()
      • DapDataset

        public DapDataset​(String name)
    • Method Detail

      • finish

        public void finish()
      • finishR

        protected void finishR​(DapNode node)
        Recursive helper
        Parameters:
        node - to walk
      • setConstraint

        public void setConstraint​(CEConstraint ce)
      • getDapVersion

        public String getDapVersion()
      • setDapVersion

        public void setDapVersion​(String value)
      • getDMRVersion

        public String getDMRVersion()
      • setDMRVersion

        public void setDMRVersion​(String value)
      • getNS

        public String getNS()
      • setNS

        public void setNS​(String value)
      • getBase

        public String getBase()
      • setBase

        public void setBase​(String value)
      • addNode

        public void addNode​(DapNode newnode)
      • lookup

        public DapNode lookup​(String fqn,
                              DapSort... sortset)
                       throws DapException
        Parse an FQN and use it to trace to a specific object in a dataset. Note that this is quite tricky in the face of backslash escapes. Because of backslash escapes, we cannot use the String.split function because it does appear to be possible to write a regexp that handles preceding backslashes correctly. Instead, we must parse character by character left to right. Traversal into structs: In theory, a map variable could point to a field of a structure. However, in practice, this will not work because we would need a specific instance of that field, which means including dimension indices must be included starting from some top-level variable. We choose, for now, to make that illegal until such time as there is a well-defined meaning for this. Note: this assumes the fqn is absolute (i.e. starts with '/').
        Parameters:
        fqn - the fully qualified name
        sortset - the kind(s) of object we are looking for
        Returns:
        the matching Dap Node or null if not found
        Throws:
        DapException
      • sort

        public void sort()
        Sort the nodelist into prefix left to right order
      • sortR

        public void sortR​(DapNode node,
                          List<DapNode> sortlist)
        Sort helper
        Parameters:
        node - the current node we are traversing