public class DConnect2
extends java.lang.Object
getDAS, etc. return
instances of those objects.| Constructor and Description |
|---|
DConnect2(java.io.InputStream stream) |
DConnect2(java.lang.String urlString)
Creates an instance bound to url which accepts compressed documents.
|
DConnect2(java.lang.String urlString,
boolean acceptCompress)
Creates an instance bound to url.
|
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
captureDataDDS(java.io.InputStream is) |
static java.lang.String |
captureStream(java.io.InputStream is) |
java.lang.String |
CE()
Returns the constraint expression supplied with the URL given to the
constructor.
|
void |
closeSession() |
DAS |
getDAS()
Returns the DAS object from the dataset referenced by this object's URL.
|
DataDDS |
getData(StatusUI statusUI)
Return the data object with no local constraint expression.
|
DataDDS |
getData(java.lang.String CE) |
DataDDS |
getData(java.lang.String CE,
StatusUI statusUI)
Returns the `Data object' from the dataset referenced by this object's
URL given the constraint expression CE.
|
DataDDS |
getData(java.lang.String CE,
StatusUI statusUI,
BaseTypeFactory btf)
Returns the `Data object' from the dataset referenced by this object's
URL given the constraint expression CE.
|
DataDDS |
getDataDDX()
Returns the DataDDS object from the dataset referenced by this object's URL.
|
DataDDS |
getDataDDX(java.lang.String CE)
Returns the DataDDS object from the dataset referenced by this object's URL.
|
DataDDS |
getDataDDX(java.lang.String CE,
BaseTypeFactory btf)
Returns the DataDDS object from the dataset referenced by this object's URL.
|
DDS |
getDDS()
Returns the DDS object from the dataset referenced by this object's URL.
|
DDS |
getDDS(java.lang.String CE)
Returns the DDS object from the dataset referenced by this object's URL.
|
DDS |
getDDX()
Returns the DDS object from the dataset referenced by this object's URL.
|
DDS |
getDDX(java.lang.String CE)
Returns the DDS object from the dataset referenced by this object's URL.
|
java.lang.String |
getLastExtendedHeader() |
java.lang.String |
getLastModifiedHeader() |
java.lang.String |
getLastModifiedInvalidHeader() |
ServerVersion |
getServerVersion()
Returns the
ServerVersion of the last connection. |
boolean |
isLocal() |
static void |
main(java.lang.String[] args) |
static void |
setAllowSessions(boolean b) |
void |
setServerVersion(int major,
int minor) |
java.lang.String |
URL()
Returns the URL supplied to the constructor.
|
public DConnect2(java.lang.String urlString)
throws java.io.FileNotFoundException
urlString - connect to this URL.java.io.FileNotFoundException - thrown if urlString is not
a valid URL, or a filename which exists on the system.public DConnect2(java.lang.String urlString,
boolean acceptCompress)
throws java.io.FileNotFoundException
acceptDeflate is true
then HTTP Request headers will indicate to servers that this client can
accept compressed documents.urlString - Connect to this URL.acceptCompress - true if this client will accept compressed responsesjava.io.FileNotFoundException - thrown if urlString is not
a valid URL, or a filename which exists on the system.public DConnect2(java.io.InputStream stream)
throws DAP2Exception
DAP2Exceptionpublic static void setAllowSessions(boolean b)
public void setServerVersion(int major,
int minor)
public boolean isLocal()
public final java.lang.String CE()
String.
Note that the CE supplied to one of this object's constructors is
"sticky"; it will be used with every data request made with this object.
The CE passed to getData, however, is not sticky; it is used
only for that specific request. This method returns the sticky CE.public final java.lang.String URL()
public void closeSession()
public static java.lang.String captureStream(java.io.InputStream is)
throws java.io.IOException
java.io.IOExceptionpublic static java.lang.String captureDataDDS(java.io.InputStream is)
throws java.io.IOException
java.io.IOExceptionpublic final ServerVersion getServerVersion()
ServerVersion of the last connection.ServerVersion of the last connection.public java.lang.String getLastModifiedHeader()
public java.lang.String getLastModifiedInvalidHeader()
public java.lang.String getLastExtendedHeader()
public DAS getDAS() throws java.io.IOException, DAP2Exception
java.net.MalformedURLException - if the URL given to the
constructor has an errorjava.io.IOException - if an error connecting to the remote serverDASException - on an error constructing the DASDAP2Exception - if an error returned by the remote serverpublic DDS getDDS() throws java.io.IOException, ParseException, DAP2Exception
java.net.MalformedURLException - if the URL given to the constructor
has an errorjava.io.IOException - if an error connecting to the remote serverParseException - if the DDS parser returned an errorDDSException - on an error constructing the DDSDAP2Exception - if an error returned by the remote serverpublic DDS getDDS(java.lang.String CE) throws java.io.IOException, ParseException, DAP2Exception
CE - The constraint expression to be applied to this request by the
server. This is combined with any CE given in the constructor.java.net.MalformedURLException - if the URL given to the constructor
has an errorjava.io.IOException - if an error connecting to the remote serverParseException - if the DDS parser returned an errorDDSException - on an error constructing the DDSDAP2Exception - if an error returned by the remote serverpublic DDS getDDX() throws java.io.IOException, ParseException, DAP2Exception
java.net.MalformedURLException - if the URL given to the constructor
has an errorjava.io.IOException - if an error connecting to the remote serverParseException - if the DDS parser returned an errorDDSException - on an error constructing the DDSDAP2Exception - if an error returned by the remote serverpublic DDS getDDX(java.lang.String CE) throws java.io.IOException, ParseException, DDSException, DAP2Exception
CE - The constraint expression to be applied to this request by the
server. This is combined with any CE given in the constructor.java.net.MalformedURLException - if the URL given to the constructor
has an errorjava.io.IOException - if an error connecting to the remote serverParseException - if the DDS parser returned an errorDDSException - on an error constructing the DDSDAP2Exception - if an error returned by the remote serverpublic DataDDS getDataDDX() throws java.net.MalformedURLException, java.io.IOException, ParseException, DDSException, DAP2Exception
java.net.MalformedURLException - if the URL given to the constructor
has an errorjava.io.IOException - if an error connecting to the remote serverParseException - if the DDS parser returned an errorDDSException - on an error constructing the DDSDAP2Exception - if an error returned by the remote serverpublic DataDDS getDataDDX(java.lang.String CE) throws java.net.MalformedURLException, java.io.IOException, ParseException, DDSException, DAP2Exception
CE - The constraint expression to use for this request.java.net.MalformedURLException - if the URL given to the constructor
has an errorjava.io.IOException - if an error connecting to the remote serverParseException - if the DDS parser returned an errorDDSException - on an error constructing the DDSDAP2Exception - if an error returned by the remote serverpublic DataDDS getDataDDX(java.lang.String CE, BaseTypeFactory btf) throws java.net.MalformedURLException, java.io.IOException, ParseException, DDSException, DAP2Exception
CE - The constraint expression to use for this request.btf - The BaseTypeFactory to build the member
variables in the DDS with.java.net.MalformedURLException - if the URL given to the constructor
has an errorjava.io.IOException - if an error connecting to the remote serverParseException - if the DDS parser returned an errorDDSException - on an error constructing the DDSDAP2Exception - if an error returned by the remote serverBaseTypeFactorypublic DataDDS getData(java.lang.String CE, StatusUI statusUI, BaseTypeFactory btf) throws java.net.MalformedURLException, java.io.IOException, ParseException, DDSException, DAP2Exception
CE - The constraint expression to be applied to this request by the
server. This is combined with any CE given in the constructor.statusUI - the StatusUI object to use for GUI updates
and user cancellation notification (may be null).btf - The BaseTypeFactory to build the member
variables in the DDS with.DataDDS object that results from applying the
given CE, combined with this object's sticky CE, on the referenced
dataset.java.net.MalformedURLException - if the URL given to the constructor
has an errorjava.io.IOException - if any error connecting to the remote serverParseException - if the DDS parser returned an errorDDSException - on an error constructing the DDSDAP2Exception - if any error returned by the remote serverpublic DataDDS getData(java.lang.String CE) throws java.io.IOException, ParseException, DAP2Exception
java.io.IOExceptionParseExceptionDAP2Exceptionpublic DataDDS getData(java.lang.String CE, StatusUI statusUI) throws java.net.MalformedURLException, java.io.IOException, ParseException, DDSException, DAP2Exception
CE - The constraint expression to be applied to this request by the
server. This is combined with any CE given in the constructor.statusUI - the StatusUI object to use for GUI updates
and user cancellation notification (may be null).DataDDS object that results from applying the
given CE, combined with this object's sticky CE, on the referenced
dataset.java.net.MalformedURLException - if the URL given to the constructor
has an errorjava.io.IOException - if any error connecting to the remote serverParseException - if the DDS parser returned an errorDDSException - on an error constructing the DDSDAP2Exception - if any error returned by the remote serverpublic final DataDDS getData(StatusUI statusUI) throws java.net.MalformedURLException, java.io.IOException, ParseException, DDSException, DAP2Exception
getData("", statusUI).statusUI - the StatusUI object to use for GUI updates
and user cancellation notification (may be null).DataDDS object that results from applying
this object's sticky CE, if any, on the referenced dataset.java.net.MalformedURLException - if the URL given to the constructor
has an errorjava.io.IOException - if any error connecting to the remote serverParseException - if the DDS parser returned an errorDDSException - on an error constructing the DDSDAP2Exception - if any error returned by the remote serverpublic static void main(java.lang.String[] args)
args - command line arguments