Package org.semarglproject.ri

Examples of org.semarglproject.ri.MalformedIriException


     * @return resource IRI
     * @throws org.semarglproject.ri.MalformedIriException if IRI can not be resolved
     */
    String resolvePredOrDatatype(String value) throws MalformedIriException {
        if (value == null || value.isEmpty()) {
            throw new MalformedIriException("Empty predicate or datatype found");
        }
        if (value == RdfaParser.AUTODETECT_DATE_DATATYPE) {
            return RdfaParser.AUTODETECT_DATE_DATATYPE;
        }
        return resolveTermOrCurieOrAbsIri(value);
View Full Code Here


            } else {
                term = resolveXhtmlTerm(value);
            }
            if (term == null) {
                documentContext.parser.warning(RDFa.UNRESOLVED_TERM, CAN_NOT_RESOLVE_TERM + value);
                throw new MalformedIriException(CAN_NOT_RESOLVE_TERM + value);
            }
            return term;
        }
        return resolveCurieOrIri(value, true);
    }
View Full Code Here

        String result = resolveMapping(curie, delimPos, safeSyntax);
        if (RIUtils.isIri(result)) {
            return result;
        }
        throw new MalformedIriException("Malformed IRI: " + curie);
    }
View Full Code Here

    private String resolve(String value, boolean ignoreRelIri, boolean useVocab) throws MalformedIriException {
        if (value == null || value.startsWith(RDF.BNODE_PREFIX)) {
            return value;
        }
        if (value.isEmpty()) {
            throw new MalformedIriException("Empty IRI");
        }
        try {
            String mapping = resolveMapping(value, useVocab);
            if (mapping != null && mapping.charAt(0) != '@') {
                if (mapping.startsWith(RDF.BNODE_PREFIX)) {
View Full Code Here

            }
        }
        if (useVocab && vocab != null && value.indexOf(':') == -1) {
            return vocab + value;
        }
        throw new MalformedIriException("Can't resolve term " + value);
    }
View Full Code Here

        } catch (MalformedIriException e) {
            if (RIUtils.isIri(curie)) {
                return curie;
            }
        }
        throw new MalformedIriException("Malformed IRI: " + curie);
    }
View Full Code Here

TOP

Related Classes of org.semarglproject.ri.MalformedIriException

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.