bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
|
NcML Parser for adding/modifying/removing metadata (attributes) to existing local datasets using NcML. More...
Classes | |
class | AggregationElement |
class | AttributeElement |
Concrete class for NcML <attribute> element. More... | |
class | AttrTableLazyPtr |
class | DimensionElement |
class | ExplicitElement |
Concrete class for NcML <explicit> element. More... | |
struct | ModuleConstants |
class | MyBaseTypeFactory |
Wrapper for the BaseTypeFactory that lets us create by type name. More... | |
class | NCMLArray |
A parameterized subclass of libdap::Array that allows us to apply constraints on NcML-specified data prior to serialization. All the code is in the .h, so no .cc is defined. More... | |
class | NCMLBaseArray |
class | NCMLCacheAggResponseHandler |
class | NCMLCacheAggXMLCommand |
class | NCMLElement |
Base class for NcML element concrete classes. More... | |
class | NCMLModule |
class | NCMLParser |
class | NCMLRequestHandler |
class | NCMLUtil |
class | NetcdfElement |
Concrete class for NcML <netcdf> element. More... | |
class | OtherXMLParser |
class | ReadMetadataElement |
Concrete class for NcML <readMetadata> element. More... | |
class | RemoveElement |
class | RenamedArrayWrapper |
A Decorator Pattern for wrapping a libdap::Array in order to change its name efficiently in the face of buggy subclasses we cannot change. More... | |
class | SaxParser |
Interface class for the wrapper between libxml C SAX parser and our NCMLParser. More... | |
class | SaxParserWrapper |
Wrapper for libxml SAX parser C callbacks into C++. More... | |
class | ScanElement |
class | ScopeStack |
class | Shape |
A wrapper class for a vector of Array::dimension structs. More... | |
class | SimpleLocationParser |
SaxParser implementation that just grabs the netcdf@location attribute and returns it. More... | |
class | ValuesElement |
class | VariableAggElement |
Element for the <variableAgg> element child of an <aggregation>. More... | |
class | VariableElement |
Concrete class for NcML <variable> element. More... | |
struct | XMLAttribute |
class | XMLAttributeMap |
struct | XMLNamespace |
class | XMLNamespaceMap |
class | XMLNamespaceStack |
struct | XMLUtil |
Typedefs | |
typedef vector< Array::dimension >::const_iterator | DimItC |
typedef std::map< string, string > | TypeConverter |
NcML Parser for adding/modifying/removing metadata (attributes) to existing local datasets using NcML.
Helper class for NCMLParser to maintain the current scope of the parse.
An abstract superclass for NCMLArray<T> that handles the non-parameterized functionality and allows us to treat subclasses of any type T polymorphically.
Core engine for parsing an NcML structure and modifying the DDS (which includes attribute data) of a single dataset by adding new metadata to it. (http://docs.opendap.org/index.php/AIS_Using_NcML).
The main documentation for the NCML Module is here: http://docs.opendap.org/index.php/BES_-_Modules_-_NcML_Module
For the purposes of this class "scope" will mean the attribute table at some place in the DDX (populated DDS object), be it at the global attribute table, inside a nested attribute container, inside a variable, or inside a nested variable (Structure, e.g.). This is basically the same as a "fully qualified name" in DAP 2 (ESE-RFC-004.1.1)
Design and Control Flow:
o We use the SaxParser interface callbacks to handle calls from a SAX parser which we create on parse() call.
o We maintain a lazy-evaluated pointer to the currently active AttrTable via getCurrentAttrTable(). in other words, we only load the DDS of a dataset if we actually require changes to it. As we enter/exit the lexical scope of attribute containers or Constructor variables we keep track of this on a scope stack which allows us to know the fully qualified name of the current scope as well as the type of the innermost scope for error checking.
o As we process NcML elements we modify the DDS as needed. The elements are all subclasses of NCMLElement and are factoried up in onStartElement for polymorphic dispatch. A stack of these is kept for calling handleContent() and handleEnd() on them as needed.
o When complete, we return the loaded and transformed DDS to the caller.
We throw BESInternalError for logic errors in the code such as failed asserts or null pointers.
We throw BESSyntaxUserError for parse errors in the NcML (non-existent variables or attributes, malformed NcML, etc).
Limitations:
o We only handle local (same BES) datasets with this version (hopefully we can relax this to allow remote dataset augmentation as a bes.conf option or something.
Basically, the full scope stack defines the namespace describing the location of a variable or attribute in a DDS. It can be used to generate the fully qualified name of a variable or attribute within the DDS.
For now, an empty scope stack will implicitly mean GLOBAL scope (DDS level, or what have you). We won't actually push an entry for GLOBAL, it will just be assumed if empty(). We also won't put it in the scope strings since they are meant to refer to fully qualified names, where an empty() name means global scope.
typedef vector<Array::dimension>::const_iterator ncml_module::DimItC |
Definition at line 868 of file NCMLParser.cc.