Package edu.stanford.bmir.protege.web.shared.entity

Examples of edu.stanford.bmir.protege.web.shared.entity.OWLLiteralData


     * @return The specified content and optional language parsed into an {@link OWLLiteralData} object.  Not {@code
     *         null}.
     */
    private OWLLiteralData parseLiteralData(String trimmedContent, Optional<String> language) {
        OWLLiteral literal = DataFactory.parseLiteral(trimmedContent, language);
        return new OWLLiteralData(literal);
    }
View Full Code Here


            return;
        }

        if (lang.isPresent()) {
            if (allowedTypes.contains(PrimitiveType.LITERAL)) {
                OWLLiteralData literalData = parseLiteralData(trimmedContent, lang);
                callback.onSuccess(Optional.<OWLPrimitiveData>of(literalData));
            }
            else {
                // TODO: Literal not expected
                callback.parsingFailure();
View Full Code Here

        else if (allowedTypes.contains(PrimitiveType.IRI) && isAbsoluteIRI(trimmedContent)) {
            IRIData iriData = new IRIData(IRI.create(trimmedContent));
            callback.onSuccess(Optional.<OWLPrimitiveData>of(iriData));
        }
        else if (allowedTypes.contains(PrimitiveType.LITERAL)) {
            OWLLiteralData literalData = parseLiteralData(trimmedContent, lang);
            callback.onSuccess(Optional.<OWLPrimitiveData>of(literalData));
        }
        else {
            callback.parsingFailure();
        }
View Full Code Here

    }


    private void verifyResult(String lexicalValue, OWL2Datatype datatype) {
        OWLLiteral expected = dataFactory.getOWLLiteral(lexicalValue, datatype);
        Optional<OWLPrimitiveData> expectedData = Optional.<OWLPrimitiveData>of(new OWLLiteralData(expected));
        Mockito.verify(primitiveDataParserCallback).onSuccess(expectedData);
    }
View Full Code Here

TOP

Related Classes of edu.stanford.bmir.protege.web.shared.entity.OWLLiteralData

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.