public abstract class AbstractSolrLoader extends Object
Modifier and Type | Field and Description |
---|---|
protected OWLGraphWrapper |
graph |
protected com.google.gson.Gson |
gson |
protected org.apache.solr.client.solrj.SolrServer |
server |
Constructor and Description |
---|
AbstractSolrLoader(org.apache.solr.client.solrj.SolrServer server) |
AbstractSolrLoader(String url) |
Modifier and Type | Method and Description |
---|---|
protected void |
add(org.apache.solr.common.SolrInputDocument doc) |
protected void |
addAll(Collection<org.apache.solr.common.SolrInputDocument> dl) |
protected void |
addAllAndCommit() |
boolean |
addFieldUnique(org.apache.solr.common.SolrInputDocument d,
String field,
String val) |
String |
addLabelField(org.apache.solr.common.SolrInputDocument d,
String field,
String id)
Resolve the list of id to a label and add it to the doc.
|
List<String> |
addLabelFields(org.apache.solr.common.SolrInputDocument d,
String field,
List<String> ids)
Resolve the list of ids to labels and add them to the doc.
|
protected void |
addToServer(Collection<org.apache.solr.common.SolrInputDocument> docs) |
OWLGraphWrapper |
getGraph() |
protected void |
incrementalAddAndCommit() |
abstract void |
load() |
void |
setGraph(OWLGraphWrapper graph) |
protected org.apache.solr.client.solrj.SolrServer server
protected OWLGraphWrapper graph
protected com.google.gson.Gson gson
public AbstractSolrLoader(org.apache.solr.client.solrj.SolrServer server)
public AbstractSolrLoader(String url) throws MalformedURLException
MalformedURLException
public OWLGraphWrapper getGraph()
public void setGraph(OWLGraphWrapper graph)
public boolean addFieldUnique(org.apache.solr.common.SolrInputDocument d, String field, String val)
d
- field
- val
- public String addLabelField(org.apache.solr.common.SolrInputDocument d, String field, String id)
d
- field
- id
- public List<String> addLabelFields(org.apache.solr.common.SolrInputDocument d, String field, List<String> ids)
d
- field
- ids
- public abstract void load() throws org.apache.solr.client.solrj.SolrServerException, IOException
org.apache.solr.client.solrj.SolrServerException
IOException
protected void add(org.apache.solr.common.SolrInputDocument doc)
protected void addAll(Collection<org.apache.solr.common.SolrInputDocument> dl)
protected void addAllAndCommit() throws org.apache.solr.client.solrj.SolrServerException, IOException
org.apache.solr.client.solrj.SolrServerException
IOException
protected void incrementalAddAndCommit() throws org.apache.solr.client.solrj.SolrServerException, IOException
org.apache.solr.client.solrj.SolrServerException
IOException
protected void addToServer(Collection<org.apache.solr.common.SolrInputDocument> docs) throws org.apache.solr.client.solrj.SolrServerException, IOException
org.apache.solr.client.solrj.SolrServerException
IOException
Copyright © 2010–2015. All rights reserved.