public class CommonMLAccessor extends RecordAccessor
| Constructor and Description |
|---|
CommonMLAccessor() |
| Modifier and Type | Method and Description |
|---|---|
void |
addFile(java.io.File file)
Adds a file to this accessor.
|
void |
addFile(java.lang.String fileName)
Adds a file by name to this accessor.
|
void |
addUrl(java.net.URL url)
Adds a file by url to this accessor.
|
java.util.Set<DataRecord> |
getDataset(java.lang.String datasetName)
Retrieves the named dataset.
|
Graph<DataRecord,DataRecord> |
getGraph(java.lang.String graphName)
Retrieves the named graph.
|
Grid<DataRecord> |
getGrid(java.lang.String gridName)
Retrieves the named grid.
|
Tree<DataRecord> |
getTree(java.lang.String treeName)
Retrieves the named tree.
|
Graph<DataRecord,DataRecord> |
parseGraphML(java.io.InputStream inStream,
java.lang.String graphName)
Parses a stream containing a graphML format, and returns the graph with
the matching name.
|
Tree<DataRecord> |
parseTreeML(java.io.InputStream inStream)
Parses a stream containing a treeML format, and returns the tree
contained in the treeML data
|
protected java.util.Set<DataRecord> |
retrieveRecords(DataTemplate template)
Stub implementation of retrieveRecords.
|
void |
setInitParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
Set initialization parameters.
|
void |
setQuery(java.lang.String query)
Set the query string used to retrieve records.
|
addFieldHandler, addToGraph, addToTree, createReferenceNode, extendGraph, extendTree, getFieldHandler, getMaxRecords, getReasoner, getStructureReasoners, setMaxRecords, setReasoner, setReasoneraddStructure, addTemplate, getDatasetNames, getGraphNames, getGridNames, getSpec, getStructureType, getTemplate, getTemplateNames, getTreeNames, setConfig, setConfigFile, setConfigFilepublic void addFile(java.io.File file)
throws java.io.IOException,
org.xml.sax.SAXException
file - the filejava.io.IOException - Signals that an I/O exception has occurred.org.xml.sax.SAXException - if there is a problem with the XML formatpublic void addFile(java.lang.String fileName)
throws java.io.IOException,
org.xml.sax.SAXException
fileName - the file namejava.io.IOException - Signals that an I/O exception has occurred.org.xml.sax.SAXException - if there is a problem with the XML formatpublic void addUrl(java.net.URL url)
throws java.io.IOException,
org.xml.sax.SAXException
url - the url to the filejava.io.IOException - Signals that an I/O exception has occurred.org.xml.sax.SAXException - if there is a problem with the XML formatjava.lang.IllegalArgumentException - if the file is in an unsupported
format.public java.util.Set<DataRecord> getDataset(java.lang.String datasetName)
getDataset in interface DataAccessor<DataRecord,DataRecord>getDataset in class RecordAccessordatasetName - the name of the datasetpublic Graph<DataRecord,DataRecord> getGraph(java.lang.String graphName)
getGraph in interface DataAccessor<DataRecord,DataRecord>getGraph in class RecordAccessorgraphName - the name of the graphpublic Grid<DataRecord> getGrid(java.lang.String gridName)
getGrid in interface DataAccessor<DataRecord,DataRecord>getGrid in class RecordAccessorgridName - the name of the gridpublic Tree<DataRecord> getTree(java.lang.String treeName)
getTree in interface DataAccessor<DataRecord,DataRecord>getTree in class RecordAccessortreeName - the name of the treepublic Graph<DataRecord,DataRecord> parseGraphML(java.io.InputStream inStream, java.lang.String graphName) throws org.xml.sax.SAXException, java.io.IOException
inStream - the input stream to read fromgraphName - the name of the graphorg.xml.sax.SAXException - if there is a problem parsing the graphMLjava.io.IOException - if there is a problem with the input streampublic Tree<DataRecord> parseTreeML(java.io.InputStream inStream) throws org.xml.sax.SAXException, java.io.IOException
inStream - the input stream to read fromorg.xml.sax.SAXException - if there is a problem parsing the treeMLjava.io.IOException - if there is a problem with the input streamprotected java.util.Set<DataRecord> retrieveRecords(DataTemplate template)
retrieveRecords in class RecordAccessortemplate - the DataTemplatepublic void setInitParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
parameters - initialization parameter mappublic void setQuery(java.lang.String query)
setQuery in class AbstractDataAccessor<DataRecord,DataRecord>query - the query string