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 Dap4Parser
public ErrorResponse getErrorResponse()
getErrorResponse
in interface Dap4Parser
public DapDataset getDMR()
getDMR
in interface Dap4Parser
public boolean parse(java.lang.String input) throws org.xml.sax.SAXException
parse
in interface Dap4Parser
org.xml.sax.SAXException
protected 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
DapException
protected void addField(DapType t, DapVariable field) throws DapException
DapException
protected void recorddecl(DapNode n, DapGroup parent) throws ParseException
ParseException
protected void recordfield(DapVariable var, DapStructure parent) throws ParseException
ParseException
protected void recordattr(DapAttribute attr, DapNode parent) throws ParseException
ParseException
protected boolean isattributeset(org.w3c.dom.Node node)
protected void parseresponse(org.w3c.dom.Node root) throws ParseException
ParseException
protected void parsedataset(org.w3c.dom.Node rootnode) throws ParseException
ParseException
protected void fillgroupdefs(org.w3c.dom.Node domgroup, DapGroup group) throws ParseException
ParseException
protected void fillgroupvars(org.w3c.dom.Node domgroup, DapGroup group) throws ParseException
ParseException
protected DapGroup parsegroupdefs(org.w3c.dom.Node node) throws DapException
DapException
protected DapEnumeration parseenumdef(org.w3c.dom.Node node) throws ParseException
ParseException
protected java.util.List<DapEnumConst> parseenumconsts(org.w3c.dom.Node enumdef) throws ParseException
ParseException
protected DapEnumConst parseenumconst(org.w3c.dom.Node node) throws ParseException
ParseException
protected DapGroup parsegroupvars(org.w3c.dom.Node node, DapGroup group) throws DapException
DapException
protected DapDimension parsedimdef(org.w3c.dom.Node node) throws ParseException
ParseException
protected DapVariable parseenumvar(org.w3c.dom.Node node) throws ParseException
ParseException
protected DapVariable parseatomicvar(org.w3c.dom.Node node) throws ParseException
ParseException
protected DapVariable parsestructvar(org.w3c.dom.Node node) throws ParseException
ParseException
protected DapVariable parseseqvar(org.w3c.dom.Node node) throws ParseException
ParseException
protected void fillcontainer(org.w3c.dom.Node node, DapStructure parent) throws ParseException
ParseException
protected void fillmetadata(org.w3c.dom.Node node, DapVariable var) throws ParseException
ParseException
protected DapDimension parsedimref(org.w3c.dom.Node node) throws ParseException
ParseException
protected DapMap parsemap(org.w3c.dom.Node node) throws ParseException
ParseException
protected void parseattr(org.w3c.dom.Node node, DapNode parent, java.lang.String prefix) throws ParseException
ParseException
protected void parseattrset(org.w3c.dom.Node node, DapNode parent) throws ParseException
ParseException
protected void parseattrset(org.w3c.dom.Node node, DapNode parent, java.lang.String prefix) throws ParseException
ParseException
protected java.util.List<java.lang.String> parsenamespaces(org.w3c.dom.Node node) throws ParseException
ParseException
protected DapAttribute parseotherxml(org.w3c.dom.Node node) throws ParseException
ParseException
protected void parseerror(org.w3c.dom.Node node) throws ParseException
ParseException
protected void errormessage(java.lang.String value) throws ParseException
ParseException
protected void errorcontext(java.lang.String value) throws ParseException
ParseException
protected void errorotherinfo(java.lang.String value) throws ParseException
ParseException
protected void passReserved(org.w3c.dom.Node node, DapNode dap) throws ParseException
node
- dap
- ParseException