NonLiteral cplNode = getConceptProviderListNode(contentGraph);
GraphNode cplGraphNode = new GraphNode(cplNode, contentGraph);
cplGraphNode.deleteNodeContext();
cplNode = getConceptProviderListNode(contentGraph);
RdfList cpl = new RdfList(cplNode, contentGraph);
int length = types.size();
for (int i=0; i<length; i++) {
UriRef conceptProviderType = new UriRef(types.get(i));
BNode conceptProvider = new BNode();
contentGraph.add(new TripleImpl(conceptProvider, RDF.type,
conceptProviderType));
if (conceptProviderType.equals(CONCEPTS.LocalConceptProvider)) {
contentGraph.add(new TripleImpl(conceptProvider,
CONCEPTS.selectedScheme,
new UriRef(conceptSchemes.get(i))));
} else {
contentGraph.add(new TripleImpl(conceptProvider,
CONCEPTS.sparqlEndPoint,
new UriRef(sparqlEndPoints.get(i))));
String defaultGraph = defaultGraphs.get(i);
if (!defaultGraph.trim().isEmpty()) {
contentGraph.add(new TripleImpl(conceptProvider,
CONCEPTS.defaultGraph,
new UriRef(defaultGraph)));
}
contentGraph.add(new TripleImpl(conceptProvider,
CONCEPTS.queryTemplate,
LiteralFactory.getInstance().createTypedLiteral(
queryTemplates.get(i))));
}
cpl.add(i, conceptProvider);
}
instantiateConceptProviders();
return Response.status(Status.OK).build();
}