org.meta2project.storage
Class DBTProperty

java.lang.Object
  extended by org.meta2project.storage.DBEntity
      extended by org.meta2project.storage.DBTProperty
All Implemented Interfaces:
AnnotatedEntity, NamedEntity, Property, TProperty

public class DBTProperty
extends DBEntity
implements TProperty

Author:
Aleksey Yakunin

Field Summary
 
Fields inherited from interface org.meta2project.model.AnnotatedEntity
CASCADE, CASCADE_DELETE_VALUE, COMMENT, MAX_CARD, MIN_CARD, MODEL_URI, TITLE
 
Constructor Summary
DBTProperty(DBConnection con, CachedTProperty cachedEntity)
           
 
Method Summary
 void delete()
          Удалить свойство.
 java.util.List<java.lang.String> getAllValues()
          Get all values of the tproperty for all objects (from all ontologies).
 OntClass getDomain()
          Get property domain
 EntityCache getEntityCache()
           
 java.lang.Integer getMaxCardinality()
          Получить максимальную кардинальность
 java.lang.Integer getMinCardinality()
          Get min.cardinality
 java.util.Collection<OntObject> getOwners(java.lang.String value)
          Get the collection of objects, which values of this tproperty equal to the specified value at least one time.
 Type getRange()
          Get the range data type for the tproperty.
 void setDomain(OntClass cl)
          Set property domain
 void setRange(Type r)
          Set range (may be null)
 
Methods inherited from class org.meta2project.storage.DBEntity
equals, getAnnotation, getAnnotationNames, getFullName, getId, getName, getOntology, hashCode, putAnnotation, setName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.meta2project.model.NamedEntity
getFullName, getName, getOntology, setName
 
Methods inherited from interface org.meta2project.model.AnnotatedEntity
getAnnotation, getAnnotationNames, putAnnotation
 

Constructor Detail

DBTProperty

public DBTProperty(DBConnection con,
                   CachedTProperty cachedEntity)
Method Detail

getEntityCache

public EntityCache getEntityCache()
Specified by:
getEntityCache in class DBEntity

getRange

public Type getRange()
Description copied from interface: TProperty
Get the range data type for the tproperty.

Specified by:
getRange in interface TProperty
Returns:
range data type

getDomain

public OntClass getDomain()
Description copied from interface: Property
Get property domain

Specified by:
getDomain in interface Property
Returns:
null, if domain is any object

getMinCardinality

public java.lang.Integer getMinCardinality()
Description copied from interface: Property
Get min.cardinality

Specified by:
getMinCardinality in interface Property
Returns:
null is equivalent to 0

getMaxCardinality

public java.lang.Integer getMaxCardinality()
Получить максимальную кардинальность

Specified by:
getMaxCardinality in interface Property
Returns:
если null, то бесконечность

getAllValues

public java.util.List<java.lang.String> getAllValues()
Description copied from interface: TProperty
Get all values of the tproperty for all objects (from all ontologies). If there are no such values, the method returns the empty list.

Specified by:
getAllValues in interface TProperty
Returns:
values list (distinct)

getOwners

public java.util.Collection<OntObject> getOwners(java.lang.String value)
Description copied from interface: TProperty
Get the collection of objects, which values of this tproperty equal to the specified value at least one time.

Specified by:
getOwners in interface TProperty
Parameters:
value - the value to find
Returns:
object collection (distinct)

delete

public void delete()
Удалить свойство. Если свойство используется в значении свойств объектов, то оно не может быть удалено.

Specified by:
delete in interface NamedEntity
Specified by:
delete in interface Property

setDomain

public void setDomain(OntClass cl)
Description copied from interface: Property
Set property domain

Specified by:
setDomain in interface Property
Parameters:
cl - domain class (may be null)

setRange

public void setRange(Type r)
Description copied from interface: TProperty
Set range (may be null)

Specified by:
setRange in interface TProperty
Parameters:
r - range type, may be null