public static void main(String... args) { //IRIFactory iriFactory = IRIFactory.iriImplementation() ; IRIFactory iriFactory = IRIResolver.iriFactory() ; boolean first = true ; for ( String iriStr : args ) { if ( iriStr.startsWith("<") && iriStr.endsWith(">") ) iriStr = iriStr.substring(1, iriStr.length()-1) ; if ( ! first ) System.out.println() ; first = false ; IRI iri = iriFactory.create(iriStr) ; System.out.println(iriStr + " ==> "+iri) ; if ( iri.isRelative() ) System.out.println("Relative: "+iri.isRelative()) ; Iterator<Violation> vIter = iri.violations(true) ; for ( ; vIter.hasNext() ; ) { System.out.println(vIter.next().getShortMessage()) ; } } }
public static void main(String... args) { //IRIFactory iriFactory = IRIFactory.iriImplementation() ; IRIFactory iriFactory = IRIResolver.iriFactory() ; boolean first = true ; for ( String iriStr : args ) { if ( iriStr.startsWith("<") && iriStr.endsWith(">") ) iriStr = iriStr.substring(1, iriStr.length()-1) ; if ( ! first ) System.out.println() ; first = false ; IRI iri = iriFactory.create(iriStr) ; System.out.println(iriStr + " ==> "+iri) ; if ( iri.isRelative() ) System.out.println("Relative: "+iri.isRelative()) ; Iterator<Violation> vIter = iri.violations(true) ; for ( ; vIter.hasNext() ; ) { System.out.println(vIter.next().getShortMessage()) ; } } }
public static void main(String[] args) { IRIFactory iriFactory = IRIFactory.iriImplementation() ; iriFactory = IRIResolver.iriFactory ; boolean first = true ; for ( String iriStr : args ) { if ( ! first ) System.out.println() ; first = false ; IRI iri = iriFactory.create(iriStr) ; System.out.println(iriStr + " ==> "+iri) ; if ( iri.isRelative() ) System.out.println("Relative: "+iri.isRelative()) ; Iterator<Violation> vIter = iri.violations(true) ; for ( ; vIter.hasNext() ; ) { System.out.println(vIter.next().getShortMessage()) ; } } }
if ( iri.isRelative() ) System.out.println("Relative IRI: "+iriStr) ;
if ( iri.isRelative() ) System.out.println("Relative IRI: "+iriStr) ;
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); }
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); }
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); }
@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); }
@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); }
@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); }
boolean includeIRIwarnings, long line, long col) { if ( !allowRelativeIRIs && iri.isRelative() ) errorHandler.error("Relative IRI: " + iri, line, col) ;
long line, long col) if ( ! allowRelativeIRIs && iri.isRelative() ) errorHandler.error("Relative IRI: "+iri, line, col) ;
List<String> warnings = new ArrayList<>() ; if ( iri.isRelative() ) warnings.add("Relative IRI: "+iriStr) ;
List<String> warnings = new ArrayList<>() ; if ( iri.isRelative() ) warnings.add("Relative IRI: "+iriStr) ;