## org.autoplot.datasource.DataSourceRecognizer

One-stop for guessing the data source type based on schemas and tags. Presently this recognizes just JSON and XML types, but might also be used to identify files by magic numbers (bytes f3 cd for CDF, ASCII %PDF for PDF).

## DataSourceRecognizer( )

## TYPE_HELM

## TYPE_SPASE

## TYPE_VOTABLE

## TYPE_MISC

## guessDataSourceType

guessDataSourceType( java.io.File f ) → String

identify the reader to use based on the internal schema of the file. This might look at XML schemas for performance, or might look for particular tags.

### Parameters

f - the JSON or XML file.

### Returns:

type, such as "vap+pds4" or null.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## guessDataSourceTypeJSON

guessDataSourceTypeJSON( java.io.File f ) → String

return the type, if recognized, of the JSON file.

### Parameters

f - a File

### Returns:

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

## guessDataSourceTypeXML

guessDataSourceTypeXML( java.io.File f ) → String

return the type for the XML file. Three types, SPASE, EventList, and VOTABLE are all handled by the vap+xmln, and the fourth is vap+pds4.

### Parameters

f - a File

### Returns:

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