org.autoplot.datasource.CompletionContext

models a part of a dataset's URI. This class is used to serve as both the input and output of completion engines. An incomplete completion context is passed in, and the engine returns a set of more complete contexts. This process could be repeated to define a tree, where the leaf nodes are valid datasets urls.

CompletionContext( )

create an empty completion proposal.

CompletionContext( Object context, String completable )

Object containing a completion proposal.

CompletionContext( Object context, String completable, org.autoplot.datasource.DataSourceFactory owner, String implicitName, String label, String doc )

Object containing a completion proposal.

CompletionContext( Object context, String completable, org.autoplot.datasource.DataSourceFactory owner, String implicitName )

Object containing a completion proposal.

CompletionContext( Object context, String completable, String doc )

Object containing a completion proposal.

CompletionContext( Object context, String completable, String label, String doc )

Object containing a completion proposal.

CompletionContext( Object context, String completable, org.autoplot.datasource.DataSourceFactory owner, String implicitName, String doc )

Object containing a completion proposal.

CompletionContext( Object context, String completable, org.autoplot.datasource.DataSourceFactory owner, String implicitName, String label, String doc, boolean maybePlot )

Object containing a completion proposal.


CONTEXT_AUTOPLOT_SCHEME


CONTEXT_FILESYSTEM

file resource, which is a URL and doesn't include AP Scheme.


CONTEXT_FILE

file resource, which is a URL and doesn't include AP Scheme.


CONTEXT_PARAMETER_NAME


CONTEXT_PARAMETER_VALUE


surl

the url in its incomplete state


surlpos

the position of the carot within the url


resourceURI

resource file URI, no params (and no "vap:" schema), starting with http, sftp, etc.


params

params parsed


context

the context identifier enum for the completion. See CONTEXT_FILESYSTEM, CONTEXT_FILE, CONTEXT_PARAMETER_NAME, CONTEXT_PARAMETER_VALUE, etc.


completable

The string to be completed


completablepos

the position of the carot within the string


implicitName

used to identify the group the parameter implicitly specifies. For example, in ftp://cdaweb.gsfc.nasa.gov/pub/istp/noaa/noaa14/%Y/noaa14_meped1min_sem_%Y%m%d_v01.cdf?T01_gsmB&timerange=2000-01-01 T01_gsmB is part of the implicit group "id" of the cdf data source factory.


doc

one-line documentation


label

label identifying the proposal, to be understood within the context of surl and the insertion point.


maybePlot

hint that this completion should finish a valid URL, so go ahead and try to use it.


get

get( Object context, org.autoplot.datasource.CompletionContext cc ) → String

returns the value for the context

 
 cc= new CompletionContext();
 cc.surl= vap:http://www.autoplot.org/data/myfile.dat?param1=aaa¶m2=bbb
 cc.completable= b
 cc.surlpos= 63
 get( CONTEXT_PARAMETER_NAME, cc ) ->  param2
 get( CONTEXT_FILE, cc ) ->  http://www.autoplot.org/data/myfile.dat
 
 

Parameters

context - an Object
cc - a CompletionContext

Returns:

java.lang.String

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


insert

insert( org.autoplot.datasource.CompletionContext cc, org.autoplot.datasource.CompletionContext ccnew ) → String

"ftp://cdaweb.gsfc.nasa.gov/pub/istp/noaa/noaa14/%Y/noaa14_meped1min_sem_%Y%m%d_v01.cdf?timerange=2000-01-01" "ftp://cdaweb.gsfc.nasa.gov/pub/istp/noaa/noaa14/%Y/noaa14_meped1min_sem_%Y%m%d_v01.cdf?Epoch&timerange=2000-01-01"

Parameters

cc - a CompletionContext
ccnew - a CompletionContext

Returns:

java.lang.String

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


toString

toString( ) → String

Returns:

java.lang.String

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