Examples of XSDVocabulary


Examples of org.semanticweb.owl.vocab.XSDVocabulary

     * that number.
     * @param n The <code>Number</code> whose datatype is to be obtained.
     * @return The datatype that corresponds to the type of number.
     */
    public static <N extends Number> OWLDataType getDataType(OWLDataFactory dataFactory, N n) {
        XSDVocabulary v = numberTypeMap.get(n.getClass());
        if (v == null) {
            throw new OWLRuntimeException("Don't know how to translate " + n.getClass());
        }
        return dataFactory.getOWLDataType(v.getURI());
    }
View Full Code Here

Examples of org.semanticweb.owlapi.vocab.XSDVocabulary

    @Test
    public void shouldParseXSDSTRING() {
        // given
        String s = "xsd:string";
        // when
        XSDVocabulary v = XSDVocabulary.parseShortName(s);
        // then
        assertEquals(XSDVocabulary.STRING, v);
        assertEquals(OWL2Datatype.XSD_STRING.getDatatype(df),
                df.getOWLDatatype(v.getIRI()));
    }
View Full Code Here

Examples of org.semanticweb.owlapi.vocab.XSDVocabulary

     *
     * @param n The <code>Number</code> whose datatype is to be obtained.
     * @return The datatype that corresponds to the type of number.
     */
    public static <N extends Number> OWLDatatype getDatatype(OWLDataFactory dataFactory, N n) {
        XSDVocabulary v = numberTypeMap.get(n.getClass());
        if (v == null) {
            throw new OWLRuntimeException("Don't know how to translate " + n.getClass());
        }
        return dataFactory.getOWLDatatype(v.getIRI());
    }
View Full Code Here

Examples of org.semanticweb.owlapi.vocab.XSDVocabulary

     * that number.
     * @param n The <code>Number</code> whose datatype is to be obtained.
     * @return The datatype that corresponds to the type of number.
     */
    public static <N extends Number> OWLDatatype getDatatype(OWLDataFactory dataFactory, N n) {
        XSDVocabulary v = numberTypeMap.get(n.getClass());
        if (v == null) {
            throw new OWLRuntimeException("Don't know how to translate " + n.getClass());
        }
        return dataFactory.getOWLDatatype(v.getIRI());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.