org.openjena.riot
Class IRIResolver

java.lang.Object
  extended by org.openjena.riot.IRIResolver

public abstract class IRIResolver
extends java.lang.Object

Package up IRI reolver functionality.


Field Summary
static com.hp.hpl.jena.iri.IRIFactory iriFactory
          The IRI checker setup - more than usual Jena but not full IRI.
 
Method Summary
static boolean checkIRI(java.lang.String iriStr)
          Check an IRI string (does not resolve it)
static com.hp.hpl.jena.iri.IRI chooseBaseURI()
          Choose a base URI based on the current directory
static com.hp.hpl.jena.iri.IRI chooseBaseURI(java.lang.String baseURI)
          Choose a baseURI based on a suggestion
static IRIResolver create()
           
static IRIResolver create(com.hp.hpl.jena.iri.IRI baseIRI)
           
static IRIResolver create(java.lang.String baseStr)
           
static IRIResolver createNoResolve()
           
 java.lang.String getBaseIRIasString()
           
static com.hp.hpl.jena.iri.IRI parseIRI(java.lang.String iriStr)
          Parse an IRI (does not resolve it)
abstract  com.hp.hpl.jena.iri.IRI resolve(java.lang.String uriStr)
          Create a URI, resolving relative IRIs, and throw exception on bad a IRI
static com.hp.hpl.jena.iri.IRI resolve(java.lang.String relStr, java.lang.String baseStr)
          Create resolve a URI against a base.
static java.lang.String resolveFileURL(java.lang.String filename)
          Turn a filename into a well-formed file: URL relative to the working directory.
static com.hp.hpl.jena.iri.IRI resolveGlobal(java.lang.String str)
          Resolve the relative URI str against the current global base.
static java.lang.String resolveGlobalToString(java.lang.String str)
          Resolve the relative URI str against the current global base.
abstract  com.hp.hpl.jena.iri.IRI resolveSilent(java.lang.String uriStr)
          Create a URI, resolving relative IRIs, but do not throw exception on bad a IRI
abstract  java.lang.String resolveToString(java.lang.String uriStr)
           
static void suppressExceptions()
          To allow Eyeball to bypass IRI checking (because it's doing its own)
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

iriFactory

public static com.hp.hpl.jena.iri.IRIFactory iriFactory
The IRI checker setup - more than usual Jena but not full IRI.

Method Detail

checkIRI

public static boolean checkIRI(java.lang.String iriStr)
Check an IRI string (does not resolve it)


parseIRI

public static com.hp.hpl.jena.iri.IRI parseIRI(java.lang.String iriStr)
Parse an IRI (does not resolve it)


resolveGlobal

public static com.hp.hpl.jena.iri.IRI resolveGlobal(java.lang.String str)
Resolve the relative URI str against the current global base.

Parameters:
str -
Returns:
IRI

resolveGlobalToString

public static java.lang.String resolveGlobalToString(java.lang.String str)
Resolve the relative URI str against the current global base.

Parameters:
str -
Returns:
String

resolveFileURL

public static java.lang.String resolveFileURL(java.lang.String filename)
                                       throws com.hp.hpl.jena.iri.IRIException
Turn a filename into a well-formed file: URL relative to the working directory.

Parameters:
filename -
Returns:
String The filename as an absolute URL
Throws:
com.hp.hpl.jena.iri.IRIException

resolve

public static com.hp.hpl.jena.iri.IRI resolve(java.lang.String relStr,
                                              java.lang.String baseStr)
                                       throws RiotException
Create resolve a URI against a base. If baseStr is a relative file IRI then it is first resolved against the current working directory.

Parameters:
relStr -
baseStr - Can be null if relStr is absolute
Returns:
String An absolute URI
Throws:
RiotException - If result would not be legal, absolute IRI

create

public static IRIResolver create()

create

public static IRIResolver create(java.lang.String baseStr)

create

public static IRIResolver create(com.hp.hpl.jena.iri.IRI baseIRI)

createNoResolve

public static IRIResolver createNoResolve()

suppressExceptions

public static void suppressExceptions()
To allow Eyeball to bypass IRI checking (because it's doing its own)


chooseBaseURI

public static com.hp.hpl.jena.iri.IRI chooseBaseURI()
Choose a base URI based on the current directory

Returns:
String Absolute URI

chooseBaseURI

public static com.hp.hpl.jena.iri.IRI chooseBaseURI(java.lang.String baseURI)
Choose a baseURI based on a suggestion

Returns:
IRI (if relative, relative to current working directory).

getBaseIRIasString

public java.lang.String getBaseIRIasString()

resolve

public abstract com.hp.hpl.jena.iri.IRI resolve(java.lang.String uriStr)
Create a URI, resolving relative IRIs, and throw exception on bad a IRI


resolveSilent

public abstract com.hp.hpl.jena.iri.IRI resolveSilent(java.lang.String uriStr)
Create a URI, resolving relative IRIs, but do not throw exception on bad a IRI


resolveToString

public abstract java.lang.String resolveToString(java.lang.String uriStr)


Copyright © 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP