org.omwg.ontology
Interface Attribute

All Superinterfaces:
Entity

public interface Attribute
extends Entity

Defines WSMO attribute. Attribute could be specified as Concept Attribute (attribute which has no {link WsmlDataType} as range) or Data Attribute.

Version:
$Revision: 1946 $Date:
Author:
not attributable, not attributable
See Also:
Concept

Method Summary
 void addType(Type type)
          Adds a new Type as range for this attribute.
 Concept getConcept()
          Returns the Concept described by this attribute.
 Identifier getInverseOf()
          Returns the inverse attribute of this attribute.
 int getMaxCardinality()
          Returns the maximal cardinality constraint of this attribute.
 int getMinCardinality()
          Returns the minimal cardinality constraint of this attribute.
 boolean isConstraining()
          Returns the type of this attribute.
 boolean isReflexive()
          Returns if this attribute is defined as reflexive.
 boolean isSymmetric()
          Returns if this attribute is defined as symmetric.
 boolean isTransitive()
          Returns if this attribute is defined as transitive.
 Set<Type> listTypes()
          Returns the list of allowed Type for the current attribute.
 void removeType(Type type)
          Removes a Type for this attribute.
 void setConstraining(boolean constraining)
          Sets the type of this attribute.
 void setInverseOf(Identifier id)
          Sets this attribute to be inverse of another attribute.
 void setMaxCardinality(int max)
          Sets the maximal cardinality constraint of this attribute.
 void setMinCardinality(int min)
          Sets the minimal cardinality constraint of this attribute.
 void setReflexive(boolean reflexive)
          Sets this attribute whether to be reflexive.
 void setSymmetric(boolean symmetric)
          Sets this attribute whether to be symmetric.
 void setTransitive(boolean trans)
          Sets this attribute whether to be transitive.
 
Methods inherited from interface org.wsmo.common.Entity
addNFPValue, addNFPValue, getIdentifier, listNFPValues, listNFPValues, removeNFP, removeNFPValue, removeNFPValue
 

Method Detail

isConstraining

boolean isConstraining()
Returns the type of this attribute.

Returns:
true (constraining) / false (inferring)

setConstraining

void setConstraining(boolean constraining)
Sets the type of this attribute.

Parameters:
constraining - true (constraining) / false (inferring)

getMinCardinality

int getMinCardinality()
Returns the minimal cardinality constraint of this attribute. The cardinality option is only available to Concept Attributes.

Returns:
number indicating the minimal cardinality constraint

setMinCardinality

void setMinCardinality(int min)
Sets the minimal cardinality constraint of this attribute. The cardinality option is only available to Concept Attributes.

Parameters:
min - number indicating the minimal cardinality constraint

getMaxCardinality

int getMaxCardinality()
Returns the maximal cardinality constraint of this attribute. The cardinality option is only available to Concept Attributes.

Returns:
number indicating the maximal cardinality constraint

setMaxCardinality

void setMaxCardinality(int max)
Sets the maximal cardinality constraint of this attribute. The cardinality option is only available to Concept Attributes. For specifiying unrestricted MAX cardinality use: Integer.MAX_VALUE.


getConcept

Concept getConcept()
Returns the Concept described by this attribute.

Returns:
Concept

listTypes

Set<Type> listTypes()
Returns the list of allowed Type for the current attribute.

Returns:
Set of Type objects

addType

void addType(Type type)
             throws InvalidModelException
Adds a new Type as range for this attribute.

Parameters:
type - the Type to be added
Throws:
InvalidModelException

removeType

void removeType(Type type)
                throws InvalidModelException
Removes a Type for this attribute.

Parameters:
type - the Type to be removed
Throws:
InvalidModelException

isReflexive

boolean isReflexive()
Returns if this attribute is defined as reflexive. This option is available only for the concept attribtues.

Returns:

setReflexive

void setReflexive(boolean reflexive)
Sets this attribute whether to be reflexive. This option is available only for the concept attribtues.

Parameters:
reflexive - is reflexive

isSymmetric

boolean isSymmetric()
Returns if this attribute is defined as symmetric. When an attribute is specified as being symmetric, this means that if an individual a has a symmetric attribute att with value b, then b also has attribute att with value a. This option is available only for the concept attribtues.

Returns:

setSymmetric

void setSymmetric(boolean symmetric)
Sets this attribute whether to be symmetric. This option is available only for the concept attribtues.

Parameters:
symmetric - is reflexive

isTransitive

boolean isTransitive()
Returns if this attribute is defined as transitive. When an attribute is specified as being transitive, this means that if three individuals a, b and c are related via a transitive attribute att in such a way: a att b att c then c is also a value for the attribute att at a: a att c. This option is available only for the concept attribtues.

Returns:

setTransitive

void setTransitive(boolean trans)
Sets this attribute whether to be transitive. This option is available only for the concept attribtues.

Parameters:
trans - is reflexive

getInverseOf

Identifier getInverseOf()
Returns the inverse attribute of this attribute. When an attribute is specified as being the inverse of another attribute, this means that if an individual a has an attribute att1 with value b and att1 is the inverse of a certain attribute att2, then it is inferred that b has an attribute att2 with value a. This option is available only for the concept attribtues.

Returns:
null or the inverse attribute's identifier

setInverseOf

void setInverseOf(Identifier id)
Sets this attribute to be inverse of another attribute.

Parameters:
id - attribute to be set as inverse of or null to remove the current inverse attribute


Copyright © 2004-2008 Ontotext Lab.. All Rights Reserved.