String resolveTerm(String term) { String termUri = url + term; if (terms == null && RIUtils.isAbsoluteIri(termUri) || terms != null && terms.contains(termUri)) { return termUri; } return null; }
String resolveTerm(String term) { String termUri = url + term; if (terms == null && RIUtils.isAbsoluteIri(termUri) || terms != null && terms.contains(termUri)) { return termUri; } return null; }
String resolveTerm(String term) { String termUri = url + term; if (terms == null && RIUtils.isAbsoluteIri(termUri) || terms != null && terms.contains(termUri)) { return termUri; } return null; }
private void processLangAndBase(Attributes attrs) throws SAXException { String lang = langStack.peek(); if (attrs.getValue(XmlUtils.XML_LANG) != null) { lang = attrs.getValue(XmlUtils.XML_LANG); } langStack.push(lang); String base = baseStack.peek(); if (attrs.getValue(XmlUtils.XML_BASE) != null) { base = attrs.getValue(XmlUtils.XML_BASE); if (base.contains("#")) { base = base.substring(0, base.lastIndexOf('#')); } base += '#'; if (!RIUtils.isAbsoluteIri(base)) { error("Invalid base IRI"); base = baseStack.peek(); } } baseStack.push(base); }
private void processLangAndBase(Attributes attrs) throws SAXException { String lang = langStack.peek(); if (attrs.getValue(XmlUtils.XML_LANG) != null) { lang = attrs.getValue(XmlUtils.XML_LANG); } langStack.push(lang); String base = baseStack.peek(); if (attrs.getValue(XmlUtils.XML_BASE) != null) { base = attrs.getValue(XmlUtils.XML_BASE); if (base.contains("#")) { base = base.substring(0, base.lastIndexOf('#')); } base += '#'; if (!RIUtils.isAbsoluteIri(base)) { error("Invalid base IRI"); base = baseStack.peek(); } } baseStack.push(base); }
private void processLangAndBase(Attributes attrs) throws SAXException { String lang = langStack.peek(); if (attrs.getValue(XmlUtils.XML_LANG) != null) { lang = attrs.getValue(XmlUtils.XML_LANG); } langStack.push(lang); String base = baseStack.peek(); if (attrs.getValue(XmlUtils.XML_BASE) != null) { base = attrs.getValue(XmlUtils.XML_BASE); if (base.contains("#")) { base = base.substring(0, base.lastIndexOf('#')); } base += '#'; if (!RIUtils.isAbsoluteIri(base)) { error("Invalid base IRI"); base = baseStack.peek(); } } baseStack.push(base); }
/** * Resolves specified IRI ignoring special cases * @param baseIri base to resolve against * @param iri IRI to resolve * @return resolved IRI or null on error * @throws SAXException */ private String resolveIRINoResolve(String baseIri, String iri) throws SAXException { if (RIUtils.isAbsoluteIri(iri)) { return iri; } if (!XmlUtils.isValidNCName(iri)) { error("Vocab term must be a valid NCName"); return null; } String result = baseIri + iri; if (RIUtils.isAbsoluteIri(result)) { return result; } error("Malformed IRI: " + iri); return null; }
/** * Resolves specified IRI ignoring special cases * @param baseIri base to resolve against * @param iri IRI to resolve * @return resolved IRI or null on error * @throws SAXException */ private String resolveIRINoResolve(String baseIri, String iri) throws SAXException { if (RIUtils.isAbsoluteIri(iri)) { return iri; } if (!XmlUtils.isValidNCName(iri)) { error("Vocab term must be a valid NCName"); return null; } String result = baseIri + iri; if (RIUtils.isAbsoluteIri(result)) { return result; } error("Malformed IRI: " + iri); return null; }
/** * Resolves specified IRI ignoring special cases * @param baseIri base to resolve against * @param iri IRI to resolve * @return resolved IRI or null on error * @throws SAXException */ private String resolveIRINoResolve(String baseIri, String iri) throws SAXException { if (RIUtils.isAbsoluteIri(iri)) { return iri; } if (!XmlUtils.isValidNCName(iri)) { error("Vocab term must be a valid NCName"); return null; } String result = baseIri + iri; if (RIUtils.isAbsoluteIri(result)) { return result; } error("Malformed IRI: " + iri); return null; }