org.autoplot.datasource.DataSourceRegistry

The DataSourceRegistry keeps the map from extension (like .cdf) to the handler for .cdf files.


getDataSourceEditorByExt

getDataSourceEditorByExt( String ext ) → Object

returns a String of DataSourceEditor for the extention. This should be used via DataSourceEditorPanelUtil. (This is introduced to remove the dependence on the swing library for clients that don't wish to use swing.)

Parameters

ext - a String

Returns:

an Object

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getDataSourceFormatEditorByExt

getDataSourceFormatEditorByExt( String ext ) → Object

Parameters

ext - a String

Returns:

java.lang.Object

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getDescriptionFor

getDescriptionFor( String vapext ) → String

return a description of the data source, if available. TODO: in the export data GUI, there's a bunch of these coded by hand.

Parameters

vapext - a String

Returns:

a String

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getFormatByExt

getFormatByExt( String extension ) → DataSourceFormat

return the formatter based on the extension.

Parameters

extension - the extension, e.g. .cdf

Returns:

the formatter found for this extension.

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getFormatterExtensions

getFormatterExtensions( ) → List

return a list of registered extensions the can format. These will contain the dot prefix.

Returns:

a list of registered extensions.

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getInstance

getInstance( ) → DataSourceRegistry

get the single instance of this class.

Returns:

the single instance of this class.

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getInstanceFromClassName

getInstanceFromClassName( String o ) → Object

get an instance of a class given the class name.

Parameters

o - the class name, e.g. org.autoplot.netCDF.HDF5DataSourceFormatEditorPanel

Returns:

an instance of the class.

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getPlugins

getPlugins( ) → List

Returns:

java.util.List

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getPluginsText

getPluginsText( ) → String

Returns:

java.lang.String

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getSource

getSource( String extension ) → DataSourceFactory

look up the source by its id. If a filename is provided, then the filename's extension is used, otherwise ".ext" or "ext" are accepted.

Parameters

extension - the extension, (e.g. ".cdf" or "/tmp/myfile.cdf")

Returns:

the DataSourceFactory which will create the reader.

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getSourceByMime

getSourceByMime( String mime ) → DataSourceFactory

Parameters

mime - a String

Returns:

org.autoplot.datasource.DataSourceFactory

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getSourceEditorExtensions

getSourceEditorExtensions( ) → List

return a list of registered extensions. These will contain the dot prefix.

Returns:

a list of registered extensions.

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getSourceExtensions

getSourceExtensions( ) → List

return a list of registered extensions. These will contain the dot prefix.

Returns:

a list of registered extensions.

[search for examples] [view on GitHub] [view on old javadoc] [view source]


hasParamOrder

hasParamOrder( String vapScheme ) → boolean

returns true if the vap scheme is known to require an order to the parameters. This was introduced to support makeCanonical, which would like to sort the URI parameters so the order does not matter, but then you cannot do this operation with vap+inline which is essentially a program where the order matters.

Parameters

vapScheme - a String

Returns:

true if the order of parameters matters.

[search for examples] [view on GitHub] [view on old javadoc] [view source]


hasResourceUri

hasResourceUri( String vapScheme ) → boolean

returns true if the vap scheme requires a resource URL. For example, vap+cdf: needs a resource URI (the file) but vap+inline doesn't.

Parameters

vapScheme - the scheme part of the Autoplot URI, or a URI.

Returns:

true if the vapScheme needs a URL.

[search for examples] [view on GitHub] [view on old javadoc] [view source]


hasSourceByExt

hasSourceByExt( String ext ) → boolean

return true if the source is registered.

Parameters

ext - a String

Returns:

if the source is registered.

[search for examples] [view on GitHub] [view on old javadoc] [view source]


hasSourceByMime

hasSourceByMime( String mime ) → boolean

return true if the source is registered by mime type. This is not used much.

Parameters

mime - a String

Returns:

true if the source is registered by mime type.

[search for examples] [view on GitHub] [view on old javadoc] [view source]


register

register( org.autoplot.datasource.DataSourceFactory factory, String extension ) → void

register the data source factory by extension

Parameters

factory - the factory (org.autoplot.foo.FooReaderFactory)
extension - the extension (e.g. ".foo")

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]

register( org.autoplot.datasource.DataSourceFactory factory, String extension, String mime ) → void
register( String className, String extension, String mime ) → void

registerDataSourceJar

registerDataSourceJar( String ext, java.net.URL jarFile ) → void

Register a data source at runtime, allowing the user to override the internal extentions. This allows, for example, a new version of a data source to be compared to the production.

Parameters

ext - if non-null, use this extension instead.
jarFile - the jar file, which must contain META-INF/org.autoplot.datasource.DataSourceFactory.extensions.

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


registerEditor

registerEditor( String className, String extension ) → void

register the data source editor by extension.

Parameters

className - the class name of the editor (e.g. "org.autoplot.cdf.CdfDataSourceEditorPanel")
extension - the extension (e.g. "cdf")

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


registerExtension

registerExtension( String className, String extension, String description ) → void

register the data source factory by extension. The name of the factory class is given, so that the class is not accessed until first use.

Parameters

className - the class name of the factory. (e.g. "org.autoplot.cdf.CdfJavaDataSourceFactory")
extension - the extension (e.g. "cdf")
description - a description of the format (e.g. "CDF files using java based reader")

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


registerFormatEditor

registerFormatEditor( String className, String extension ) → void

register the data source format editor by extension. This implements an editor for formatting.

Parameters

className - the class name of the editor (e.g. "org.autoplot.cdf.CdfDataSourceFormatEditorPanel")
extension - the extension (e.g. "cdf")

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


registerFormatter

registerFormatter( String className, String extension ) → void

register the data source factory by extension. The name of the factory class is given, so that the class is not accessed until first use.

Parameters

className - the class name of the formatter
extension - the extension (e.g. "cdf")

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


registerMimeType

registerMimeType( String className, String mimeType ) → void

Parameters

className - a String
mimeType - a String

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]