The Semantic Data Stream Manager uses the Tupelo concept of contexts as logical sets of data and metadata (see tupelo contexts). To enable the use of time annotations in a context you need to wrap a regular context with a streaming-capable context. Semantic Data Stream Manager provides to mechamism for the creation of these wrappers:

  1. Directly instantiating a context and context wrapper via java code.
  2. By specifying context configuration through xml files.

For the moment we will use xml files. The following code creates an in-memory context:

import org.tupeloproject.kernel.Context;
import edu.uiuc.ncsa.datastream.util.ContextParser;
import java.io.File;
// ...
Context context = ContextParser.parseContext(new File("contextDescription.xml"));

The file contextDescription.xml contains a description for an in-memory context, which allows creating and querying time-annotated (and regular) triples and blobs:

<?xml version="1.0" encoding="UTF-8"?>
<context class="edu.uiuc.ncsa.datastream.context.impl.StreamMemoryContext">
</context>
  • No labels