Interface ViolationCodes

All Known Implementing Classes:
AbsIRIImpl, ComponentPattern, ComponentPatternParser, IRIFactory, IRIFactoryImpl, IRIImpl, Parser, PatternCompiler, ResolvedRelativeIRI, SchemeSpecification, Violation, ViolationCodeInfo, ViolationImpl

public interface ViolationCodes
Detailed description of problems detected. This interface lists the codes returned by Violation.getViolationCode(). Note: not all are errors, some merely reflect internal workings.

The violations are evaluated against the following standards:

[RDF]
Resource Description Framework (RDF): Concepts and Abstract Syntax (section RDF URI References)
The SCHEME component is required.

The following are examples of ill-formed IRIs using this scheme:
  • <foo/bar>
  • <#frag>
  • <//example.org/foo/bar#frag>
[URI] RFC 3986
Uniform Resource Identifier (URI): Generic Syntax
[Unicode]
Unicode
[IRI] RFC 3987
Internationalized Resource Identifiers (IRIs)
[XML]
Extensible Markup Language (XML) 1.0 (Third Edition) (section system identifier)
The FRAGMENT component must be omitted.
[XLink]
XML Linking Language (XLink) Version 1.0 (section Locator Attribute (href))
[Schema]
XML Schema Part 2: Datatypes Second Edition (section anyURI)

Scheme specific checks are enabled. The syntax of the following schemes is fully supported:

[http] RFC 2616
Hypertext Transfer Protocol -- HTTP/1.1
Pertinent text from the specification includes:
See section 3.2.2
http_URL = "http:" "//" host [ ":" port ] [ abs_path [ "?" query ]]

This scheme requires the use of hostnames conforming to DNS syntax. The IDNA compatibile processing of IRIs for this scheme is enabled if this scheme is enabled. To disable this behaviour, this scheme has to be disabled using // TODO how to disable scheme and DNS compatibile rules have to be disabled using
IRIFactory.dnsViolation(boolean, boolean). The default port is 80.
The USER component must be omitted.
The HOST component is required.

The following are examples of well-formed IRIs using this scheme:
  • <http://www.example.org/foo/bar>

The following are examples of ill-formed IRIs using this scheme:
[https] RFC 2818
Hypertext Transfer Protocol Secure
Pertinent text from the specification includes:
See section 2.4
HTTP/TLS is differentiated from HTTP URIs by using the 'https' protocol identifier in place of the 'http' protocol identifier.
See [http], specifically, section 3.2.2
http_URL = "http:" "//" host [ ":" port ] [ abs_path [ "?" query ]]

This scheme requires the use of hostnames conforming to DNS syntax. The IDNA compatibile processing of IRIs for this scheme is enabled if this scheme is enabled. To disable this behaviour, this scheme has to be disabled using // TODO how to disable scheme and DNS compatibile rules have to be disabled using
IRIFactory.dnsViolation(boolean, boolean). The default port is 443.
The USER component must be omitted.
The HOST component is required.

The following are examples of well-formed IRIs using this scheme:
  • <https://www.example.org/foo/bar>

The following are examples of ill-formed IRIs using this scheme:
  • <https://www.example.org:443/foo/bar>
  • <https:foo/bar>
  • <https://[email protected]/foo/bar>
[ftp] RFC 1738
File Transfer Protocol (section 3.2)
Pertinent text from the specification includes:
See section 5
ftpurl = "ftp://" login [ "/" fpath [ ";type=" ftptype ]]
fpath = fsegment *[ "/" fsegment ]
fsegment = *[ uchar | "?" | ":" | "@" | "&" | "=" ]
ftptype = "A" | "I" | "D" | "a" | "i" | "d"
login = [ user [ ":" password ] "@" ] hostport
safe = "$" | "-" | "_" | "." | "+"
extra = "!" | "*" | "'" | "(" | ")" | ","
escape = "%" hex hex
unreserved = alpha | digit | safe | extra
uchar = unreserved | escape

