Package org.semanticweb.HermiT.datatypes

Examples of org.semanticweb.HermiT.datatypes.UnsupportedFacetException


        String datatypeURI=datatypeRestriction.getDatatypeURI();
        assert s_managedDatatypeURIs.contains(datatypeURI);
        for (int index=datatypeRestriction.getNumberOfFacetRestrictions()-1;index>=0;--index) {
            String facetURI=datatypeRestriction.getFacetURI(index);
            if (!s_supportedFacetURIs.contains(facetURI))
                throw new UnsupportedFacetException("Facet with URI '"+facetURI+"' is not supported on "+Prefixes.STANDARD_PREFIXES.abbreviateIRI(datatypeURI)+".");
            Object facetDataValue=datatypeRestriction.getFacetValue(index).getDataValue();
            if (!(facetDataValue instanceof Integer))
                throw new UnsupportedFacetException("Facet with URI '"+facetURI+"' takes only integers as values.");
            int value=(Integer)facetDataValue;
            if (value<0 || value==Integer.MAX_VALUE)
                throw new UnsupportedFacetException("Facet with URI '"+facetURI+"' does not support integer "+value+" as value.");
        }
    }
View Full Code Here

TOP

Related Classes of org.semanticweb.HermiT.datatypes.UnsupportedFacetException

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.