IRIFactory extends IRIFactoryImpl implements  
  IRIFactoryI { public IRI create( String scheme, String userInfo, String host, int port, String path, String query, String fragment ) { return null; } IRIFactory();  IRIFactory(IRIFactory template); static IRIFactory iriImplementation(); static IRIFactory uriImplementation(); @Deprecated static IRIFactory semanticWebImplementation(); @Deprecated static IRIFactory jenaImplementation(); @Override void setSameSchemeRelativeReferences(String scheme); void allowUnwiseCharacters(); void setQueryCharacterRestrictions(boolean restrict); @Override void setEncoding(String enc); IRI create(
            String scheme,
            String userInfo,
            String host,
            int port,
            String path,
            String query,
            String fragment
            ); IRI create(
            String scheme,
            String authority,
            String path,
            String query,
            String fragment
            ); IRI construct(
            String scheme,
            String userInfo,
            String host,
            int port,
            String path,
            String query,
            String fragment
            ); IRI construct(
            String scheme,
            String authority,
            String path,
            String query,
            String fragment
            ); boolean isError(int code); boolean isWarning(int code); void setIsError(int code, boolean set); void setIsWarning(int code, boolean set); boolean ignoring(int code); void useSpecificationURI(boolean asErrors); void useSpecificationIRI(boolean asErrors); void useSpecificationRDF(boolean asErrors); void useSpecificationXMLSchema(boolean asErrors); void useSpecificationXMLSystemID(boolean asErrors); void useSpecificationXLink(boolean asErrors); void shouldViolation(boolean isError,boolean isWarning); void securityViolation(boolean isError,boolean isWarning); void dnsViolation(boolean isError,boolean isWarning); void mintingViolation(boolean isError,boolean isWarning); @Override void useSchemeSpecificRules(String scheme, boolean asErrors); static void setJenaImplementation(IRIFactory jf); static void setIriImplementation(IRIFactory iriF); static void setUriImplementation(IRIFactory uriF); static void setSemanticWebImplementation(IRIFactory sw);  }
@Test public void createFromURI() { URI uri = URI.create("http: IRI iri = iriFactory.create(uri); assertEquals("http", iri.getScheme()); assertEquals("johndoe:secret", iri.getRawUserinfo()); assertEquals("example.com", iri.getRawHost()); assertEquals(81, iri.getPort()); assertEquals("/page", iri.getRawPath()); assertEquals("2", iri.getRawQuery()); assertEquals("hash", iri.getRawFragment()); }
@Test public void createFromRelativeURI() throws Exception { URI relative = URI.create("page/deeper.txt?q"); IRI relativeIri = iriFactory.create(relative); assertEquals("page/deeper.txt", relativeIri.getRawPath()); IRI base = iriFactory.create("http: IRI absolute = base.create(relative); assertEquals("http: URI other = URI.create("http: IRI otherIri = base.create(other); assertEquals("http: }