public class Pds3DataSourceFactory extends AbstractDataSourceFactory
| Constructor and Description |
|---|
Pds3DataSourceFactory() |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<CompletionContext> |
getCompletions(CompletionContext cc,
ProgressMonitor mon)
return a list of context-sensitive completions.
|
static PDS3DataObject |
getDataObjectPds3(java.net.URL url,
java.lang.String name)
return information about how this data is stored in PDS3DataObject.
|
DataSource |
getDataSource(java.net.URI uri)
return a dataSource for the url
|
static org.w3c.dom.Document |
getDocumentWithImports(java.net.URL labelUrl)
read in the PDS label, resolving STRUCTURES which are loaded with a pointer.
|
static org.w3c.dom.Document |
getDocumentWithImports(java.net.URL labelUrl,
int depth)
read in the PDS label, resolving STRUCTURES which are loaded with a pointer.
|
protected static FilePointer |
getFileResource(java.net.URL labelFile,
ProgressMonitor mon) |
static java.net.URL |
identifyRoot(java.net.URL location)
identify the root of the volume.This was motivated by a LABL in SOFTWARE in a volume which
didn't have DATA, and I had everything mounted in /project/pds/mirror/DATA.The root will
often have DATA, DOCUMENT, and a README.txt file.
|
boolean |
reject(java.lang.String suri,
java.util.List<java.lang.String> problems,
ProgressMonitor mon)
quick check to see that an uri looks acceptable.
|
getCapability, getDescription, isFileResource, supportsDiscoverypublic DataSource getDataSource(java.net.URI uri) throws java.lang.Exception
DataSourceFactorygetDataSource in interface DataSourceFactorygetDataSource in class AbstractDataSourceFactoryuri - the URIjava.lang.Exception - any exception may occur.public static PDS3DataObject getDataObjectPds3(java.net.URL url, java.lang.String name) throws java.io.IOException, PDSException, javax.xml.xpath.XPathExpressionException
url - URL of labelname - the object namejava.io.IOExceptionPDSExceptionjavax.xml.xpath.XPathExpressionExceptionpublic boolean reject(java.lang.String suri,
java.util.List<java.lang.String> problems,
ProgressMonitor mon)
DataSourceFactoryreject in interface DataSourceFactoryreject in class AbstractDataSourceFactorysuri - the uri.problems - list to which problems should be added. TODO: human readable or PROB_TIMERANGE?mon - a progress monitor, for example to monitor a file download.public static org.w3c.dom.Document getDocumentWithImports(java.net.URL labelUrl)
throws java.io.IOException,
PDSException
labelUrl - the URL of the LABEL filejava.io.IOExceptionPDSExceptionpublic static java.net.URL identifyRoot(java.net.URL location)
throws FileSystem.FileSystemOfflineException,
java.net.UnknownHostException,
java.io.FileNotFoundException,
java.io.IOException
location - a location within the volumeFileSystem.FileSystemOfflineExceptionjava.net.UnknownHostExceptionjava.io.FileNotFoundExceptionjava.io.IOExceptionpublic static org.w3c.dom.Document getDocumentWithImports(java.net.URL labelUrl,
int depth)
throws java.io.IOException,
PDSException
labelUrl - the URL of the LABEL filedepth - number of levels deep, this is limited to 4.java.io.IOExceptionPDSExceptionprotected static FilePointer getFileResource(java.net.URL labelFile, ProgressMonitor mon) throws java.io.IOException, java.net.URISyntaxException, javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, javax.xml.xpath.XPathExpressionException, PDSException
java.io.IOExceptionjava.net.URISyntaxExceptionjavax.xml.parsers.ParserConfigurationExceptionorg.xml.sax.SAXExceptionjavax.xml.xpath.XPathExpressionExceptionPDSExceptionpublic java.util.List<CompletionContext> getCompletions(CompletionContext cc, ProgressMonitor mon) throws java.lang.Exception
DataSourceFactorygetCompletions in interface DataSourceFactorygetCompletions in class AbstractDataSourceFactorycc - the context for the completion.mon - a progress monitor, for example to monitor a file download.java.lang.Exception