GATE
Version 3.1-2270

gate.creole.ontology
Interface Property

All Superinterfaces:
OntologyConstants, OntologyResource
All Known Subinterfaces:
DatatypeProperty, ObjectProperty, ReflexiveProperty, SymmetricProperty, TransitiveProperty
All Known Implementing Classes:
DatatypePropertyImpl, ObjectPropertyImpl, PropertyImpl, SymmetricPropertyImpl, TransitivePropertyImpl

public interface Property
extends OntologyResource, OntologyConstants

This interface defines an ontology property and is the top level interface for all types of ontological properties.


Field Summary
 
Fields inherited from interface gate.creole.ontology.OntologyConstants
DIRECT_CLOSURE, TRANSITIVE_CLOSURE
 
Method Summary
 void addSubProperty(Property property)
          Add a SuperPropertyOf relation between the given property and this.
 void addSuperProperty(Property property)
          Adds a SubPropertyOf relation between the given property and this.
 Set getDomain()
          Returns the set of domain restrictions for this property.
 Set getRange()
          Gets the set of range restrictions for this property.
 Set getSamePropertyAs()
          Returns a set of all KBProperty instances that are in SamePropertyAs relation with this property.
 Set getSubProperties(byte closure)
          Gets the set of sub-properties for this property.
 Set getSuperProperties(byte closure)
          Gets the set of super-properties for this property.
 boolean isFunctional()
          Answers whether this property is a functional property.
 boolean isInverseFunctional()
          Answers whether this property is an inverse functional property.
 boolean isValidDomain(OntologyResource instance)
          Checks whether this property can apply to the provided instance
 boolean isValidRange(Object value)
           
 void removeSubProperty(Property property)
          Removes a SuperPropertyOf relation between the given property and this.
 void removeSuperProperty(Property property)
          Removes a SubPropertyOf relation between the given property and this.
 void setFunctional(boolean functional)
          Sets the functional property flag on this property.
 void setInverseFunctional(boolean inverseFunctional)
          Sets the inverse functional property flag on this property.
 void setSamePropertyAs(Property theProperty)
          Add a samePropertyAs relation between the two properties.
 
Methods inherited from interface gate.creole.ontology.OntologyResource
addPropertyValue, getComment, getName, getOntology, getPropertyValues, getSetPropertiesNames, getTaxonomy, getURI, removePropertyValue, removePropertyValues, setComment, setName, setURI
 

Method Detail

setSamePropertyAs

void setSamePropertyAs(Property theProperty)
Add a samePropertyAs relation between the two properties. Each property has a set of these, so it is possible to have samePropertyAs relation between more than two properties.

Parameters:
theProperty -

getSamePropertyAs

Set getSamePropertyAs()
Returns a set of all KBProperty instances that are in SamePropertyAs relation with this property. Or null if there are no such properties.

Returns:
a Set value.

addSuperProperty

void addSuperProperty(Property property)
Adds a SubPropertyOf relation between the given property and this.

Parameters:
property -

removeSuperProperty

void removeSuperProperty(Property property)
Removes a SubPropertyOf relation between the given property and this.

Parameters:
property -

addSubProperty

void addSubProperty(Property property)
Add a SuperPropertyOf relation between the given property and this.

Parameters:
property -

removeSubProperty

void removeSubProperty(Property property)
Removes a SuperPropertyOf relation between the given property and this.

Parameters:
property -

getDomain

Set getDomain()
Returns the set of domain restrictions for this property.


getRange

Set getRange()
Gets the set of range restrictions for this property. If no range has been set it returns an empty set.

Returns:
a set of OClass or Class objects.

isValidDomain

boolean isValidDomain(OntologyResource instance)
Checks whether this property can apply to the provided instance

Parameters:
instance - the instance
Returns:
true if the property is valid for the instance.

isValidRange

boolean isValidRange(Object value)
Parameters:
value -
Returns:
true if this value is compatible with the range restrictions on the property. False otherwise.

isFunctional

boolean isFunctional()
Answers whether this property is a functional property. Functional properties are the ones that can have at most one value for any given value from the domain. Both object properties and datatype properties can be functional.

Returns:
true if this property is functional.

setFunctional

void setFunctional(boolean functional)
Sets the functional property flag on this property.

Parameters:
functional - true iff the property should be marked as functional.

isInverseFunctional

boolean isInverseFunctional()
Answers whether this property is an inverse functional property. Inverse functional properties are the ones that for any given domain value there can be at most one range value that is valid for this property. Both object properties and datatype properties can be inverse functional.

Returns:
true if this property is inverse functional.

setInverseFunctional

void setInverseFunctional(boolean inverseFunctional)
Sets the inverse functional property flag on this property.

Parameters:
inverseFunctional - true iff the property should be marked as inverse functional.

getSuperProperties

Set getSuperProperties(byte closure)
Gets the set of super-properties for this property.

Parameters:
{@link - OntologyConstants#DIRECT_CLOSURE} for direct super-properties only or OntologyConstants.TRANSITIVE_CLOSURE for all the super-properties.
Returns:
a set of Property values.

getSubProperties

Set getSubProperties(byte closure)
Gets the set of sub-properties for this property.

Parameters:
{@link - OntologyConstants#DIRECT_CLOSURE} for direct sub-properties only or OntologyConstants.TRANSITIVE_CLOSURE for all the sub-properties.
Returns:
a set of Property values.

GATE
Version 3.1-2270