org.topbraidcomposer.core.io
Class TBCIO
java.lang.Object
org.topbraidcomposer.core.io.TBCIO
- All Implemented Interfaces:
- PreferenceConstants
public class TBCIO
- extends java.lang.Object
- implements PreferenceConstants
A Singleton to load models from files or the Web.
- Author:
- Holger Knublauch
|
Constructor Summary |
TBCIO()
|
|
Method Summary |
static TBCIO |
get()
|
java.io.LineNumberInputStream |
getInputStream()
Gets the current input stream (only possible at load-time). |
void |
loadImportedModels(com.hp.hpl.jena.rdf.model.Model rootModel,
java.net.URI rootURI,
org.eclipse.core.runtime.IProgressMonitor monitor)
|
com.hp.hpl.jena.rdf.model.Model |
loadModel(java.net.URI baseURI)
|
com.hp.hpl.jena.rdf.model.Model |
loadModel(java.net.URI uri,
java.lang.Object logicalSource,
org.eclipse.core.runtime.IProgressMonitor monitor)
|
void |
loadModelAndImportsWithProgressMonitor(org.eclipse.core.resources.IFile file,
org.eclipse.jface.operation.IRunnableWithProgress andThen)
|
void |
loadModelAndImportsWithProgressMonitor(java.lang.Object file,
java.net.URI baseURI,
org.eclipse.jface.operation.IRunnableWithProgress andThen)
Loads a given file and its imports in a progress monitor dialog. |
static boolean |
write(org.eclipse.core.resources.IFile file,
com.hp.hpl.jena.rdf.model.Model baseModel,
java.lang.String baseURI,
boolean confirmOverwrite)
|
static boolean |
write(org.eclipse.core.resources.IFile file,
com.hp.hpl.jena.rdf.model.Model baseModel,
java.lang.String language,
java.lang.String baseURI,
boolean confirmOverwrite)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TBCIO
public TBCIO()
get
public static TBCIO get()
getInputStream
public java.io.LineNumberInputStream getInputStream()
- Gets the current input stream (only possible at load-time).
- Returns:
- the InputStream
loadImportedModels
public void loadImportedModels(com.hp.hpl.jena.rdf.model.Model rootModel,
java.net.URI rootURI,
org.eclipse.core.runtime.IProgressMonitor monitor)
throws java.lang.Exception
- Throws:
java.lang.Exception
loadModel
public com.hp.hpl.jena.rdf.model.Model loadModel(java.net.URI baseURI)
throws java.lang.Exception
- Throws:
java.lang.Exception
loadModel
public com.hp.hpl.jena.rdf.model.Model loadModel(java.net.URI uri,
java.lang.Object logicalSource,
org.eclipse.core.runtime.IProgressMonitor monitor)
throws java.lang.Exception
- Throws:
java.lang.Exception
loadModelAndImportsWithProgressMonitor
public void loadModelAndImportsWithProgressMonitor(org.eclipse.core.resources.IFile file,
org.eclipse.jface.operation.IRunnableWithProgress andThen)
loadModelAndImportsWithProgressMonitor
public void loadModelAndImportsWithProgressMonitor(java.lang.Object file,
java.net.URI baseURI,
org.eclipse.jface.operation.IRunnableWithProgress andThen)
- Loads a given file and its imports in a progress monitor dialog.
The method makes sure that everything is cleanly registered etc.
- Parameters:
file - the file to load (either an IFile or a java.io.File)andThen - a Runnable that shall be executed after the loading has succeeded
write
public static boolean write(org.eclipse.core.resources.IFile file,
com.hp.hpl.jena.rdf.model.Model baseModel,
java.lang.String baseURI,
boolean confirmOverwrite)
throws java.io.IOException
- Throws:
java.io.IOException
write
public static boolean write(org.eclipse.core.resources.IFile file,
com.hp.hpl.jena.rdf.model.Model baseModel,
java.lang.String language,
java.lang.String baseURI,
boolean confirmOverwrite)
throws java.io.IOException
- Throws:
java.io.IOException