public abstract class IRIResolver extends Object
Modifier and Type | Field and Description |
---|---|
static org.apache.jena.iri.IRIFactory |
iriFactory
The IRI checker setup, focused on paring and languages.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
checkIRI(String iriStr)
Check an IRI string (does not resolve it)
|
static org.apache.jena.iri.IRI |
chooseBaseURI()
Choose a base URI based on the current directory
|
static IRIResolver |
create() |
static IRIResolver |
create(org.apache.jena.iri.IRI baseIRI) |
static IRIResolver |
create(String baseStr) |
static IRIResolver |
createNoResolve() |
String |
getBaseIRIasString() |
static org.apache.jena.iri.IRI |
parseIRI(String iriStr)
Parse an IRI (does not resolve it)
|
static org.apache.jena.iri.IRI |
parseIRIex(String iriStr)
Parse an IRI (does not resolve it) - throws exception on a bad IRI
|
org.apache.jena.iri.IRI |
resolve(String uriStr)
Resolve a relative URI against the base of this IRIResolver
or normalize an absolute URI.
|
static org.apache.jena.iri.IRI |
resolve(String relStr,
String baseStr)
Resolve a URI against a base.
|
static String |
resolveFileURL(String filename)
Turn a filename into a well-formed file: URL relative to the working
directory.
|
static org.apache.jena.iri.IRI |
resolveIRI(String uriStr)
Resolve an IRI against whatever is the base for this process (likely to
be based on the current working directory of this process at the time of
initialization of this class).
|
abstract org.apache.jena.iri.IRI |
resolveSilent(String uriStr)
Create a URI, resolving relative IRIs,
normalize an absolute URI,
but do not throw exception on a bad IRI.
|
static String |
resolveString(String uriStr)
Resolve a URI against a base.
|
static String |
resolveString(String relStr,
String baseStr)
Resolve a URI against a base.
|
static String |
resolveStringSilent(String uriStr)
Resolve a URI against a base.
|
String |
resolveToString(String uriStr)
Resolving relative IRIs, return a string
|
String |
resolveToStringSilent(String uriStr)
Resolving relative IRIs, return a string, but do not throw exception on
bad a IRI
|
static void |
suppressExceptions()
To allow Eyeball to bypass IRI checking (because it's doing its own)
|
static void |
validateIRI(String iriStr)
Check an IRI string (does not resolve it) - throw exception if not good
|
public static final org.apache.jena.iri.IRIFactory iriFactory
IRIFactory
public static boolean checkIRI(String iriStr)
public static void validateIRI(String iriStr) throws org.apache.jena.iri.IRIException
org.apache.jena.iri.IRIException
public static org.apache.jena.iri.IRI parseIRI(String iriStr)
public static org.apache.jena.iri.IRI parseIRIex(String iriStr) throws org.apache.jena.iri.IRIException
org.apache.jena.iri.IRIException
public static String resolveFileURL(String filename) throws org.apache.jena.iri.IRIException
filename
- org.apache.jena.iri.IRIException
public static org.apache.jena.iri.IRI resolve(String relStr, String baseStr) throws RiotException
relStr
- baseStr
- Can be null if relStr is absoluteRiotException
- If result would not be legal, absolute IRIpublic static String resolveString(String relStr, String baseStr) throws RiotException
relStr
- baseStr
- Can be null if relStr is absoluteRiotException
- If result would not be legal, absolute IRIpublic static String resolveString(String uriStr) throws RiotException
uriStr
- RiotException
- If result would not be legal, absolute IRIpublic static String resolveStringSilent(String uriStr) throws RiotException
uriStr
- RiotException
public static org.apache.jena.iri.IRI resolveIRI(String uriStr)
public static IRIResolver create()
public static IRIResolver create(String baseStr)
public static IRIResolver create(org.apache.jena.iri.IRI baseIRI)
public static IRIResolver createNoResolve()
public static void suppressExceptions()
public static org.apache.jena.iri.IRI chooseBaseURI()
public String getBaseIRIasString()
public org.apache.jena.iri.IRI resolve(String uriStr)
uriStr
- RiotException
- If resulting URI would not be legal, absolute IRIpublic abstract org.apache.jena.iri.IRI resolveSilent(String uriStr)
uriStr
- RiotException
- If resulting URI would not be legal, absolute IRIpublic String resolveToString(String uriStr)
Licenced under the Apache License, Version 2.0