Title: RDF from the Java Perspective
1RDF from the Java Perspective
2Three-Step Recipe
- Create RDF metadata in Java.
- Serialize my RDF to RDF/XML.
- Interface with the information service?
- Library support
- Jena (com.hp.hpl.jena.rdf.model)
- HttpClient (org.apache.commons.httpclient)
3Data Stream Management
- Collection of metadata
- Statistics
- Content-Provider
- Optimization
- Use of information service
- Metadata storage
- Query interface
4Data Sources in Data Stream Management
Content-Providers
- Publish multiple data streams
- Content-Provider metadata
- ID
- Stream metadata
- ID
- Structural information (DTD)
- Frequency
5Queries on Metadata
- Which streams are in general available at content
providers? - Which streams are availabe at content provider
notekemper15.informatik.tu-muenchen.de? - Which content providers serve the stream with
identifier stream-1? - What is the DTD of stream-1 at notekemper15?
6The RDF Model
7Creating the RDF Model in Java
- Create Model-Instance
- Resources
- notekemper15 (ContentProvider)
- stream-1 (Stream)
- Properties
- dtd, frequency (of streams)
- Creating Triples (Subject, Predicate, Object)
- (notekemper15, stream, stream-1)
- (stream-1, dtd, lt!ELEMENT strom (element)gt)
8Creating the RDF-XML
- RDFWriter serializes RDF-Model
ltrdfRDF xmlnsj.0"http//www.gac-grid.org/na
mespaces/streaming/" xmlnsrdf"http//www.w3.
org/1999/02/22-rdf-syntax-ns" gt
ltrdfDescription rdfabout"http//notekemper15.in
formatik.tu-muenchen.de8080/wsrf/services/streamg
lobe/ContentProviderFactory"gt
ltj.0idgtTUMlt/j.0idgt ltj.0stream
rdfresource"stream-2"/gt
ltj.0stream rdfresource"stream-1"/gt
lt/rdfDescriptiongt ltrdfDescription
rdfabout"stream-2"gt
ltj.0idgtstream-2lt/j.0idgt
ltj.0dtdgtlt!ELEMENT stream (row)gtlt/j.0dtdgt
ltj.0frequencygt3lt/j.0frequencygt
lt/rdfDescriptiongt ltrdfDescription
rdfabout"stream-1"gt
ltj.0idgtstream-1lt/j.0idgt
ltj.0dtdgtlt!ELEMENT strom (row)gtlt/j.0dtdgt
ltj.0frequencygt11lt/j.0frequencygt
lt/rdfDescriptiongt lt/rdfRDFgt
9Connecting the Information Service
- Create new HttpClient
- Create PutMethod to access Information
Servicehttp//mintaka.aip.de24000/context/stream
ing - Set content of PutMethod to generated RDF/XML
- Execute the PutMethod with the HttpClient
10Submit Query to Information Service
- Return all Content-Providers and their available
streams including stream-ids and Document Type
Definitions - PREFIX streamlthttp//www.gac-grid.org/namespa
ces/streaming/gt PREFIX rdflthttp//www.w3.org/1999
/02/22-rdf-syntax-nsgtSELECT ?cp ?stream ?id
?dtd WHERE ?cp streamstream ?stream .
?stream streamid ?id .
?stream streamdtd ?dtd .
11RDF Workshop
- Thank You for Your Attention!
- Further Questions?