This scheme requires the use of hostnames conforming to DNS syntax. The IDNA compatibile processing of IRIs for this scheme is enabled if this scheme is enabled. To disable this behaviour, this scheme has to be disabled using // TODO how to disable scheme and DNS compatibile rules have to be disabled using
IRIFactory.dnsViolation(boolean, boolean). The default port is 21.
The HOST component is required.
The PATHQUERY component:
  • is required to match the regular expression: [^;~]*(;@{mustLowerCase(type)}=@{shouldLowerCase([aid])}|)
  • may use ~; as sub-delimiters, and care must be taken when percent escaping or unescaping these delimiters to not disrupt the scheme specific syntax.

The following are examples of well-formed IRIs using this scheme:
The following are examples of ill-formed IRIs using this scheme:
[news] RFC 1738
USENET news (section 3.6)
Pertinent text from the specification includes:
See section 5
newsurl = "news:" grouppart
grouppart = "*" | group | article
group = alpha *[ alpha | digit | "-" | "." | "+" | "_" ]
article = 1*[ uchar | ";" | "/" | "?" | ":" | "&" | "=" ] "@" host
safe = "$" | "-" | "_" | "." | "+"
extra = "!" | "*" | "'" | "(" | ")" | ","
escape = "%" hex hex
unreserved = alpha | digit | safe | extra
uchar = unreserved | escape
The AUTHORITY component must be omitted.
The PATH component is required.
The PATHQUERY component:
  • is required to match the regular expression: [^@]+@@{host}|[*]|[a-zA-Z][-a-zA-Z0-9.+_]*
  • may use ~@ as sub-delimiters, and care must be taken when percent escaping or unescaping these delimiters to not disrupt the scheme specific syntax.

The following are examples of well-formed IRIs using this scheme:

The following are examples of ill-formed IRIs using this scheme:
[nntp] RFC 1738
USENET news using NNTP access (section 3.7)
Pertinent text from the specification includes:
See section 5
nntpurl = "nntp://" hostport "/" group [ "/" digits ]
group = alpha *[ alpha | digit | "-" | "." | "+" | "_" ]

This scheme requires the use of hostnames conforming to DNS syntax. The IDNA compatibile processing of IRIs for this scheme is enabled if this scheme is enabled. To disable this behaviour, this scheme has to be disabled using // TODO how to disable scheme and DNS compatibile rules have to be disabled using
IRIFactory.dnsViolation(boolean, boolean). The default port is 119.
The QUERY component must be omitted.
The USER component must be omitted.
The HOST component is required.
The PATH component is required to match the regular expression: /[a-zA-Z][-a-zA-Z0-9.+_]*(/[0-9]+)?

The following are examples of well-formed IRIs using this scheme:
  • <nntp://example.org/foo4>
  • <nntp://example.org/foo/4>

The following are examples of ill-formed IRIs using this scheme:
  • <nntp://[email protected]/foo>
  • <nntp:/foo>
  • <nntp:///foo>
  • <nntp://example.org/foo/4/3>
  • <nntp://example.org/>
  • <nntp://example.org/foo/>
  • <nntp://example.org/*>
[file] RFC 8089
Host-specific file names
Pertinent text from the specification includes:
See here
      file-URI       = file-scheme ":" file-hier-part

      file-scheme    = "file"

      file-hier-part = ( "//" auth-path )
                     / local-path

      auth-path      = [ file-auth ] path-absolute

      local-path     = path-absolute

      file-auth      = "localhost"
                     / host

This scheme requires the use of hostnames conforming to DNS syntax. The IDNA compatibile processing of IRIs for this scheme is enabled if this scheme is enabled. To disable this behaviour, this scheme has to be disabled using // TODO how to disable scheme and DNS compatibile rules have to be disabled using
IRIFactory.dnsViolation(boolean, boolean). The USER component must be omitted.
The PORT component must be omitted.
The PATH component is required.
The AUTHORITY component is required.

The following are examples of well-formed IRIs using this scheme:
  • <file:///foo/b>
  • <file:///foo/b?ar/yuk>

The following are examples of ill-formed IRIs using this scheme:
  • <file://[email protected]/foo/bar>
  • <file://eg:4029/foo/bar>
  • <file:/foo/bar>
  • <file://example.org>

The syntax of the following schemes is partially supported:

[mailto] RFC 2368
Electronic mail address
The AUTHORITY component must be omitted.
[urn] RFC 2141
Uniform Resource Names
Pertinent text from the specification includes:
See section 2
All URNs have the following syntax (phrases enclosed in quotes are REQUIRED):
<URN> ::= "urn:" <NID> ":" <NSS>
See section 2.1
<NID>         ::= <let-num> [ 1,31<let-num-hyp> ]

<let-num-hyp> ::= <upper> | <lower> | <number> | "-"

<let-num>     ::= <upper> | <lower> | <number>
See section 2.2
<NSS>         ::= 1*<URN chars>

<URN chars>   ::= <trans> | "%" <hex> <hex>

<trans>       ::= <upper> | <lower> | <number> | <other> | <reserved>

<other>       ::= "(" | ")" | "+" | "," | "-" | "." |
                  ":" | "=" | "@" | ";" | "$" |
                  "_" | "!" | "*" | "'"
The AUTHORITY component must be omitted.
The PATH component is required.
The PATH component is required to match the regular expression: (?![uU][rR][nN]:)[a-zA-Z0-9][-a-zA-Z0-9]{1,31}:.+
The QUERY component is required to match the regular expression: [+=].*

TODO: case of NIS
TODO: registry of URNs, implement something of the NSS with Namespace specific rules.
TODO: To avoid confusion with the "urn:" identifier, the NID "urn" is reserved and MUST NOT be used.
TODO: e-mail about frags in URNs
TODO: In addition, octet 0 (0 hex) should NEVER be used, in either unencoded or %-encoded form.
The following are examples of well-formed IRIs using this scheme:
  • <urn:x-hp:fooé>
  • <urn:nss:a/b/c>
  • <urn:urn-1:foo>

The following are examples of ill-formed IRIs using this scheme:
  • <urn:urn:foo>
  • <urn://foo>
  • <urn:foo:bar?query>

The names of the following registered schemes are known, but they are otherwise unsupported:

[telnet] RFC 4248
Reference to interactive sessions
[wais] RFC 4156
Wide Area Information Servers
[prospero] RFC 4157
Prospero Directory Service
[gopher] RFC 4266
The gopher URI scheme
[z39.50s] RFC 2056
Z39.50 Session
[z39.50r] RFC 2056
Z39.50 Retrieval
[cid] RFC 2392
content identifier
[mid] RFC 2392
message identifier
[vemmi] RFC 2122
versatile multimedia interface
[service] RFC 2609
service location
[imap] RFC 2192
internet message access protocol
[nfs] RFC 2224
network file system protocol
[acap] RFC 2244
application configuration access protocol
[rtsp] RFC 2326
real time streaming protocol
[tip] RFC 2371
Transaction Internet Protocol
[pop] RFC 2384
Post Office Protocol v3
[data] RFC 2397
data
[dav] RFC 2518
dav
[opaquelocktoken] RFC 2518
opaquelocktoken
[sip] RFC 3261
session initiation protocol
[sips] RFC 3261
secure session intitiaion protocol
[tel] RFC 2806
telephone
[fax] RFC 2806
fax
[modem] RFC 2806
modem
[soap.beep] RFC 3288
soap.beep
[soap.beeps] RFC 3288
soap.beeps
[xmlrpc.beep] RFC 3529
xmlrpc.beep
[xmlrpc.beeps] RFC 3529
xmlrpc.beeps
[go] RFC 3368
go
[h323] RFC 3508
H.323
[ipp] RFC 3510
Internet Printing Protocol
[tftp] RFC 3617
Trivial File Transfer Protocol
[mupdate] RFC 3656
Mailbox Update (MUPDATE) Protocol
[pres] RFC 3859
Presence
[im] RFC 3860
Instant Messaging
[mtqp] RFC 3887
Message Tracking Query Protocol
[iris.beep] RFC 3983
iris.beep
[dict] RFC 2229
dictionary service protocol
[snmp] RFC 4088
Simple Network Management Protocol
[crid] RFC 4078
TV-Anytime Content Reference Identifier
[tag] RFC 4151
tag
[afs]
Andrew File System global file names
[tn3270]
Interactive 3270 emulation sessions
[mailserver]
Access to data available from mail servers
[dns]
Domain Name System
[info]
Information Assets with Identifiers in Public Namespaces
[ldap]
Lightweight Directory Access Protocol

Other relevant standards include:

[URL_Registratrion] RFC 2717
Registration Procedures for URL Scheme Names