SMILA 1.0 API documentation

org.eclipse.smila.ontology.records
Class SesameRecordReader

java.lang.Object
  extended by org.eclipse.smila.ontology.records.SesameRecordReader

public class SesameRecordReader
extends java.lang.Object

reads a record from a sesame ontology.

Author:
jschumacher

Constructor Summary
SesameRecordReader(RepositoryConnection repoConn, boolean includeInferred)
          create instance for connection.
 
Method Summary
 java.lang.String readBlackboardRecord(URI uri, Blackboard blackboard)
          read statements of given URI in repository into a new record on blackboard.
 void readBlackboardRecord(URI uri, Blackboard blackboard, java.lang.String id)
          read statements of given URI in repository into an existing record on blackboard.
 Record readRecord(URI uri)
          read statements of given URI in repository into a new record.
 void readRecord(URI uri, Record record)
          read statements of given URI in repository into an existing record.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SesameRecordReader

public SesameRecordReader(RepositoryConnection repoConn,
                          boolean includeInferred)
create instance for connection.

Parameters:
repoConn - a Sesame repository connection.
includeInferred - include inferred statements in reading
Method Detail

readBlackboardRecord

public java.lang.String readBlackboardRecord(URI uri,
                                             Blackboard blackboard)
                                      throws BlackboardAccessException,
                                             RepositoryException
read statements of given URI in repository into a new record on blackboard. Its ID will have SesameRecordHelper.SESAME_SOURCE as source and the URI as key.

Parameters:
uri - resource URI
blackboard - target blackboard
Returns:
record ID
Throws:
BlackboardAccessException - error writing to blackboard.
RepositoryException - error reading repository.

readBlackboardRecord

public void readBlackboardRecord(URI uri,
                                 Blackboard blackboard,
                                 java.lang.String id)
                          throws BlackboardAccessException,
                                 RepositoryException
read statements of given URI in repository into an existing record on blackboard. The URI will be set as attribute SesameRecordHelper.ATTRIBUTE_URI

Parameters:
uri - resource URI
blackboard - target blackboard
id - target record ID
Throws:
BlackboardAccessException - error writing to blackboard.
RepositoryException - error reading repository.

readRecord

public Record readRecord(URI uri)
                  throws RepositoryException
read statements of given URI in repository into a new record. Its ID will have SesameRecordHelper.SESAME_SOURCE as source and the URI as key.

Parameters:
uri - resource URI
Returns:
record ID
Throws:
RepositoryException - error reading repository.

readRecord

public void readRecord(URI uri,
                       Record record)
                throws RepositoryException
read statements of given URI in repository into an existing record. The URI will be set as attribute SesameRecordHelper.ATTRIBUTE_URI

Parameters:
uri - resource URI
record - target record
Throws:
RepositoryException - error reading repository.

SMILA 1.0 API documentation