public class SolrUpdater extends StructureWriter
Constructor and Description |
---|
SolrUpdater(java.lang.String solrUrl)
Create an instance of a SolrUpdater for the specified URL
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear any stored settings and data
|
void |
close()
Close this writer.
|
java.lang.String |
getDestination()
Get the destination for this SolrUpdater.
|
static void |
main(java.lang.String[] args)
Utility main method for this class.
|
void |
setDebug(boolean flag)
Set the debug flag
|
void |
setDestination(java.lang.String destination)
Set the destination for this writer.
|
void |
setTimeZone(java.util.TimeZone zone)
Set the time zone for Date-Time values entered into Solr
|
void |
setWriteLimit(int limit)
Set the maximum number of records written to the server.
|
void |
updateData(java.util.Collection<DataRecord> records)
Update the solr instance with the set of records.
|
void |
writeCommand(java.lang.String cmd)
Write a command to the solr instance.
|
void |
writeData(java.util.Collection<DataRecord> records)
Write the collection of records to the Solr instance.
|
void |
writeGraph(Graph<DataRecord,DataRecord> graph)
Write graph data.
|
void |
writeGrid(Grid<DataRecord> grid)
Write Grid data
|
void |
writeTree(Tree<DataRecord> tree)
Write tree data
|
getContentType, getWriter, setWriter
public SolrUpdater(java.lang.String solrUrl)
solrUrl
- The update URL for the solr instancepublic void clear()
clear
in class StructureWriter
public void close()
public java.lang.String getDestination()
getDestination
in interface FormatWriter<DataRecord>
getDestination
in class WebFormatWriter<DataRecord>
public void setDebug(boolean flag)
flag
- the debug flagpublic void setDestination(java.lang.String destination)
setDestination
in interface FormatWriter<DataRecord>
setDestination
in class WebFormatWriter<DataRecord>
destination
- the destination for this writer.public void setTimeZone(java.util.TimeZone zone)
zone
- the time zonepublic void setWriteLimit(int limit)
limit
- the maximum number of records written with a single callpublic void updateData(java.util.Collection<DataRecord> records) throws java.io.IOException
records
- the set of recordsjava.io.IOException
- if there is a problem executing the requestpublic void writeCommand(java.lang.String cmd) throws java.io.IOException
cmd
- the command to writejava.io.IOException
- if there is a problem executing the requestpublic void writeData(java.util.Collection<DataRecord> records) throws java.io.IOException
records
- The collection of records to writejava.io.IOException
- if there is a problem executing the requestpublic void writeGraph(Graph<DataRecord,DataRecord> graph)
writeGraph
in class StructureWriter
graph
- the graphpublic void writeGrid(Grid<DataRecord> grid)
writeGrid
in class StructureWriter
grid
- the gridpublic void writeTree(Tree<DataRecord> tree)
writeTree
in class StructureWriter
tree
- the tree datapublic static void main(java.lang.String[] args) throws java.io.IOException
args
- command line arguments. The first argument should be the
address of the Solr serverjava.io.IOException
- if there is a problem writing to the server