Working with the VirtualGraph Metadata Extension

This section contains a short guide on how to work with VirtualGraph metadata.

The basic idea for this short guide: you may set up the virtual graph metadata extension on the entry graph in the RDF data unit.

As a result, such metadata is then recognized by Core DPUs. For more information about virtual graph metadata, symbolic names and entries, refer to: Basic Concepts for DPU Developers

For example, the loader to Virtuoso may use such metadata, if properly set and transmitted by preceding DPUs, to automatically load each entry graph to a different target graph in the target Virtuoso.

The code below shows how you may set up the virtual graph extension http://myNewGraphName for the selected RDF entry graph with the symbolic name symbolicName.

import eu.unifiedviews.helpers.dataunit.virtualgraph.VirtualGraphHelper;
import eu.unifiedviews.helpers.dataunit.virtualgraph.VirtualGraphHelpers;

//first create helper over certain (output) RDF data unit
VirtualGraphHelper helper = VirtualGraphHelpers.create(dataUnit);

try {

  //to set virtual graph for the given symbolic name of the output entry
  //for information about symbolic names, please see:
  helper.setVirtualGraph(symbolicName, http://myNewGraphName);

} finally {