|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectopendap.dap.DConnect
public class DConnect
This class provides support for common OPeNDAP client-side operations such as dereferencing a OPeNDAP URL, communicating network activity status to the user and reading local OPeNDAP objects.
Unlike its C++ counterpart, this class does not store instances of the DAS, DDS, etc. objects. Rather, the methodsgetDAS
, etc. return
instances of those objects.
Constructor Summary | |
---|---|
DConnect(java.io.InputStream is)
Creates an instance bound to an already open InputStream . |
|
DConnect(java.lang.String urlString)
Creates an instance bound to url which accepts compressed documents. |
|
DConnect(java.lang.String urlString,
boolean acceptDeflate)
Creates an instance bound to url. |
Method Summary | |
---|---|
java.lang.String |
CE()
Returns the constraint expression supplied with the URL given to the constructor. |
void |
getBlobData(DataDDS dds,
StatusUI statusUI)
Opens the BLOB uRL in the DDS supplied and deserializes that binary content sent from the server cooresponding to the DDS. |
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,
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. |
DataDDS |
getDataFromUrl(java.net.URL url,
StatusUI statusUI,
BaseTypeFactory btf)
|
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. |
DataDDS |
getDDXData(StatusUI statusUI)
Returns the `Data object' from the dataset referenced by this object's URL given the constraint expression CE. |
DataDDS |
getDDXData(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 |
getDDXData(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 |
getDDXDataFromURL(java.net.URL url,
StatusUI statusUI,
BaseTypeFactory btf)
Returns the `Data object' from the dataset referenced by this object's URL given the constraint expression CE. |
ServerVersion |
getServerVersion()
Returns the ServerVersion of the last connection. |
boolean |
isLocal()
Returns whether a file name or InputStream is being used
instead of a URL. |
void |
setServerVersion(int major,
int minor)
|
java.lang.String |
URL()
Returns the URL supplied to the constructor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DConnect(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.DConnect(String, boolean)
public DConnect(java.lang.String urlString, boolean acceptDeflate) 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. If urlString is not a valid URL,
it is assumed to be a filename, which is opened.acceptDeflate
- true if this client can accept responses encoded
with deflate.
java.io.FileNotFoundException
- thrown if urlString
is not
a valid URL, or a filename which exists on the system.public DConnect(java.io.InputStream is)
InputStream
.
is
- the InputStream
to open.Method Detail |
---|
public void setServerVersion(int major, int minor)
public final boolean isLocal()
InputStream
is being used
instead of a URL.
InputStream
is being used.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 DAS getDAS() throws java.net.MalformedURLException, java.io.IOException, ParseException, DASException, DAP2Exception
java.net.MalformedURLException
- if the URL given to the
constructor has an error
java.io.IOException
- if an error connecting to the remote server
ParseException
- if the DAS parser returned an error
DASException
- on an error constructing the DAS
DAP2Exception
- if an error returned by the remote serverpublic DDS getDDS() throws java.net.MalformedURLException, java.io.IOException, ParseException, DDSException, DAP2Exception
java.net.MalformedURLException
- if the URL given to the constructor
has an error
java.io.IOException
- if an error connecting to the remote server
ParseException
- if the DDS parser returned an error
DDSException
- on an error constructing the DDS
DAP2Exception
- if an error returned by the remote serverpublic DDS getDDS(java.lang.String CE) throws java.net.MalformedURLException, java.io.IOException, ParseException, DDSException, DAP2Exception
java.net.MalformedURLException
- if the URL given to the constructor
has an error
java.io.IOException
- if an error connecting to the remote server
ParseException
- if the DDS parser returned an error
DDSException
- on an error constructing the DDS
DAP2Exception
- if an error returned by the remote serverpublic DDS getDDX() throws java.net.MalformedURLException, java.io.IOException, ParseException, DDSException, DAP2Exception
java.net.MalformedURLException
- if the URL given to the constructor
has an error
java.io.IOException
- if an error connecting to the remote server
ParseException
- if the DDS parser returned an error
DDSException
- on an error constructing the DDS
DAP2Exception
- if an error returned by the remote serverThis class/method is associated with pre-release version of the DDX API. It is experimental and is subject to (significant) change.
public DDS getDDX(java.lang.String CE) throws java.net.MalformedURLException, java.io.IOException, ParseException, DDSException, DAP2Exception
CE
-
java.net.MalformedURLException
- if the URL given to the constructor
has an error
java.net.MalformedURLException
java.io.IOException
- if an error connecting to the remote server
ParseException
- if the DDS parser returned an error
DDSException
- on an error constructing the DDS
DAP2Exception
- if an error returned by the remote serverThis class/method is associated with pre-release version of the DDX API. It is experimental and is subject to (significant) change.
public DataDDS getDataDDX() throws java.net.MalformedURLException, java.io.IOException, ParseException, DDSException, DAP2Exception
java.net.MalformedURLException
- if the URL given to the constructor
has an error
java.io.IOException
- if an error connecting to the remote server
ParseException
- if the DDS parser returned an error
DDSException
- on an error constructing the DDS
DAP2Exception
- if an error returned by the remote serverThis class/method is associated with pre-release version of the DDX API. It is experimental and is subject to (significant) change.
public 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 error
java.io.IOException
- if an error connecting to the remote server
ParseException
- if the DDS parser returned an error
DDSException
- on an error constructing the DDS
DAP2Exception
- if an error returned by the remote serverThis class/method is associated with pre-release version of the DDX API. It is experimental and is subject to (significant) change.
public 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 error
java.io.IOException
- if an error connecting to the remote server
ParseException
- if the DDS parser returned an error
DDSException
- on an error constructing the DDS
DAP2Exception
- if an error returned by the remote serverBaseTypeFactory
This class/method is associated with pre-release version of the DDX API. It is experimental and is subject to (significant) change.
public 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).
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 error
java.io.IOException
- if any error connecting to the remote server
ParseException
- if the DDS parser returned an error
DDSException
- on an error constructing the DDS
DAP2Exception
- if any error returned by the remote serverpublic DataDDS getDDXData(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).
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 error
java.io.IOException
- if any error connecting to the remote server
ParseException
- if the DDS parser returned an error
DDSException
- on an error constructing the DDS
DAP2Exception
- if any error returned by the remote serverThis class/method is associated with pre-release version of the DDX API. It is experimental and is subject to (significant) change.
public void getBlobData(DataDDS dds, StatusUI statusUI) throws java.net.MalformedURLException, java.io.IOException, ParseException, DDSException, DAP2Exception
dds
- The DDS containing the BLOB URL and into which the BLOB
(serialized binary content) will be deserialized.statusUI
- the StatusUI
object to use for GUI updates
and user cancellation notification (may be null).
java.net.MalformedURLException
- if the URL given to the constructor
has an error
java.io.IOException
- if any error connecting to the remote server
ParseException
- if the DDS parser returned an error
DDSException
- on an error constructing the DDS
DAP2Exception
- if any error returned by the remote serverpublic DataDDS getDDXDataFromURL(java.net.URL url, StatusUI statusUI, BaseTypeFactory btf) throws java.io.IOException, ParseException, DDSException, DAP2Exception
url
- The complete URL of the dataset. Constraint Expression included.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 error
java.io.IOException
- if any error connecting to the remote server
ParseException
- if the DDS parser returned an error
DDSException
- on an error constructing the DDS
DAP2Exception
- if any error returned by the remote serverThis class/method is associated with pre-release version of the DDX API. It is experimental and is subject to (significant) change.
public DataDDS getDataFromUrl(java.net.URL url, StatusUI statusUI, BaseTypeFactory btf) throws java.net.MalformedURLException, java.io.IOException, ParseException, DDSException, DAP2Exception
java.net.MalformedURLException
java.io.IOException
ParseException
DDSException
DAP2Exception
public 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 error
java.io.IOException
- if any error connecting to the remote server
ParseException
- if the DDS parser returned an error
DDSException
- on an error constructing the DDS
DAP2Exception
- if any error returned by the remote serverpublic DataDDS getDDXData(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 error
java.io.IOException
- if any error connecting to the remote server
ParseException
- if the DDS parser returned an error
DDSException
- on an error constructing the DDS
DAP2Exception
- if any error returned by the remote serverThis class/method is associated with pre-release version of the DDX API. It is experimental and is subject to (significant) change.
public 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 error
java.io.IOException
- if any error connecting to the remote server
ParseException
- if the DDS parser returned an error
DDSException
- on an error constructing the DDS
DAP2Exception
- if any error returned by the remote servergetData(String, StatusUI,BaseTypeFactory)
public final DataDDS getDDXData(StatusUI statusUI) throws java.net.MalformedURLException, java.io.IOException, ParseException, DDSException, DAP2Exception
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 error
java.io.IOException
- if any error connecting to the remote server
ParseException
- if the DDS parser returned an error
DDSException
- on an error constructing the DDS
DAP2Exception
- if any error returned by the remote serverThis class/method is associated with pre-release version of the DDX API. It is experimental and is subject to (significant) change.
public final ServerVersion getServerVersion()
ServerVersion
of the last connection.
ServerVersion
of the last connection.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |