com.hp.hpl.jena.iri.impl
Class IRIFactoryImpl

java.lang.Object
  extended by com.hp.hpl.jena.iri.impl.AbsIRIFactoryImpl
      extended by com.hp.hpl.jena.iri.impl.IRIFactoryImpl
All Implemented Interfaces:
Force, IRIComponents, IRIFactoryI, ViolationCodes
Direct Known Subclasses:
IRIFactory

public class IRIFactoryImpl
extends AbsIRIFactoryImpl
implements ViolationCodes, Force, IRIComponents


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.hp.hpl.jena.iri.ViolationCodes
ViolationCodes.Initialize
 
Field Summary
protected  long errors
           
protected  java.util.Set<Specification> specs
           
static int UNKNOWN_SYNTAX
           
protected  long warnings
           
 
Fields inherited from interface com.hp.hpl.jena.iri.ViolationCodes
ACE_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, WHITESPACE
 
Fields inherited from interface com.hp.hpl.jena.iri.impl.Force
dns, DNS, minting, MINTING, must, MUST, security, SECURITY, should, SHOULD, SIZE
 
Fields inherited from interface com.hp.hpl.jena.iri.IRIComponents
AUTHORITY, FRAGMENT, HOST, PATH, PATHQUERY, PORT, QUERY, SCHEME, USER
 
Constructor Summary
IRIFactoryImpl()
           
IRIFactoryImpl(IRIFactoryImpl template)
           
 
Method Summary
 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(java.lang.String s)
          Make a new IRI object (possibly including IRI resolution), and check it for violations of the standards being enforced by the factory.
protected  boolean getAsErrors(int ix)
           
protected  boolean getAsWarnings(int ix)
           
protected  IRIFactoryImpl getFactory()
           
 int getProhibited()
           
 int getRequired()
           
 SchemeSpecificPart getScheme(java.lang.String scheme, Parser parser)
           
protected  void initializing()
           
 SchemeSpecificPart noScheme()
           
 void setEncoding(java.lang.String enc)
           
 void setSameSchemeRelativeReferences(java.lang.String scheme)
           
protected  void setViolation(int ix, boolean e, boolean w)
           
 void useSchemeSpecificRules(java.lang.String scheme, boolean asErr)
           
protected  void useSpec(java.lang.String name, boolean asErr)
           
 
Methods inherited from class com.hp.hpl.jena.iri.impl.AbsIRIFactoryImpl
construct, construct, throwAnyErrors
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNKNOWN_SYNTAX

public static final int UNKNOWN_SYNTAX
See Also:
Constant Field Values

errors

protected long errors

warnings

protected long warnings

specs

protected java.util.Set<Specification> specs
Constructor Detail

IRIFactoryImpl

public IRIFactoryImpl()

IRIFactoryImpl

public IRIFactoryImpl(IRIFactoryImpl template)
Method Detail

getFactory

protected IRIFactoryImpl getFactory()
Specified by:
getFactory in class AbsIRIFactoryImpl

create

public IRI create(IRI i)
Description copied from interface: IRIFactoryI
Make a new IRI object (possibly including IRI resolution), and check it for violations of the standards being enforced by the factory. This method both allows IRI resolution against a base, and for creating a new IRI using a different factory, with different conformance settings, implementing a different URI or IRI standard, or variant thereof. This method does not throw exceptions, but records all errors and warnings found to be queried later using IRI.hasViolation(boolean) and IRI.violations(boolean).

Specified by:
create in interface IRIFactoryI
Specified by:
create in class AbsIRIFactoryImpl
Parameters:
i - The IRI to use.
Returns:
A new IRI object.

setEncoding

public void setEncoding(java.lang.String enc)
                 throws java.io.UnsupportedEncodingException
Throws:
java.io.UnsupportedEncodingException

setViolation

protected void setViolation(int ix,
                            boolean e,
                            boolean w)

getAsWarnings

protected boolean getAsWarnings(int ix)

getAsErrors

protected boolean getAsErrors(int ix)

initializing

protected void initializing()

create

public IRI create(java.lang.String s)
Description copied from interface: IRIFactoryI
Make a new IRI object (possibly including IRI resolution), and check it for violations of the standards being enforced by the factory. This method does not throw exceptions, but records all errors and warnings found to be queried later using IRI.hasViolation(boolean) and IRI.violations(boolean).

Specified by:
create in interface IRIFactoryI
Overrides:
create in class AbsIRIFactoryImpl
Parameters:
s - The IRI to use.
Returns:
A new IRI object.

setSameSchemeRelativeReferences

public void setSameSchemeRelativeReferences(java.lang.String scheme)

useSpec

protected void useSpec(java.lang.String name,
                       boolean asErr)

getScheme

public SchemeSpecificPart getScheme(java.lang.String scheme,
                                    Parser parser)

noScheme

public SchemeSpecificPart noScheme()

getRequired

public int getRequired()

getProhibited

public int getProhibited()

useSchemeSpecificRules

public void useSchemeSpecificRules(java.lang.String scheme,
                                   boolean asErr)


Copyright © 2009 Hewlett-Packard. All Rights Reserved.