|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DataTranslationIF
This interface defines the Data Translation Web Service (DTWS) APIs that
can be called by Java or non-Java clients. The APIs are implemented using
the Sun's Java Web Services Development Pack (JWSDP), and they use the
RPC-encoded WSDL binding style. The Web Service Description Language (WSDL)
for the DTWS services can be found at
http://translators.gsfc.nasa.gov/dt/dtservice?WSDL.
If you would like to call any of the DTWS services in your application,
you'll need a stub that acts as a proxy for the remote DTWS Web services.
Many programming languages nowadays understand WSDL and can use this
file to invoke the DTWS service. For example, the WSDL can be imported into
Microsoft's .NET or it can be directly used by Perl SOAP::Lite. If you are
developing a client in Java, there are many tools that can generate the
client stub from a WSDL file. For example, the 'wscompile' tool included
in the Sun's JWDSP can be used to generate the client stub you need.
We have generated a static stub that you can use in your Java client
application, and it is available at
http://translators.gsfc.nasa.gov/pub/dtws/dtServiceStub.jar.
There also is a of
sample Java program in this diectory
(http://translators.gsfc.nasa.gov/pub/dtws) that shows how the DTWS
services can be called for translating local and remote files.
The endpoint address for the DTWS services is
http://translators.gsfc.nasa.gov/dt/dtservice, and a client must
establish a connection before it can make a request for a particular service
call. For example, the following code creates a stub and connect to the
DTWS service that resides at http://translators.gsfc.nasa.gov/dt/dtservice.
String dtServiceEndPoint = "http://translators.gsfc.nasa.gov/dt/dtservice"; try { javax.xml.rpc.Stub stub = (javax.xml.rpc.Stub)(new DataTranslationService_Impl().getDataTranslationIFPort()); } catch (Exception ex) { ..... } stub._setProperty(javax.xml.rpc.Stub.ENDPOINT_ADDRESS_PROPERTY, dtServiceEndPoint); dt = (DataTranslationIF) stub; String outputURL; outputURL = dt.translateRemoteFile(inputFileName, translationMode, "");
For user's convenience, the Space Physics Data Facility (SPDF) located at
Goddard Space Flight Center has developed a Web-based client through which
one can translate one or more local and/or remote files. The client is
available at http://translators.gsfc.nasa.gov.
Note: The Java virtual machine on the server may not be able to
handle large files due to memeory constraints, and it is hily recommeded
that users download individual trnaslator(s) of choice from
http://cdf.gsfc.nasa.gov/html/dtws.html#download and run the program
locally.
Method Summary | |
---|---|
java.lang.String |
isDeployed()
Perform a check to see if the Data Translation Web Service is deployed. |
java.lang.String |
translateFile(javax.activation.DataHandler dh,
java.lang.String fileName,
java.lang.String translationMode,
java.lang.String email)
Translates a single file (local or remote) using the default mapping file (if applicable). |
java.lang.String[] |
translateFiles(javax.activation.DataHandler[] dhArray,
java.lang.String[] fileNames,
java.lang.String[] translationModes,
java.lang.String email)
Translates one or more local and/or remote files using the default mapping files (if applicable). |
java.lang.String[] |
translateFileswithMappings(javax.activation.DataHandler[] dhArray,
java.lang.String[] fileNames,
java.lang.String[] translationModes,
javax.activation.DataHandler[] mappingFileDHs,
java.lang.String[] mappingFileNames,
java.lang.String[] mappingFileModes,
java.lang.String email)
Translates one or more local and/or remote files using the user-specified mapping files. |
java.lang.String |
translateFilewithMapping(javax.activation.DataHandler dh,
java.lang.String fileName,
java.lang.String translationMode,
javax.activation.DataHandler mappingFileDH,
java.lang.String mappingFileName,
java.lang.String mappingFileMode,
java.lang.String email)
Translates a single file (local or remote) using the user-specified mapping file. |
java.lang.String |
translateRemoteFile(java.lang.String fileName,
java.lang.String translationMode,
java.lang.String email)
Translates a file that resides on a remote machine using the default mapping file (if applicable). |
java.lang.String[] |
translateRemoteFiles(java.lang.String[] fileNames,
java.lang.String[] translationModes,
java.lang.String email)
Translates one or more remote files using the default mapping file (if applicable). |
java.lang.String[] |
translateRemoteFileswithMappings(java.lang.String[] fileNames,
java.lang.String[] translationModes,
java.lang.String[] mappingFileNames,
java.lang.String[] mappingFileModes,
java.lang.String email)
Translates one or more remote files using the user-specified mapping files that reside on remote machine(s). |
java.lang.String |
translateRemoteFilewithMapping(java.lang.String fileName,
java.lang.String translationMode,
java.lang.String mappingFileName,
java.lang.String email)
Translates a remote file using the user-specified mapping file that resides on a remote machine. |
Method Detail |
---|
java.lang.String translateRemoteFile(java.lang.String fileName, java.lang.String translationMode, java.lang.String email) throws java.rmi.RemoteException
fileName
- the name of the remote file to be translated (e.g
ftp://nssdc.gsfc.nasa.gov/mydata.cdf)translationMode
- the data translation mode that should be one of
the following:
where CDFML is a CDF Markup Language that is a XML representation of CDF. The FITS-ARRAY translation mode dumps the contents of a FITS image to a file.
email
- the email address to be notified upon completion of the
data translation. The eamil will contain the name of
the translated file(s) along with URLs. This parameter is
optional. If you don't want to be notified, set the value
of this parameter to "null" or an empty string "".
java.rmi.RemoteException
- if a problem occurred accessing this
remote procedure call.java.lang.String translateRemoteFilewithMapping(java.lang.String fileName, java.lang.String translationMode, java.lang.String mappingFileName, java.lang.String email) throws java.rmi.RemoteException
fileName
- the name of the remote file to be translated (e.g
ftp://nssdc.gsfc.nasa.gov/mydata.cdf)translationMode
- the data translation mode that should be one of
the following:
where CDFML is a CDF Markup Language that is a XML representation of CDF. The FITS-ARRAY translation mode dumps the contents of a FITS image to a file.
mappingFileName
- the name of the remote mapping file nameemail
- the email address to be notified upon completion of the
data translation. The eamil will contain the name of
the translated file(s) along with URLs. This parameter is
optional. If you don't want to be notified, set the value
of this parameter to "null" or an empty string "".
java.rmi.RemoteException
- if a problem occurred accessing this
remote procedure call.java.lang.String translateFile(javax.activation.DataHandler dh, java.lang.String fileName, java.lang.String translationMode, java.lang.String email) throws java.rmi.RemoteException
dh
- the DataHandler object that contains the input file
fileName
- the name of the file to be translated translationMode
- the data translation mode that should be one of
the following:
where CDFML is a CDF Markup Language that is a XML representation of CDF. The FITS-ARRAY translation mode dumps the contents of a FITS image to a file.
email
- the email address to be notified upon completion of the
data translation. The eamil will contain the name of
the translated file(s) along with URLs. This parameter is
optional. If you don't want to be notified, set the value
of this parameter to "null" or an empty string "".
java.rmi.RemoteException
- if a problem occurred accessing this
remote procedure call.java.lang.String translateFilewithMapping(javax.activation.DataHandler dh, java.lang.String fileName, java.lang.String translationMode, javax.activation.DataHandler mappingFileDH, java.lang.String mappingFileName, java.lang.String mappingFileMode, java.lang.String email) throws java.rmi.RemoteException
dh
- the DataHandler object that contains the input file
fileName
- the name of the file to be translated translationMode
- the data translation mode that should be one of
the following:
where CDFML is a CDF Markup Language that is a XML representation of CDF. The FITS-ARRAY translation mode dumps the contents of a FITS image to a file.
mappingFileDH
- the DataHandler object that contains the user
specified mapping file mappingFileName
- the mapping file name mappingFileMode
- the mapping file mode to be applied to the
input file (fileName) that should be one of the
following:
If the value of this parameter is not the same as translationMode, the user-specified mapping file is ignored and the default mapping is used.
email
- the email address to be notified upon completion of the
data translation. The eamil will contain the name of
the translated file(s) along with URLs. This parameter is
optional. If you don't want to be notified, set the value
of this parameter to "null" or an empty string "".
java.rmi.RemoteException
- if a problem occurred accessing this
remote procedure call.java.lang.String[] translateRemoteFiles(java.lang.String[] fileNames, java.lang.String[] translationModes, java.lang.String email) throws java.rmi.RemoteException
fileNames
- a string array that contains the full pathname of
the input files
(e.g. ftp://nssdc.gsfc.nasa.gov/mydata.cdf) to be
translatedtranslationModes
- an array of the data translation mode. The
following are the valid translation modes:
where CDFML is a CDF Markup Language that is a XML representation of CDF. The FITS-ARRAY translation mode dumps the contents of a FITS image to a file.
email
- the email address to be notified upon completion of the
data translation. The eamil will contain the name of
the translated file(s) along with URLs. This parameter is
optional. If you don't want to be notified, set the value
of this parameter to "null" or an empty string "".
java.rmi.RemoteException
- if a problem occurred accessing this
remote procedure call.java.lang.String[] translateRemoteFileswithMappings(java.lang.String[] fileNames, java.lang.String[] translationModes, java.lang.String[] mappingFileNames, java.lang.String[] mappingFileModes, java.lang.String email) throws java.rmi.RemoteException
fileNames
- a string array that contains the full pathname of
the input files
(e.g. ftp://nssdc.gsfc.nasa.gov/mydata.cdf) to be
translatedtranslationModes
- an array of the data translation mode. The
following are the valid translation modes:
where CDFML is a CDF Markup Language that is a XML representation of CDF. The FITS-ARRAY translation mode dumps the contents of a FITS image to a file.
mappingFileNames
- the name of the remote mapping filesmappingFileModes
- an array of the mapping file modes to be applied
to 'fileNames'. The following are the valid
mapping file modes:
The number of mapping file modes should match the number of mapping files provided in mappingFileNames, but it doesn't have to match the number of input files (specified in fileNames) as one or more files can share the same mapping file.
email
- the email address to be notified upon completion of the
data translation. The eamil will contain the name of
the translated file(s) along with URLs. This parameter is
optional. If you don't want to be notified, set the value
of this parameter to "null" or an empty string "".
java.rmi.RemoteException
- if a problem occurred accessing this
remote procedure call.java.lang.String[] translateFiles(javax.activation.DataHandler[] dhArray, java.lang.String[] fileNames, java.lang.String[] translationModes, java.lang.String email) throws java.rmi.RemoteException
dhArray
- an array of the DataHandler object that contains the
input files
fileNames
- a string array that contains the name of the input
files
translationModes
- an array of the data translation mode. The
value of each element should be one of the
following:
where CDFML is a CDF Markup Language that is a XML representation of CDF. The FITS-ARRAY translation mode dumps the contents of a FITS image to a file.
email
- the email address to be notified upon completion of the
data translation. The eamil will contain the name of
the translated file(s) along with URLs. This parameter is
optional. If you don't want to be notified, set the value
of this parameter to "null" or an empty string "".
java.rmi.RemoteException
- if a problem occurred accessing this
remote procedure call.java.lang.String[] translateFileswithMappings(javax.activation.DataHandler[] dhArray, java.lang.String[] fileNames, java.lang.String[] translationModes, javax.activation.DataHandler[] mappingFileDHs, java.lang.String[] mappingFileNames, java.lang.String[] mappingFileModes, java.lang.String email) throws java.rmi.RemoteException
dhArray
- an array of the DataHandler object that contains the
input files
fileNames
- a string array that contains the name of the
input filestranslationModes
- an array of the data translation mode. The
value of each element should be one of the
following:
where CDFML is a CDF Markup Language that is a XML representation of CDF. The FITS-ARRAY translation mode dumps the contents of a FITS image to a file.
mappingFileDHs
- an array of the DataHandler object that contains
the user specified mapping files mappingFileNames
- an array of the the mapping file namesmappingFileModes
- an array of the mapping file modes to be applied
to 'fileNames'. The mapping file mode should be
one of the following:
The number of mapping file modes should match the number of mapping files provided in mappingFileNames, but it doesn't have to match the number of input files (specified in fileNames) as one or more files can share the same mapping file.
email
- the email address to be notified upon completion of the
data translation. The eamil will contain the name of
the translated file(s) along with URLs. This parameter is
optional. If you don't want to be notified, set the value
of this parameter to "null" or an empty string "".
java.rmi.RemoteException
- if a problem occurred accessing this
remote procedure call.java.lang.String isDeployed() throws java.rmi.RemoteException
java.rmi.RemoteException
- if a problem occurred accessing this
remote procedure call.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |