An IRIFactory is the entry point to this module. It allows:
- The setting of conformance levels, particularly identifying which standard(s) to enforce
- The creation of IRI objects, checking them against the selected standard(s)
- The setting of optional behaviours, as specified in the various standard(s)
Any configuration of the factory to implement particular standards, or to treat particular violations as warnings or errors, must be completed before using the construct or create methods.
The easiest way to use this class is to use one of the preconfigured factories: {@link #semanticWebImplementation()}{@link #iriImplementation()}, or {@link #uriImplementation()}. If none of these meets your application needs then you have to configure your own factory.
When initializing a factory, the initialization methods should be used in the following order:
- Any of:
- {@link #securityViolation(boolean,boolean)}
- {@link #dnsViolation(boolean,boolean)}
- {@link #shouldViolation(boolean,boolean)}
- {@link #mintingViolation(boolean,boolean)}
- One or more of (note the effect is cumulative, all the used specifications will be enforced):
- {@link #useSpecificationIRI(boolean)}
- {@link #useSpecificationRDF(boolean)}
- {@link #useSpecificationURI(boolean)}
- {@link #useSpecificationXLink(boolean)}
- {@link #useSpecificationXMLSchema(boolean)}
- {@link #useSpecificationXMLSystemID(boolean)}
- Any of the methods that invoke optional behaviour
- {@link #allowUnwiseCharacters()}
- {@link #setEncoding(String)}
- {@link #setSameSchemeRelativeReferences(String)}
- Any scheme specific initialization
- {@link #useSchemeSpecificRules(String,boolean)}
- Finally calls to
- {@link #setIsError(int,boolean)}
- {@link #setIsWarning(int,boolean)}
It is possible to make these calls in different orders, but the resultant behaviour is likely to be more confusing, and may change in future releases.
The other initialization methods (probably) do not have order dependencies.