Package com.hp.hpl.jena.iri

Examples of com.hp.hpl.jena.iri.IRIFactory.construct()


        boolean data = false;
        try {
            CharSequencePair pair = splitScheme(literal);
            if (pair == null) {
                // no scheme or scheme is private
                iri = fac.construct(trimHtmlSpaces(literal.toString()));
            } else {
                CharSequence scheme = pair.getHead();
                CharSequence tail = pair.getTail();
                if (isWellKnown(scheme)) {
                    iri = fac.construct(trimHtmlSpaces(literal.toString()));
View Full Code Here


                iri = fac.construct(trimHtmlSpaces(literal.toString()));
            } else {
                CharSequence scheme = pair.getHead();
                CharSequence tail = pair.getTail();
                if (isWellKnown(scheme)) {
                    iri = fac.construct(trimHtmlSpaces(literal.toString()));
                } else if ("javascript".contentEquals(scheme)) {
                    // StringBuilder sb = new StringBuilder(2 +
                    // literal.length());
                    // sb.append("x-").append(literal);
                    // iri = fac.construct(sb.toString());
View Full Code Here

                    } finally {
                        Context.exit();
                    }
                } else if ("data".contentEquals(scheme)) {
                    data = true;
                    iri = fac.construct(trimHtmlSpaces(literal.toString()));
                } else if (isHttpAlias(scheme)) {
                    StringBuilder sb = new StringBuilder(5 + tail.length());
                    sb.append("http:").append(tail);
                    iri = fac.construct(trimHtmlTrailingSpaces(sb.toString()));
                } else {
View Full Code Here

                    data = true;
                    iri = fac.construct(trimHtmlSpaces(literal.toString()));
                } else if (isHttpAlias(scheme)) {
                    StringBuilder sb = new StringBuilder(5 + tail.length());
                    sb.append("http:").append(tail);
                    iri = fac.construct(trimHtmlTrailingSpaces(sb.toString()));
                } else {
                    StringBuilder sb = new StringBuilder(2 + literal.length());
                    sb.append("x-").append(literal);
                    iri = fac.construct(trimHtmlTrailingSpaces(sb.toString()));
                }
View Full Code Here

                    sb.append("http:").append(tail);
                    iri = fac.construct(trimHtmlTrailingSpaces(sb.toString()));
                } else {
                    StringBuilder sb = new StringBuilder(2 + literal.length());
                    sb.append("x-").append(literal);
                    iri = fac.construct(trimHtmlTrailingSpaces(sb.toString()));
                }
            }
        } catch (IRIException e) {
            Violation v = e.getViolation();
            /*
 
View Full Code Here

    }
   
    @Test public void relDotSlash1() throws MalformedURLException
    {
       IRIFactory f = IRIFactory.iriImplementation() ;
       IRI iri = f.construct("http://a/b/c/dddd;pppp?qqqqq") ;
       IRI iri2 = iri.resolve("./") ;
       test(iri2, "http://a/b/c/") ;
    }
   
    @Test public void relDotSlash2() throws MalformedURLException
View Full Code Here

    }
   
    @Test public void relDotSlash2() throws MalformedURLException
    {
       IRIFactory f = IRIFactory.iriImplementation() ;
       IRI iri = f.construct("http://a/b/c/dddd;pppp?qqqqq") ;
       IRI iri2 = iri.resolve("./foo") ;
       test(iri2, "http://a/b/c/foo") ;
    }

   
View Full Code Here

        fac.shouldViolation(true, false);
        fac.securityViolation(true, false);
        fac.dnsViolation(true, false);
        fac.mintingViolation(false, false);
        fac.useSpecificationIRI(true);
        init(fac.construct(uri));
    }

    /**
     * @throws IOException, MalformedURLException
     *
 
View Full Code Here

        boolean data = false;
        try {
            CharSequencePair pair = splitScheme(literal);
            if (pair == null) {
                // no scheme or scheme is private
                iri = fac.construct(trimHtmlSpaces(literal.toString()));
            } else {
                CharSequence scheme = pair.getHead();
                CharSequence tail = pair.getTail();
                if (isWellKnown(scheme)) {
                    iri = fac.construct(trimHtmlSpaces(literal.toString()));
View Full Code Here

                iri = fac.construct(trimHtmlSpaces(literal.toString()));
            } else {
                CharSequence scheme = pair.getHead();
                CharSequence tail = pair.getTail();
                if (isWellKnown(scheme)) {
                    iri = fac.construct(trimHtmlSpaces(literal.toString()));
                } else if ("javascript".contentEquals(scheme)) {
                    // StringBuilder sb = new StringBuilder(2 +
                    // literal.length());
                    // sb.append("x-").append(literal);
                    // iri = fac.construct(sb.toString());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.