org.semanticweb.owl.util
Class OWLDataUtil

java.lang.Object
  extended by org.semanticweb.owl.util.OWLDataUtil

public class OWLDataUtil
extends java.lang.Object

Author: Matthew Horridge
The University Of Manchester
Bio-Health Informatics Group
Date: 06-Jan-2007

A collection of utility methods for creating common data values and data ranges


Constructor Summary
OWLDataUtil()
           
 
Method Summary
static
<N extends java.lang.Number>
OWLDataType
getDataType(OWLDataFactory dataFactory, N n)
          Given a Number, this method returns the datatype of that number.
static OWLDataType getDoubleDataType(OWLDataFactory dataFactory)
           
static java.util.Set<OWLDataRangeFacetRestriction> getFacetRestrictionSet(OWLDataFactory dataFactory, OWLRestrictedDataRangeFacetVocabulary facet, OWLTypedConstant facetValue)
           
static OWLDataType getFloatDataType(OWLDataFactory dataFactory)
           
static OWLDataType getIntDataType(OWLDataFactory dataFactory)
           
static OWLDataType getLongDataType(OWLDataFactory dataFactory)
           
static
<N extends java.lang.Number>
OWLDataRange
getMaxExclusiveRestrictedInteger(OWLDataFactory dataFactory, N maxExclusive)
           
static
<N extends java.lang.Number>
OWLDataRange
getMaxInclusiveRestrictedInteger(OWLDataFactory dataFactory, N maxInclusive)
           
static
<N extends java.lang.Number>
OWLDataRange
getMinExclusiveRestrictedInt(OWLDataFactory dataFactory, N minExclusive)
           
static
<N extends java.lang.Number>
OWLDataRange
getMinInclusiveRestrictedInt(OWLDataFactory dataFactory, N minInclusive)
           
static
<N extends java.lang.Number>
OWLDataRange
getMinMaxExclusiveRestrictedInteger(OWLDataFactory dataFactory, N minExclusive, N maxExclusive)
           
static
<N extends java.lang.Number>
OWLDataRange
getMinMaxInclusiveRestrictedInteger(OWLDataFactory dataFactory, N minInclusive, N maxInclusive)
           
static
<N extends java.lang.Number>
OWLTypedConstant
getTypedConstant(OWLDataFactory dataFactory, N val)
          Given a number, returns a typed constant that represent the number.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OWLDataUtil

public OWLDataUtil()
Method Detail

getIntDataType

public static OWLDataType getIntDataType(OWLDataFactory dataFactory)
                                  throws OWLException
Throws:
OWLException

getLongDataType

public static OWLDataType getLongDataType(OWLDataFactory dataFactory)
                                   throws OWLException
Throws:
OWLException

getFloatDataType

public static OWLDataType getFloatDataType(OWLDataFactory dataFactory)
                                    throws OWLException
Throws:
OWLException

getDoubleDataType

public static OWLDataType getDoubleDataType(OWLDataFactory dataFactory)
                                     throws OWLException
Throws:
OWLException

getDataType

public static <N extends java.lang.Number> OWLDataType getDataType(OWLDataFactory dataFactory,
                                                                   N n)
Given a Number, this method returns the datatype of that number.

Parameters:
n - The Number whose datatype is to be obtained.
Returns:
The datatype that corresponds to the type of number.

getFacetRestrictionSet

public static java.util.Set<OWLDataRangeFacetRestriction> getFacetRestrictionSet(OWLDataFactory dataFactory,
                                                                                 OWLRestrictedDataRangeFacetVocabulary facet,
                                                                                 OWLTypedConstant facetValue)

getTypedConstant

public static <N extends java.lang.Number> OWLTypedConstant getTypedConstant(OWLDataFactory dataFactory,
                                                                             N val)
Given a number, returns a typed constant that represent the number.

Parameters:
val - The number to be translated to a typed constant.
Returns:
The typed constant, consisting of a string literal and datatype that corresponds to the translation of the specified number.

getMinInclusiveRestrictedInt

public static <N extends java.lang.Number> OWLDataRange getMinInclusiveRestrictedInt(OWLDataFactory dataFactory,
                                                                                     N minInclusive)

getMinExclusiveRestrictedInt

public static <N extends java.lang.Number> OWLDataRange getMinExclusiveRestrictedInt(OWLDataFactory dataFactory,
                                                                                     N minExclusive)

getMaxInclusiveRestrictedInteger

public static <N extends java.lang.Number> OWLDataRange getMaxInclusiveRestrictedInteger(OWLDataFactory dataFactory,
                                                                                         N maxInclusive)

getMaxExclusiveRestrictedInteger

public static <N extends java.lang.Number> OWLDataRange getMaxExclusiveRestrictedInteger(OWLDataFactory dataFactory,
                                                                                         N maxExclusive)

getMinMaxInclusiveRestrictedInteger

public static <N extends java.lang.Number> OWLDataRange getMinMaxInclusiveRestrictedInteger(OWLDataFactory dataFactory,
                                                                                            N minInclusive,
                                                                                            N maxInclusive)

getMinMaxExclusiveRestrictedInteger

public static <N extends java.lang.Number> OWLDataRange getMinMaxExclusiveRestrictedInteger(OWLDataFactory dataFactory,
                                                                                            N minExclusive,
                                                                                            N maxExclusive)