public abstract class DapController
extends javax.servlet.http.HttpServlet
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
BIG_ENDIAN |
protected static long |
binarywritelimit |
protected java.nio.ByteOrder |
byteorder |
protected static DapCache |
cache |
protected boolean |
compress |
protected java.lang.String |
controllerpath |
protected static java.lang.String |
DATAEXT |
static boolean |
DEBUG |
static long |
DEFAULTBINARYWRITELIMIT |
protected static java.lang.String |
DMREXT |
protected DapDSR |
dsrbuilder |
protected static java.lang.String |
DSREXT |
protected static java.lang.String[] |
ENDINGS |
protected static java.lang.String |
FAVICON |
protected static boolean |
IS_BIG_ENDIAN |
protected static java.lang.String |
LITTLE_ENDIAN |
static boolean |
PARSEDEBUG |
protected java.lang.String |
resourcepath |
protected javax.servlet.ServletContext |
servletcontext |
| Constructor and Description |
|---|
DapController(java.lang.String controllerpath) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addCommonHeaders(DapRequest drq) |
protected CEConstraint |
buildconstraint(DapRequest drq,
java.lang.String sce,
dap4.core.dmr.DapDataset dmr)
If the request has a constraint, then parse it
else use the universal constraint
|
protected abstract void |
doCapabilities(DapRequest drq)
Process a capabilities request.
|
protected void |
doData(DapRequest drq)
Process a DataDMR request.
|
protected void |
doDMR(DapRequest drq)
Process a DMR request.
|
protected void |
doDSR(DapRequest drq)
Process a DSR request.
|
protected abstract void |
doFavicon(DapRequest drq,
java.lang.String icopath)
Process a favicon request.
|
protected abstract long |
getBinaryWriteLimit()
Get the maximum # of bytes per request
|
protected static DapCache |
getCache() |
protected DapRequest |
getRequestState(javax.servlet.http.HttpServletRequest rq,
javax.servlet.http.HttpServletResponse rsp)
Merge the servlet inputs into a single object
for easier transport as well as adding value.
|
protected abstract java.lang.String |
getResourcePath(DapRequest drq,
java.lang.String relpath)
Convert a URL path into an absolute file path
|
void |
handleRequest(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res) |
void |
init() |
protected void |
senderror(DapRequest drq,
int httpcode,
java.lang.Throwable t)
Generate an error based on the parameters
|
static void |
setBinaryWritelimit(long limit) |
protected static void |
setCache(DapCache cache) |
void |
setServletContext(javax.servlet.ServletContext servletContext) |
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, servicepublic static final boolean DEBUG
public static final boolean PARSEDEBUG
protected static final java.lang.String BIG_ENDIAN
protected static final java.lang.String LITTLE_ENDIAN
protected static boolean IS_BIG_ENDIAN
protected static final java.lang.String DMREXT
protected static final java.lang.String DATAEXT
protected static final java.lang.String DSREXT
protected static final java.lang.String[] ENDINGS
protected static final java.lang.String FAVICON
public static final long DEFAULTBINARYWRITELIMIT
protected static DapCache cache
protected static long binarywritelimit
protected boolean compress
protected transient java.nio.ByteOrder byteorder
protected transient DapDSR dsrbuilder
protected transient java.lang.String controllerpath
protected transient java.lang.String resourcepath
protected transient javax.servlet.ServletContext servletcontext
protected static void setCache(DapCache cache)
protected static DapCache getCache()
public static void setBinaryWritelimit(long limit)
public void setServletContext(javax.servlet.ServletContext servletContext)
protected abstract void doFavicon(DapRequest drq, java.lang.String icopath) throws java.io.IOException
drq - The merged dap statejava.io.IOExceptionprotected abstract void doCapabilities(DapRequest drq) throws java.io.IOException
drq - The merged dap statejava.io.IOExceptionprotected abstract java.lang.String getResourcePath(DapRequest drq, java.lang.String relpath) throws java.io.IOException
drq - The wrapped request infojava.io.IOExceptionprotected abstract long getBinaryWriteLimit()
public void init()
throws javax.servlet.ServletException
init in class javax.servlet.GenericServletjavax.servlet.ServletExceptionpublic void handleRequest(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws java.io.IOException
java.io.IOExceptionprotected void doDSR(DapRequest drq) throws java.io.IOException
java.io.IOExceptionprotected void doDMR(DapRequest drq) throws java.io.IOException
drq - The merged dap statejava.io.IOExceptionprotected void doData(DapRequest drq) throws java.io.IOException
drq - The merged dap statejava.io.IOExceptionprotected void addCommonHeaders(DapRequest drq) throws java.io.IOException
java.io.IOExceptionprotected DapRequest getRequestState(javax.servlet.http.HttpServletRequest rq, javax.servlet.http.HttpServletResponse rsp) throws java.io.IOException
rq - A Servlet request objectrsp - A Servlet response objectjava.io.IOExceptionprotected void senderror(DapRequest drq, int httpcode, java.lang.Throwable t) throws java.io.IOException
drq - DapRequesthttpcode - 0=>no code specifiedt - exception that caused the error; may be nulljava.io.IOExceptionprotected CEConstraint buildconstraint(DapRequest drq, java.lang.String sce, dap4.core.dmr.DapDataset dmr) throws java.io.IOException
drq - sce - string of the constraintjava.io.IOException