public class SolrAccessor extends RecordAccessor
Constructor and Description |
---|
SolrAccessor() |
Modifier and Type | Method and Description |
---|---|
protected DataRecord |
createReferenceNode(DataRecord referrer,
java.lang.String name,
FieldDesc<?> desc)
Derive a data record for inclusion in a graph, tree, or other structure
based upon a referring node.
|
boolean |
extendGraph(java.lang.String graphName,
Graph<DataRecord,DataRecord> graph,
DataRecord node)
Extend the given graph around the specified node.
|
boolean |
extendTree(java.lang.String treeName,
Tree<DataRecord> tree,
DataRecord node)
Extend the given tree around the specified node.
|
protected java.util.Set<DataRecord> |
retrieveRecords(DataTemplate template)
Retrieve a set of data records for a particular DataTemplate.
|
void |
setInitParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
Set any initialization parameters required by this data accessor.
|
void |
setQuery(java.lang.String queryString)
Set the query string used to retrieve records.
|
addFieldHandler, addToGraph, addToTree, getDataset, getFieldHandler, getGraph, getGrid, getMaxRecords, getReasoner, getStructureReasoners, getTree, setMaxRecords, setReasoner, setReasoner
addStructure, addTemplate, getDatasetNames, getGraphNames, getGridNames, getSpec, getStructureType, getTemplate, getTemplateNames, getTreeNames, setConfig, setConfigFile, setConfigFile
protected DataRecord createReferenceNode(DataRecord referrer, java.lang.String name, FieldDesc<?> desc)
createReferenceNode
in class RecordAccessor
referrer
- the data record containing the reference to the nodename
- The name for the new Data Record. This should be one of the
values of the dimensiondesc
- The field descriptor for the field containing the reference.public boolean extendGraph(java.lang.String graphName, Graph<DataRecord,DataRecord> graph, DataRecord node)
extendGraph
in interface DataAccessor<DataRecord,DataRecord>
extendGraph
in class RecordAccessor
graphName
- The name of the graphgraph
- The graph to extendnode
- The node to use as an extension point.public boolean extendTree(java.lang.String treeName, Tree<DataRecord> tree, DataRecord node)
extendTree
in interface DataAccessor<DataRecord,DataRecord>
extendTree
in class RecordAccessor
treeName
- The name of the graphtree
- The graph to extendnode
- The node to use as an extension point.protected java.util.Set<DataRecord> retrieveRecords(DataTemplate template)
retrieveRecords
in class RecordAccessor
template
- The data template specifying field mappings and
descriptionspublic void setInitParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
Set any initialization parameters required by this data accessor. The
key for the only parameters are solrQueryUrl
, which should
contain the base URL for Solr queries, and the optional
defaultQuery
, which indicates the default query for the
accessor. If it is not set, the query matching all records is used.
If this accessor has not been initialized with data templates and data structure specifications, this method will try to read the schema from the Solr instance, and create a default data set representation from the schema.
parameters
- a map of initialization parameterspublic void setQuery(java.lang.String queryString)
setQuery
in class AbstractDataAccessor<DataRecord,DataRecord>
queryString
- the query string