|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.hp.hpl.jena.iri.impl.AbsIRIFactoryImpl
com.hp.hpl.jena.iri.IRI
public abstract class IRI
An IRI.
The IRI may or may not conform to a variety of standards,
IRIFactory
. Methods allow:
Violation
s of the
standards being enforced.
The standards, and other setttings,
which are used in the methods are
determined by the configuration of the IRIFactory
used to create this IRI.
To check for conformance with a different standard,
the IRI must be passed to IRIFactoryI.create(IRI)
of a different appropriately configured IRIFactory
.
Field Summary | |
---|---|
static int |
ILLFORMED_PORT
Return code from getPort() ,
indicating that a port component was found,
but it is not a non-negative integer. |
static int |
NO_PORT
Return code from getPort() ,
indicating no port component found. |
Fields inherited from interface com.hp.hpl.jena.iri.IRIRelativize |
---|
ABSOLUTE, CHILD, GRANDPARENT, NETWORK, PARENT, SAMEDOCUMENT |
Constructor Summary | |
---|---|
IRI()
|
Method Summary | |
---|---|
abstract java.lang.String |
getASCIIHost()
The host part of the authority, encoded as an International Domain Name. |
abstract java.lang.String |
getAuthority()
The authority component, found between the first "//" and the next "/". |
abstract java.lang.String |
getFragment()
The fragment, found after a "#" at the end of the main URI (note a fragment may itself contain a "#"). |
abstract java.lang.String |
getHost()
The host part of the authority. |
abstract java.lang.String |
getPath()
The path component of the IRI; always present, possibly the empty string. |
abstract int |
getPort()
The port number from the authority component. |
abstract java.lang.String |
getQuery()
The query component of the IRI. |
abstract java.lang.String |
getRawAuthority()
The authority component, found between the first "//" and the next "/". |
abstract java.lang.String |
getRawFragment()
The fragment, found after a "#" at the end of the main URI (note a fragment may itself contain a "#"). |
abstract java.lang.String |
getRawHost()
The host part of the authority. |
abstract java.lang.String |
getRawPath()
The path component of the IRI; always present, possibly the empty string. |
abstract java.lang.String |
getRawQuery()
The query component of the IRI. |
abstract java.lang.String |
getRawUserinfo()
The user information part of the authority component of the IRI. |
abstract java.lang.String |
getScheme()
The scheme component of the IRI. |
abstract java.lang.String |
getUserinfo()
The user information part of the authority component of the IRI. |
abstract boolean |
hasViolation(boolean includeWarnings)
Are there any violations of the factory's specification settings. |
abstract boolean |
isAbsolute()
Does this IRI specify a scheme. |
abstract boolean |
isRelative()
Is this IRI a relative reference without a scheme specified. |
abstract boolean |
isRootless()
Is this an 'opaque' IRI. |
abstract int |
ladderEquals(IRI iri)
To be defined: use the comparison ladder. |
abstract boolean |
ladderEquals(IRI iri,
int other)
To be defined: use the comparison ladder. |
static void |
main(java.lang.String[] args)
Check one or more IRIs against a specification. |
abstract IRI |
normalize(boolean useDns)
To be defined - return result does not violate any minting conditions. |
abstract IRI |
relativize(IRI abs)
Returns an IRI that when resolved against this IRI would return abs . |
abstract IRI |
relativize(IRI abs,
int flags)
Returns an IRI that when resolved against this IRI would return abs . |
abstract IRI |
relativize(java.lang.String abs)
Returns an IRI that when resolved against this IRI would return abs . |
abstract IRI |
relativize(java.lang.String abs,
int flags)
Returns an IRI that when resolved against this IRI would return abs . |
IRI |
resolve(IRI relative)
Resolves an IRI against this one. |
IRI |
resolve(java.lang.String relative)
Resolves an IRI against this one. |
abstract java.lang.String |
toASCIIString()
Converts the IRI into ASCII. |
abstract java.lang.String |
toDisplayString()
The IRI string with any recommended bi-directional control characters (if necessary) to ensure correct display. |
abstract java.lang.String |
toString()
The logical IRI string as originally specified, use toDisplayString() for display purposes
such as error messages. |
abstract java.net.URL |
toURL()
Converts the IRI to an ASCII string, and then to a URL. |
abstract java.util.Iterator<Violation> |
violations(boolean includeWarnings)
The error and warning conditions associated with this IRI violating the standards associated with its factory. |
Methods inherited from class com.hp.hpl.jena.iri.impl.AbsIRIFactoryImpl |
---|
construct, construct, create, create, getFactory, throwAnyErrors |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.hp.hpl.jena.iri.IRIFactoryI |
---|
construct, construct, create, create |
Field Detail |
---|
public static final int NO_PORT
getPort()
,
indicating no port component found.
public static final int ILLFORMED_PORT
getPort()
,
indicating that a port component was found,
but it is not a non-negative integer.
Constructor Detail |
---|
public IRI()
Method Detail |
---|
public abstract java.util.Iterator<Violation> violations(boolean includeWarnings)
includeWarnings
- If true then warnings are returned as well as errors.
Violation
s found which violate the
factory's standards.public abstract java.lang.String getRawAuthority()
public abstract java.lang.String getAuthority()
getRawAuthority()
.
public abstract java.lang.String getRawFragment()
public abstract java.lang.String getFragment()
getRawFragment()
.
public abstract java.lang.String getRawHost()
public abstract java.lang.String getHost()
getRawHost()
.
public abstract java.lang.String getASCIIHost() throws java.net.MalformedURLException
getRawHost()
.
java.net.MalformedURLException
- An Internationalized Domain Name algorithm failed, there is no equivalent ascii string.public abstract java.lang.String getRawPath()
public abstract java.lang.String getPath()
getRawPath()
.
public abstract int getPort()
NO_PORT
or ILLFORMED_PORT
.public abstract java.lang.String getRawQuery()
public abstract java.lang.String getQuery()
getRawQuery()
.
public abstract java.lang.String getScheme()
public abstract java.lang.String getRawUserinfo()
ViolationCodes.HAS_PASSWORD
.
No decoding is done; this method is cheap.
public abstract java.lang.String getUserinfo()
ViolationCodes.HAS_PASSWORD
.
Any legal percent escape sequences are decoded.
This method may be more expensive than getRawUserinfo()
.
public abstract boolean hasViolation(boolean includeWarnings)
violations(includeWarnings).hasNext()
,
but faster.
includeWarnings
- If true then warnings are reported as well as errors.
public abstract boolean isAbsolute()
public abstract boolean isRootless()
public abstract boolean isRelative()
public abstract IRI relativize(IRI abs, int flags)
abs
.
If possible, a relative IRI is formed,
using any of the methods specified in flags,
which is a bitwise or of values from
IRIRelativize
.
If abs
contains a dot
segment (either "/./" or "/../") then
the contract cannot be satisfied and an incorrect
answer is returned. This incorrect return value has an
ViolationCodes.NON_INITIAL_DOT_SEGMENT
violation associated with it.
abs
- An absolute IRI to make relative.flags
- Which type of relative IRIs to permit.
public abstract IRI relativize(IRI abs)
abs
.
If possible, a relative IRI is formed,
using default methods.
If abs
contains a dot
segment (either "/./" or "/../") then
the contract cannot be satisfied and an incorrect
answer is returned. This incorrect return value has an
ViolationCodes.NON_INITIAL_DOT_SEGMENT
violation associated with it.
abs
- An absolute IRI to make relative.
public abstract IRI relativize(java.lang.String abs)
abs
.
If possible, a relative IRI is formed,
using default methods.
If abs
contains a dot
segment (either "/./" or "/../") then
the contract cannot be satisfied and an incorrect
answer is returned. This incorrect return value has an
ViolationCodes.NON_INITIAL_DOT_SEGMENT
violation associated with it.
abs
- An absolute IRI to make relative.
public abstract IRI relativize(java.lang.String abs, int flags)
abs
.
If possible, a relative IRI is formed,
using any of the methods specified in flags,
which is a bitwise or of values from
IRIRelativize
.
If abs
contains a dot
segment (either "/./" or "/../") then
the contract cannot be satisfied and an incorrect
answer is returned. This incorrect return value has an
ViolationCodes.NON_INITIAL_DOT_SEGMENT
violation associated with it.
abs
- An absolute IRI to make relative.flags
- Which type of relative IRIs to permit.
public abstract java.lang.String toASCIIString() throws java.net.MalformedURLException
java.net.MalformedURLException
- An Internationalized Domain Name algorithm failed, there is no equivalent ascii string.public abstract java.lang.String toString()
toDisplayString()
for display purposes
such as error messages.
toString
in class java.lang.Object
public abstract java.lang.String toDisplayString()
public abstract java.net.URL toURL() throws java.net.MalformedURLException
java.net.MalformedURLException
- If IDNA conversion failed, or from java.net.URLpublic final IRI resolve(IRI relative)
IRIFactoryImpl.create(IRI)
.
relative
-
AbsIRIFactoryImpl.construct(IRI)
public final IRI resolve(java.lang.String relative)
IRIFactoryImpl.create(String)
.
relative
-
AbsIRIFactoryImpl.construct(String)
public abstract IRI normalize(boolean useDns)
useDns
- If true, do DNS look ups to normalize hostname.
public abstract boolean ladderEquals(IRI iri, int other)
iri
- other
- Specifies where on the ladder to make the comparison.
public abstract int ladderEquals(IRI iri)
iri
-
ladderEquals(IRI, int)
true, or -1 if none.public static void main(java.lang.String[] args)
java <classpath> [ -help ] [ -iri | -uri | -xml | -schema | -xlink ] [ -f file ] [ iri ... ]If no file or iris are specified on the command line, then standard input is used. In fact more than one spec can be used, in which case violations of any of them are reported.
args
-
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |