public abstract class AbsIRIImpl extends IRI implements ViolationCodes, IRIComponents
ViolationCodes.InitializeILLFORMED_PORT, NO_PORTACE_PREFIX, BAD_BIDI_SUBCOMPONENT, BAD_DOT_IN_IDN, BAD_IDN, BAD_IDN_UNASSIGNED_CHARS, BIDI_FORMATTING_CHARACTER, COMPATIBILITY_CHARACTER, CONTROL_CHARACTER, DEFAULT_PORT_SHOULD_BE_OMITTED, DEPRECATED_UNICODE_CHARACTER, DISCOURAGED_IRI_CHARACTER, DISCOURAGED_XML_CHARACTER, DNS_LABEL_DASH_START_OR_END, DNS_LABEL_LENGTH_LIMIT, DNS_LENGTH_LIMIT, DOUBLE_DASH_IN_REG_NAME, DOUBLE_WHITESPACE, EMPTY_SCHEME, HAS_PASSWORD, ILLEGAL_CHARACTER, ILLEGAL_PERCENT_ENCODING, IP_V4_OCTET_RANGE, IP_V6_OR_FUTURE_ADDRESS_SYNTAX, IPv6ADDRESS_SHOULD_BE_LOWERCASE, LONE_SURROGATE, LOWERCASE_PREFERRED, MAYBE_NOT_NFC, MAYBE_NOT_NFKC, NON_INITIAL_DOT_SEGMENT, NON_URI_CHARACTER, NON_XML_CHARACTER, NOT_DNS_NAME, NOT_NFC, NOT_NFKC, NOT_UTF8_ESCAPE, NOT_UTF8_ESCAPE_IN_HOST, NOT_XML_SCHEMA_WHITESPACE, PERCENT, PERCENT_20, PERCENT_ENCODING_SHOULD_BE_UPPERCASE, PORT_SHOULD_NOT_BE_EMPTY, PORT_SHOULD_NOT_BE_WELL_KNOWN, PORT_SHOULD_NOT_START_IN_ZERO, PRIVATE_USE_CHARACTER, PROHIBITED_COMPONENT_PRESENT, QUERY_IN_LEGACY_SCHEME, REQUIRED_COMPONENT_MISSING, SCHEME_INCLUDES_DASH, SCHEME_MUST_START_WITH_LETTER, SCHEME_PATTERN_MATCH_FAILED, SCHEME_PREFERS_LOWERCASE, SCHEME_REQUIRES_LOWERCASE, SUPERFLUOUS_ASCII_PERCENT_ENCODING, SUPERFLUOUS_NON_ASCII_PERCENT_ENCODING, UNASSIGNED_UNICODE_CHARACTER, UNDEFINED_UNICODE_CHARACTER, UNICODE_CONTROL_CHARACTER, UNICODE_WHITESPACE, UNREGISTERED_IANA_SCHEME, UNREGISTERED_NONIETF_SCHEME_TREE, UNWISE_CHARACTER, USE_PUNYCODE_NOT_PERCENTS, WHITESPACEAUTHORITY, FRAGMENT, HOST, PATH, PATHQUERY, PORT, QUERY, SCHEME, USERABSOLUTE, CHILD, GRANDPARENT, NETWORK, PARENT, SAMEDOCUMENT| Constructor and Description |
|---|
AbsIRIImpl() |
| Modifier and Type | Method and Description |
|---|---|
Iterator<Violation> |
allViolations() |
IRI |
create(IRI i)
Make a new IRI object (possibly including IRI resolution), and check it
for violations of the standards being enforced by the factory.
|
IRI |
create(String s)
Make a new IRI object (possibly including IRI resolution), and check it
for violations of the standards being enforced by the factory.
|
boolean |
equals(Object o) |
String |
getASCIIHost()
The host part of the authority, encoded
as an International Domain Name.
|
String |
getAuthority()
The authority component, found between
the first "//" and the next "/".
|
String |
getFragment()
The fragment, found after a "#" at the end
of the main URI (note a fragment may itself
contain a "#").
|
String |
getHost()
The host part of the authority.
|
String |
getPath()
The path component of the IRI; always
present, possibly the empty string.
|
int |
getPort()
The port number from the authority component.
|
String |
getQuery()
The query component of the IRI.
|
String |
getRawAuthority()
The authority component, found between
the first "//" and the next "/".
|
String |
getRawFragment()
The fragment, found after a "#" at the end
of the main URI (note a fragment may itself
contain a "#").
|
String |
getRawHost()
The host part of the authority.
|
String |
getRawPath()
The path component of the IRI; always
present, possibly the empty string.
|
String |
getRawQuery()
The query component of the IRI.
|
String |
getRawUserinfo()
The user information part of the authority
component of the IRI.
|
String |
getScheme()
The scheme component of the IRI.
|
String |
getUserinfo()
The user information part of the authority
component of the IRI.
|
int |
hashCode() |
boolean |
hasViolation(boolean includeWarnings)
Are there any violations of the factory's
specification settings.
|
boolean |
isAbsolute()
Does this IRI specify a scheme.
|
boolean |
isRelative()
Is this IRI a relative reference without
a scheme specified.
|
boolean |
isRootless()
Is this an 'opaque' IRI.
|
int |
ladderEquals(IRI iri)
To be defined: use the comparison ladder.
|
boolean |
ladderEquals(IRI iri,
int other)
To be defined: use the comparison ladder.
|
IRI |
normalize(boolean useDns)
To be defined -
return result does not violate any minting conditions.
|
IRI |
relativize(IRI abs)
Returns an IRI that when resolved against
this IRI would return
abs. |
IRI |
relativize(IRI abs,
int flags)
Returns an IRI that when resolved against
this IRI would return
abs. |
IRI |
relativize(String abs)
Returns an IRI that when resolved against
this IRI would return
abs. |
IRI |
relativize(String abs,
int flags)
Returns an IRI that when resolved against
this IRI would return
abs. |
String |
toASCIIString()
Converts the IRI into ASCII.
|
String |
toDisplayString()
The IRI string with any recommended bi-directional control
characters (if necessary) to ensure correct display.
|
URI |
toURI()
Converts the IRI to an ASCII string, and then to a java.net.URI.
|
URL |
toURL()
Converts the IRI to an ASCII string, and then to a URL.
|
Iterator<Violation> |
violations(boolean includeWarnings)
The error and warning conditions
associated with this IRI violating the
standards associated with its factory.
|
construct, construct, construct, createconstruct, construct, construct, createpublic boolean isAbsolute()
IRIisAbsolute in class IRIpublic boolean isRelative()
IRIisRelative in class IRIpublic boolean hasViolation(boolean includeWarnings)
IRIviolations(includeWarnings).hasNext(),
but faster.hasViolation in class IRIincludeWarnings - If true then warnings are reported as well as errors.public Iterator<Violation> violations(boolean includeWarnings)
IRIviolations in class IRIincludeWarnings - If true then warnings are returned as well as errors.Violations found which violate the
factory's standards.public URL toURL() throws MalformedURLException
IRItoURL in class IRIMalformedURLException - If IDNA conversion failed, or from java.net.URLpublic URI toURI() throws URISyntaxException
IRItoURI in class IRIURISyntaxException - If IDNA conversion failed.public String toASCIIString() throws MalformedIDNException
IRItoASCIIString in class IRIMalformedIDNExceptionpublic IRI relativize(String abs, int flags)
IRIabs.
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.
relativize in class IRIabs - An absolute IRI to make relative.flags - Which type of relative IRIs to permit.public IRI relativize(String abs)
IRIabs.
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.
relativize in class IRIabs - An absolute IRI to make relative.public IRI relativize(IRI abs)
IRIabs.
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.
relativize in class IRIabs - An absolute IRI to make relative.public IRI relativize(IRI abs, int flags)
IRIabs.
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.
relativize in class IRIabs - An absolute IRI to make relative.flags - Which type of relative IRIs to permit.public String getRawUserinfo()
IRIViolationCodes.HAS_PASSWORD.
No decoding is done; this method is cheap.getRawUserinfo in class IRIpublic int getPort()
IRIgetPort in class IRIIRI.NO_PORT or IRI.ILLFORMED_PORT.public String getRawQuery()
IRIgetRawQuery in class IRIpublic String getRawFragment()
IRIgetRawFragment in class IRIpublic String getRawHost()
IRIgetRawHost in class IRIpublic String getScheme()
IRIpublic String getRawPath()
IRIgetRawPath in class IRIpublic boolean isRootless()
IRIisRootless in class IRIpublic String getRawAuthority()
IRIgetRawAuthority in class IRIpublic IRI create(IRI i)
IRIFactoryIIRI.hasViolation(boolean) and
IRI.violations(boolean).create in interface IRIFactoryIcreate in class AbsIRIFactoryImpli - The IRI to use.public IRI create(String s)
IRIFactoryIIRI.hasViolation(boolean) and
IRI.violations(boolean).create in interface IRIFactoryIcreate in class AbsIRIFactoryImpls - The IRI to use.public String getAuthority()
IRIIRI.getRawAuthority().getAuthority in class IRIpublic String getFragment()
IRIIRI.getRawFragment().getFragment in class IRIpublic String getHost()
IRIIRI.getRawHost().public String getPath()
IRIIRI.getRawPath().public String getQuery()
IRIIRI.getRawQuery().public String getUserinfo()
IRIViolationCodes.HAS_PASSWORD.
Any legal percent escape sequences are decoded.
This method may be more expensive than IRI.getRawUserinfo().getUserinfo in class IRIpublic IRI normalize(boolean useDns)
IRIpublic String toDisplayString()
IRItoDisplayString in class IRIpublic String getASCIIHost() throws MalformedURLException
IRIIRI.getRawHost().getASCIIHost in class IRIMalformedURLException - An Internationalized Domain Name algorithm failed, there is no equivalent ascii string.public boolean ladderEquals(IRI iri, int other)
IRIladderEquals in class IRIiri - IRIother - Specifies where on the ladder to make the comparison.public int ladderEquals(IRI iri)
IRIladderEquals in class IRIiri - IRIIRI.ladderEquals(IRI, int) true, or -1 if none.Licenced under the Apache License, Version 2.0