DatatypeProperty.java
01 /*
02  *  DatatypeProperty.java
03  *
04  *  Niraj Aswani, 09/March/07
05  *
06  *  $Id: DatatypeProperty.java 11598 2009-10-13 13:44:17Z johann_p $
07  */
08 package gate.creole.ontology;
09 
10 import java.util.Set;
11 
12 /**
13  * Interface for datatype properties. Datatype properties have as range values
14  * datatype values (different from object properties which have instances as
15  * values). Values are Java objects.
16  *
17  @author Niraj Aswani
18  
19  */
20 public interface DatatypeProperty extends RDFProperty {
21 
22   /**
23    * Returns the set of domain restrictions for this property.
24    */
25   public Set<OResource> getDomain();
26 
27     
28   /**
29    * This method returns the DataType set for this property
30    @return
31    */
32   public DataType getDataType();
33 
34   /**
35    * Checks whether the provided datatype value is compatible with the DataType
36    * restrictions on the property.
37    
38    @param aValue
39    *          the Value
40    @return true if this datatype value is compatible with the DataType restrictions on
41    *         the property. False otherwise.
42    */
43   public boolean isValidDataTypeValue(String value);
44 
45   /**
46    * Checks whether the provided instance is compatible with the domain
47    * restrictions on the property.
48    
49    @param anInstance
50    *          the Instance
51    @return true if this instance is compatible with the domain restrictions on
52    *         the property. False otherwise.
53    */
54   public boolean isValidDomain(OInstance anInstance);
55 
56 }