org.pre4j.model
Class EncryptableModelBase

java.lang.Object
  extended by org.pre4j.model.EncryptableModelBase
All Implemented Interfaces:
com.hp.hpl.jena.rdf.model.Model, com.hp.hpl.jena.rdf.model.ModelCon, com.hp.hpl.jena.rdf.model.ModelGraphInterface, com.hp.hpl.jena.rdf.model.ModelLock, com.hp.hpl.jena.rdf.model.RDFReaderF, com.hp.hpl.jena.rdf.model.RDFWriterF, com.hp.hpl.jena.shared.Lock, com.hp.hpl.jena.shared.PrefixMapping, Encryptable, EncryptableModel
Direct Known Subclasses:
EncryptableModelImpl, EncryptableOntModelImpl

public abstract class EncryptableModelBase
extends java.lang.Object
implements EncryptableModel


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.hp.hpl.jena.shared.PrefixMapping
com.hp.hpl.jena.shared.PrefixMapping.Factory, com.hp.hpl.jena.shared.PrefixMapping.IllegalPrefixException, com.hp.hpl.jena.shared.PrefixMapping.JenaLockedException
 
Field Summary
protected  EncryptableGraph m_encGraph
           
 
Fields inherited from interface com.hp.hpl.jena.shared.PrefixMapping
Extended, Standard
 
Fields inherited from interface com.hp.hpl.jena.rdf.model.ModelLock
READ, WRITE
 
Constructor Summary
EncryptableModelBase()
           
 
Method Summary
 void commitEncryption(java.util.Collection<KeyInfo> keys)
           
 void commitEncryption(KeyInfo key)
           
 void decrypt(java.util.Collection<KeyInfo> keys)
           
 void decrypt(KeyInfo key)
           
 void encryptLabel(com.hp.hpl.jena.rdf.model.RDFNode n)
          Marks an URI or literal value of the given RDFNode for enryption.
 void encryptLabel(com.hp.hpl.jena.rdf.model.Statement s)
           
 void encryptStatement(com.hp.hpl.jena.rdf.model.Statement s)
           
 void encryptStatements(java.util.Collection<com.hp.hpl.jena.rdf.model.Statement> s)
           
 java.lang.String getTrace()
          Gets the trace of the encryption log.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.hp.hpl.jena.rdf.model.Model
abort, add, add, add, add, add, add, begin, close, commit, contains, contains, contains, containsAll, containsAll, containsAny, containsAny, containsResource, createList, createList, createList, createLiteral, createLiteral, createLiteral, createProperty, createReifiedStatement, createReifiedStatement, createResource, createResource, createResource, createStatement, createTypedLiteral, createTypedLiteral, createTypedLiteral, difference, equals, executeInTransaction, getAnyReifiedStatement, getModelLock, getProperty, getProperty, getReificationStyle, getRequiredProperty, getResource, independent, intersection, isEmpty, isIsomorphicWith, isReified, listNameSpaces, listObjects, listObjectsOfProperty, listObjectsOfProperty, listReifiedStatements, listReifiedStatements, listStatements, listStatements, listStatements, listSubjects, listSubjectsWithProperty, listSubjectsWithProperty, notifyEvent, query, read, read, read, read, read, read, read, register, remove, remove, remove, removeAll, removeAll, removeAllReifications, removeReification, size, supportsSetOperations, supportsTransactions, union, unregister, write, write, write, write, write, write
 
Methods inherited from interface com.hp.hpl.jena.rdf.model.ModelCon
add, add, add, add, add, add, add, add, add, add, add, contains, contains, contains, contains, contains, contains, contains, contains, createAlt, createAlt, createBag, createBag, createLiteral, createLiteral, createLiteral, createLiteral, createLiteral, createLiteral, createLiteral, createProperty, createResource, createResource, createResource, createResource, createSeq, createSeq, createStatement, createStatement, createStatement, createStatement, createStatement, createStatement, createStatement, createStatement, createStatement, createStatement, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, getAlt, getAlt, getBag, getBag, getProperty, getRDFNode, getResource, getSeq, getSeq, listStatements, listStatements, listStatements, listStatements, listStatements, listStatements, listStatements, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, remove, remove, remove
 
