Package org.openxri.resolve

Examples of org.openxri.resolve.IRITest$IRIResolver


    }
   
    // A test for resolved names that depend on where the tests are run.
    private void execTestMatch(String u, String base, String resultPattern)
    {
        IRIResolver resolver = new IRIResolver(base) ;
        String res = resolver.resolve(u) ;

        if (resultPattern == null )
        {
            assertNull("("+u+","+base+") => <null> :: Got: "+res, res) ;
            return ;
View Full Code Here


   
    private void execException(String u, String base, Class<?> ex)
    {
        String s = ex.getSimpleName() ;
        try {
            IRIResolver resolver = new IRIResolver(base) ;
            String res = resolver.resolve(u) ;
            if ( res == null )
                fail("("+u+","+base+") => <null> :: Expected exception: " +s) ;
            else
                fail("("+u+","+base+") => "+res+" :: Expected exception: " +s) ;
        } catch (Exception ex2)
View Full Code Here

    }
    private void execException(String base, Class<?> ex)
    {
        String s = ex.getSimpleName() ;
        try {
            new IRIResolver(base) ;
                 fail("("+base+") => OK :: Expected exception: " +s) ;
        } catch (Exception ex2)
        {
            // Shoudl test whether ex2 is a subclass of ex
            assertEquals(ex, ex2.getClass()) ;
View Full Code Here

    public void usePrologueFrom(Prologue other)
    {
        prefixMap = new PrefixMapping2(other.prefixMap) ;
        seenBaseURI = false ;
        if ( other.resolver != null )
            resolver = new IRIResolver(other.resolver.getBaseIRI()) ;
    }
View Full Code Here

        // New prefix mappings
        PrefixMapping ext = getPrefixMapping() ;
        if ( newMappings != null )
            ext = new PrefixMapping2(ext, newMappings) ;
        // New base.
        IRIResolver r = resolver ;
        if ( base != null )
            r = new IRIResolver(base) ;
        return new Prologue(ext, r) ;
    }
View Full Code Here

     * @param baseURI The baseURI to set.
     */
    public void setBaseURI(String baseURI)
    {
        this.seenBaseURI = true ;
        this.resolver = new IRIResolver(baseURI) ;
    }
View Full Code Here

TOP

Related Classes of org.openxri.resolve.IRITest$IRIResolver

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.