Package com.hp.hpl.jena.iri

Examples of com.hp.hpl.jena.iri.IRI


        @Override
        public IRI resolveSilent(String uriStr)
        {
            if ( resolvedIRIs != null && resolvedIRIs.containsKey(uriStr) )
                return resolvedIRIs.get(uriStr) ;
            IRI iri = iriFactory.create(uriStr) ;
            if ( resolvedIRIs != null )
                resolvedIRIs.put(uriStr, iri) ;
            return iri ;
        }
View Full Code Here


        @Override
        public IRI resolveSilent(String relURI)
        {
            if ( resolvedIRIs != null && resolvedIRIs.containsKey(relURI) )
                return resolvedIRIs.get(relURI) ;
            IRI iri = base.resolve(relURI) ;
            if ( resolvedIRIs != null )
                resolvedIRIs.put(relURI, iri) ;
            return iri ;
        }
View Full Code Here

    public static URIReference fromQName(Frame f, String ns, String local)
            throws SAXParseException {
        URIReference rslt = new URIReference(ns + local);
        f.checkEncoding(rslt,local);
        // TODO: not for 2.3 move some of the check upwards ...
        IRI iri = f.arp.iriFactory().create(ns+local);
        AbsXMLContext.checkURI(f.arp,rslt,iri);
        return rslt;
    }
View Full Code Here

    @Override
    public AbsXMLContext withBase(XMLHandler forErrors, String b)
            throws SAXParseException {
        TaintImpl taintB = new TaintImpl();
        IRI newB = resolveAsURI(forErrors, taintB, b, false);
        if (newB.isRelative() )
            return new XMLBaselessContext(forErrors,errno,newB.create(""));
       
        if (newB.hasViolation(false))
            return new XMLBaselessContext(forErrors,ERR_RESOLVING_AGAINST_MALFORMED_BASE,newB);
        return new XMLContext(keepDocument(forErrors), document, newB
                .create(""), taintB, lang, langTaint);
    }
View Full Code Here

//    }

    public AbsXMLContext withBase(XMLHandler forErrors, String b)
            throws SAXParseException {
        TaintImpl taintB = new TaintImpl();
        IRI newB = resolveAsURI(forErrors, taintB, b, false);
        if (newB.isRelative())
            return new XMLBaselessContext(forErrors,ERR_RESOLVING_AGAINST_RELATIVE_BASE, newB.create(""));

        if (newB.hasViolation(false))
            return new XMLBaselessContext(forErrors,
                    ERR_RESOLVING_AGAINST_MALFORMED_BASE, newB);
        return new XMLContext(keepDocument(forErrors), document, newB
                .create(""), taintB, lang, langTaint);
    }
View Full Code Here

        return resolveAsURI(forErrors, taintMe, relUri, true);
    }

    final IRI resolveAsURI(XMLHandler forErrors, Taint taintMe, String relUri,
            boolean checkBaseUse) throws SAXParseException {
        IRI rslt = uri.create(relUri);

        if (checkBaseUse)
            checkBaseUse(forErrors, taintMe, relUri, rslt);

        checkURI(forErrors, taintMe, rslt);
View Full Code Here

   * @param str The fully expanded URI
   */
  protected void checkIdSymbol(Taint taintMe, AbsXMLContext ctxt, String str)
    throws SAXParseException {
    if (arp.idsUsed != null) {
      IRI uri = ctxt.uri;
            Map<String,Location> idsUsedForBase = idsUsed().get(uri);
      if (idsUsedForBase == null) {
        idsUsedForBase = new HashMap<String, Location>();
        idsUsed().put(uri, idsUsedForBase);
      }
View Full Code Here

    public XMLHandler getXMLHandler() {
        return arp;
    }

    protected String resolve(Taint taintMe,AbsXMLContext x, String uri) throws SAXParseException {
        IRI ref = x.resolveAsURI(arp,taintMe,uri);
//        checkBadURI(taintMe,ref);
        return ref.toString();
    }
View Full Code Here

    }
   
    @Override
    public IRI makeIRI(String uriStr, long line, long col)
    {
        IRI iri = prologue.getResolver().resolveSilent(uriStr) ;
        CheckerIRI.iriViolations(iri, errorHandler, line, col) ;
        return iri ;
    }
View Full Code Here

    }
   
    @Override
    public IRI makeIRI(String uriStr, long line, long col)
    {
        IRI iri = prologue.getResolver().resolve(uriStr) ;
        return iri ;
    }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.iri.IRI

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.