public class DOM4Parser extends java.lang.Object implements Dap4Parser
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
debug |
protected static java.io.PrintStream |
debugstream |
protected ErrorResponse |
errorresponse |
protected DMRFactory |
factory |
protected static int |
globaldebuglevel |
protected java.util.Map<org.w3c.dom.Node,DapGroup> |
groupmap |
protected DapDataset |
root |
protected java.util.Deque<DapNode> |
scopestack |
protected boolean |
trace |
| Constructor and Description |
|---|
DOM4Parser(DMRFactory factory) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addField(DapType t,
DapVariable field) |
protected void |
addField(DapVariable instance,
DapVariable field) |
protected java.lang.String |
cleanup(java.lang.String value) |
protected void |
errorcontext(java.lang.String value) |
protected void |
errormessage(java.lang.String value) |
protected void |
errorotherinfo(java.lang.String value) |
protected void |
fillcontainer(org.w3c.dom.Node node,
DapStructure parent) |
protected void |
fillgroupdefs(org.w3c.dom.Node domgroup,
DapGroup group) |
protected void |
fillgroupvars(org.w3c.dom.Node domgroup,
DapGroup group) |
protected void |
fillmetadata(org.w3c.dom.Node node,
DapVariable var) |
DapDataset |
getDMR() |
ErrorResponse |
getErrorResponse() |
protected boolean |
isattributeset(org.w3c.dom.Node node) |
protected boolean |
notexists(org.w3c.dom.Node n,
java.lang.String name) |
boolean |
parse(java.lang.String input) |
protected DapVariable |
parseatomicvar(org.w3c.dom.Node node) |
protected void |
parseattr(org.w3c.dom.Node node,
DapNode parent,
java.lang.String prefix) |
protected void |
parseattrset(org.w3c.dom.Node node,
DapNode parent) |
protected void |
parseattrset(org.w3c.dom.Node node,
DapNode parent,
java.lang.String prefix) |
protected void |
parsedataset(org.w3c.dom.Node rootnode) |
protected DapDimension |
parsedimdef(org.w3c.dom.Node node) |
protected DapDimension |
parsedimref(org.w3c.dom.Node node) |
protected DapEnumConst |
parseenumconst(org.w3c.dom.Node node) |
protected java.util.List<DapEnumConst> |
parseenumconsts(org.w3c.dom.Node enumdef) |
protected DapEnumeration |
parseenumdef(org.w3c.dom.Node node) |
protected DapVariable |
parseenumvar(org.w3c.dom.Node node) |
protected void |
parseerror(org.w3c.dom.Node node) |
protected DapGroup |
parsegroupdefs(org.w3c.dom.Node node) |
protected DapGroup |
parsegroupvars(org.w3c.dom.Node node,
DapGroup group) |
protected DapMap |
parsemap(org.w3c.dom.Node node) |
protected java.util.List<java.lang.String> |
parsenamespaces(org.w3c.dom.Node node) |
protected DapAttribute |
parseotherxml(org.w3c.dom.Node node) |
protected void |
parseresponse(org.w3c.dom.Node root) |
protected DapVariable |
parseseqvar(org.w3c.dom.Node node) |
protected DapVariable |
parsestructvar(org.w3c.dom.Node node) |
protected void |
passReserved(org.w3c.dom.Node node,
DapNode dap)
Pass reserved xml attributes unchanged
|
protected java.lang.String |
pull(org.w3c.dom.Node n,
java.lang.String name) |
protected void |
recordattr(DapAttribute attr,
DapNode parent) |
protected void |
recorddecl(DapNode n,
DapGroup parent) |
protected void |
recordfield(DapVariable var,
DapStructure parent) |
void |
setDebugLevel(int level) |
void |
setDebugStream(java.io.PrintStream stream) |
static void |
setGlobalDebugLevel(int level) |
protected void |
trace(java.lang.String action) |
protected static int globaldebuglevel
protected static java.io.PrintStream debugstream
protected DMRFactory factory
protected ErrorResponse errorresponse
protected java.util.Deque<DapNode> scopestack
protected DapDataset root
protected boolean trace
protected boolean debug
protected java.util.Map<org.w3c.dom.Node,DapGroup> groupmap
public DOM4Parser(DMRFactory factory)
public static void setGlobalDebugLevel(int level)
public void setDebugStream(java.io.PrintStream stream)
public void setDebugLevel(int level)
setDebugLevel in interface Dap4Parserpublic ErrorResponse getErrorResponse()
getErrorResponse in interface Dap4Parserpublic DapDataset getDMR()
getDMR in interface Dap4Parserpublic boolean parse(java.lang.String input)
throws org.xml.sax.SAXException
parse in interface Dap4Parserorg.xml.sax.SAXExceptionprotected java.lang.String pull(org.w3c.dom.Node n,
java.lang.String name)
protected boolean notexists(org.w3c.dom.Node n,
java.lang.String name)
protected void trace(java.lang.String action)
protected java.lang.String cleanup(java.lang.String value)
protected void addField(DapVariable instance, DapVariable field) throws DapException
DapExceptionprotected void addField(DapType t, DapVariable field) throws DapException
DapExceptionprotected void recorddecl(DapNode n, DapGroup parent) throws ParseException
ParseExceptionprotected void recordfield(DapVariable var, DapStructure parent) throws ParseException
ParseExceptionprotected void recordattr(DapAttribute attr, DapNode parent) throws ParseException
ParseExceptionprotected boolean isattributeset(org.w3c.dom.Node node)
protected void parseresponse(org.w3c.dom.Node root)
throws ParseException
ParseExceptionprotected void parsedataset(org.w3c.dom.Node rootnode)
throws ParseException
ParseExceptionprotected void fillgroupdefs(org.w3c.dom.Node domgroup,
DapGroup group)
throws ParseException
ParseExceptionprotected void fillgroupvars(org.w3c.dom.Node domgroup,
DapGroup group)
throws ParseException
ParseExceptionprotected DapGroup parsegroupdefs(org.w3c.dom.Node node) throws DapException
DapExceptionprotected DapEnumeration parseenumdef(org.w3c.dom.Node node) throws ParseException
ParseExceptionprotected java.util.List<DapEnumConst> parseenumconsts(org.w3c.dom.Node enumdef) throws ParseException
ParseExceptionprotected DapEnumConst parseenumconst(org.w3c.dom.Node node) throws ParseException
ParseExceptionprotected DapGroup parsegroupvars(org.w3c.dom.Node node, DapGroup group) throws DapException
DapExceptionprotected DapDimension parsedimdef(org.w3c.dom.Node node) throws ParseException
ParseExceptionprotected DapVariable parseenumvar(org.w3c.dom.Node node) throws ParseException
ParseExceptionprotected DapVariable parseatomicvar(org.w3c.dom.Node node) throws ParseException
ParseExceptionprotected DapVariable parsestructvar(org.w3c.dom.Node node) throws ParseException
ParseExceptionprotected DapVariable parseseqvar(org.w3c.dom.Node node) throws ParseException
ParseExceptionprotected void fillcontainer(org.w3c.dom.Node node,
DapStructure parent)
throws ParseException
ParseExceptionprotected void fillmetadata(org.w3c.dom.Node node,
DapVariable var)
throws ParseException
ParseExceptionprotected DapDimension parsedimref(org.w3c.dom.Node node) throws ParseException
ParseExceptionprotected DapMap parsemap(org.w3c.dom.Node node) throws ParseException
ParseExceptionprotected void parseattr(org.w3c.dom.Node node,
DapNode parent,
java.lang.String prefix)
throws ParseException
ParseExceptionprotected void parseattrset(org.w3c.dom.Node node,
DapNode parent)
throws ParseException
ParseExceptionprotected void parseattrset(org.w3c.dom.Node node,
DapNode parent,
java.lang.String prefix)
throws ParseException
ParseExceptionprotected java.util.List<java.lang.String> parsenamespaces(org.w3c.dom.Node node)
throws ParseException
ParseExceptionprotected DapAttribute parseotherxml(org.w3c.dom.Node node) throws ParseException
ParseExceptionprotected void parseerror(org.w3c.dom.Node node)
throws ParseException
ParseExceptionprotected void errormessage(java.lang.String value)
throws ParseException
ParseExceptionprotected void errorcontext(java.lang.String value)
throws ParseException
ParseExceptionprotected void errorotherinfo(java.lang.String value)
throws ParseException
ParseExceptionprotected void passReserved(org.w3c.dom.Node node,
DapNode dap)
throws ParseException
node - dap - ParseException