org.topbraid.core.io
Class N3GraphStore

java.lang.Object
  extended by org.topbraid.core.io.AbstractGraphStore
      extended by org.topbraid.core.io.JenaFileGraphStore
          extended by org.topbraid.core.io.N3GraphStore
All Implemented Interfaces:
IGraphStore

public class N3GraphStore
extends JenaFileGraphStore

A JenaFileGraphStore based on the N3 serialization.

Author:
Holger Knublauch

Field Summary
static java.lang.String SUFFIX
           
 
Constructor Summary
N3GraphStore()
           
 
Method Summary
protected  void doSave(java.io.OutputStream os, com.hp.hpl.jena.rdf.model.Model model, java.lang.String baseURI)
           
 java.net.URI getBaseURI(org.eclipse.core.resources.IFile file, java.util.Set<java.net.URI> imports)
          Gets the declared base URI and the owl:imports of a given file.
 void save(org.eclipse.core.resources.IFile file, com.hp.hpl.jena.graph.Graph graph, java.lang.String baseURI)
           
 
Methods inherited from class org.topbraid.core.io.JenaFileGraphStore
close, getImageMetadata, isReadOnly, load, saveAs
 
Methods inherited from class org.topbraid.core.io.AbstractGraphStore
getFileExtensions, loadN3, loadProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SUFFIX

public static final java.lang.String SUFFIX
See Also:
Constant Field Values
Constructor Detail

N3GraphStore

public N3GraphStore()
Method Detail

doSave

protected void doSave(java.io.OutputStream os,
                      com.hp.hpl.jena.rdf.model.Model model,
                      java.lang.String baseURI)
Overrides:
doSave in class JenaFileGraphStore

getBaseURI

public java.net.URI getBaseURI(org.eclipse.core.resources.IFile file,
                               java.util.Set<java.net.URI> imports)
                        throws java.lang.Exception
Description copied from interface: IGraphStore
Gets the declared base URI and the owl:imports of a given file. For example, in the standard file back-end this would use file introspection to check the declared xml:base and the owl:imports of the owl:Ontology.

Specified by:
getBaseURI in interface IGraphStore
Overrides:
getBaseURI in class JenaFileGraphStore
Parameters:
file - the file to get the base URI of
imports - an initially empty Set that will contain imported URIs
Returns:
the base URI
Throws:
java.lang.Exception

save

public void save(org.eclipse.core.resources.IFile file,
                 com.hp.hpl.jena.graph.Graph graph,
                 java.lang.String baseURI)
          throws java.io.IOException
Specified by:
save in interface IGraphStore
Overrides:
save in class JenaFileGraphStore
Throws:
java.io.IOException