Methods inherited from interface com.hp.hpl.jena.rdf.model.ModelGraphInterface
asRDFNode, asStatement, getGraph, queryHandler
 
Methods inherited from interface com.hp.hpl.jena.rdf.model.RDFReaderF
getReader, getReader, setReaderClassName
 
Methods inherited from interface com.hp.hpl.jena.rdf.model.RDFWriterF
getWriter, getWriter, setWriterClassName
 
Methods inherited from interface com.hp.hpl.jena.shared.PrefixMapping
expandPrefix, getNsPrefixMap, getNsPrefixURI, getNsURIPrefix, lock, qnameFor, removeNsPrefix, samePrefixMappingAs, setNsPrefix, setNsPrefixes, setNsPrefixes, shortForm, usePrefix, withDefaultMappings
 
Methods inherited from interface com.hp.hpl.jena.shared.Lock
enterCriticalSection, leaveCriticalSection
 

Field Detail

m_encGraph

protected EncryptableGraph m_encGraph
Constructor Detail

EncryptableModelBase

public EncryptableModelBase()
Method Detail

commitEncryption

public void commitEncryption(java.util.Collection<KeyInfo> keys)
                      throws RDFEncryptionException
Specified by:
commitEncryption in interface Encryptable
Throws:
RDFEncryptionException
See Also:
org.pre4j.model.EncryptableModel#commitEncryption(java.util.List)

commitEncryption

public void commitEncryption(KeyInfo key)
                      throws RDFEncryptionException
Specified by:
commitEncryption in interface Encryptable
Throws:
RDFEncryptionException
See Also:
Encryptable.commitEncryption(org.pre4j.crypto.KeyInfo)

decrypt

public void decrypt(java.util.Collection<KeyInfo> keys)
             throws RDFEncryptionException
Specified by:
decrypt in interface Encryptable
Throws:
RDFEncryptionException
See Also:
org.pre4j.model.EncryptableModel#decrypt(java.util.List)

decrypt

public void decrypt(KeyInfo key)
             throws RDFEncryptionException
Specified by:
decrypt in interface Encryptable
Throws:
RDFEncryptionException
See Also:
Encryptable.decrypt(org.pre4j.crypto.KeyInfo)

encryptLabel

public void encryptLabel(com.hp.hpl.jena.rdf.model.RDFNode n)
                  throws RDFEncryptionException
Description copied from interface: EncryptableModel
Marks an URI or literal value of the given RDFNode for enryption. Note: RDFNode must be a subject or object component. In order to encrypt the label of a predicate component use the EncryptableModel.encryptLabel(Statement) method. The node value MUST be either a URI or a literal. B-nodes cannot be label encrypted since they do not have a label. If a B-node is given as argument of this method will cause an RDFEncryptionException.

Specified by:
encryptLabel in interface EncryptableModel
Parameters:
n - the URI or literal node value to be encrypted
Throws:
RDFEncryptionException - if n is a B-node.
See Also:
EncryptableModel.encryptLabel(com.hp.hpl.jena.rdf.model.RDFNode)

encryptLabel

public void encryptLabel(com.hp.hpl.jena.rdf.model.Statement s)
                  throws RDFEncryptionException
Specified by:
encryptLabel in interface EncryptableModel
Throws:
RDFEncryptionException

encryptStatement

public void encryptStatement(com.hp.hpl.jena.rdf.model.Statement s)
                      throws RDFEncryptionException
Specified by:
encryptStatement in interface EncryptableModel
Throws:
RDFEncryptionException
See Also:
EncryptableModel.encryptStatement(com.hp.hpl.jena.rdf.model.Statement)

encryptStatements

public void encryptStatements(java.util.Collection<com.hp.hpl.jena.rdf.model.Statement> s)
                       throws RDFEncryptionException
Specified by:
encryptStatements in interface EncryptableModel
Throws:
RDFEncryptionException
See Also:
EncryptableModel.encryptStatements(java.util.Collection)

getTrace

public java.lang.String getTrace()
Description copied from interface: Encryptable
Gets the trace of the encryption log.

Specified by:
getTrace in interface Encryptable