org.topbraid.core.io
Class IO

java.lang.Object
  extended by org.topbraid.core.io.IO

public class IO
extends java.lang.Object


Field Summary
static java.lang.String PROXY_HOST
           
static java.lang.String PROXY_PORT
           
static java.lang.String USE_PROXY
           
 
Constructor Summary
IO()
           
 
Method Summary
static void avoidJ0(com.hp.hpl.jena.rdf.model.Model baseModel, com.hp.hpl.jena.ontology.OntModel ontModel)
          Finds all usages of an unprefixed property and - if an imported ontology defines a prefix for it - lifts the prefix into the base model.
static boolean hasUndeclaredPrefixes(com.hp.hpl.jena.rdf.model.Model model)
           
static boolean isNamespaceWithSeparator(java.lang.String str)
           
static com.hp.hpl.jena.graph.Graph load(java.net.URI uri, java.lang.Object logicalSource, org.eclipse.core.runtime.IProgressMonitor monitor)
           
static void loadImports(com.hp.hpl.jena.graph.Graph graph, java.net.URI baseURI, java.util.Set<java.net.URI> reachedURIs, org.eclipse.core.runtime.IProgressMonitor monitor)
           
static java.io.InputStream openURL(java.net.URL url)
           
static void prepareWriter(com.hp.hpl.jena.rdf.model.RDFWriter writer, java.lang.String language, java.lang.String baseURI)
           
static java.net.URL resolveURL(java.net.URI uri)
           
static void write(java.io.File file, com.hp.hpl.jena.rdf.model.Model baseModel, java.lang.String baseURI)
           
static void write(java.io.File f, com.hp.hpl.jena.rdf.model.Model baseModel, java.lang.String language, java.lang.String baseURI)
           
static void write(org.eclipse.core.resources.IFile file, com.hp.hpl.jena.rdf.model.Model baseModel, java.lang.String baseURI)
           
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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROXY_HOST

public static final java.lang.String PROXY_HOST
See Also:
Constant Field Values

PROXY_PORT

public static final java.lang.String PROXY_PORT
See Also:
Constant Field Values

USE_PROXY

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

IO

public IO()
Method Detail

avoidJ0

public static void avoidJ0(com.hp.hpl.jena.rdf.model.Model baseModel,
                           com.hp.hpl.jena.ontology.OntModel ontModel)
Finds all usages of an unprefixed property and - if an imported ontology defines a prefix for it - lifts the prefix into the base model.

Parameters:
baseModel - the base model (that is about to be saved)
ontModel - the OntModel that contains baseModel as base model

hasUndeclaredPrefixes

public static boolean hasUndeclaredPrefixes(com.hp.hpl.jena.rdf.model.Model model)

isNamespaceWithSeparator

public static boolean isNamespaceWithSeparator(java.lang.String str)

load

public static com.hp.hpl.jena.graph.Graph load(java.net.URI uri,
                                               java.lang.Object logicalSource,
                                               org.eclipse.core.runtime.IProgressMonitor monitor)
                                        throws java.lang.Exception
Throws:
java.lang.Exception

loadImports

public static void loadImports(com.hp.hpl.jena.graph.Graph graph,
                               java.net.URI baseURI,
                               java.util.Set<java.net.URI> reachedURIs,
                               org.eclipse.core.runtime.IProgressMonitor monitor)
                        throws java.lang.Exception
Throws:
java.lang.Exception

openURL

public static java.io.InputStream openURL(java.net.URL url)
                                   throws java.io.IOException
Throws:
java.io.IOException

resolveURL

public static java.net.URL resolveURL(java.net.URI uri)
                               throws java.net.MalformedURLException
Throws:
java.net.MalformedURLException

prepareWriter

public static void prepareWriter(com.hp.hpl.jena.rdf.model.RDFWriter writer,
                                 java.lang.String language,
                                 java.lang.String baseURI)

write

public static void write(java.io.File file,
                         com.hp.hpl.jena.rdf.model.Model baseModel,
                         java.lang.String baseURI)
                  throws java.io.IOException
Throws:
java.io.IOException

write

public static void write(org.eclipse.core.resources.IFile file,
                         com.hp.hpl.jena.rdf.model.Model baseModel,
                         java.lang.String baseURI)
                  throws java.io.IOException
Throws:
java.io.IOException

write

public static void write(java.io.File f,
                         com.hp.hpl.jena.rdf.model.Model baseModel,
                         java.lang.String language,
                         java.lang.String baseURI)
                  throws java.io.FileNotFoundException,
                         java.io.IOException
Throws:
java.io.FileNotFoundException
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)
                     throws java.io.IOException,
                            java.io.FileNotFoundException
Throws:
java.io.IOException
java.io.FileNotFoundException