org.opentox.toxotis.ontology
Interface OTProperty

All Superinterfaces:
OTResource, Serializable
All Known Subinterfaces:
OTDatatypeProperty, OTObjectProperty
All Known Implementing Classes:
OTDatatypePropertyImpl, OTObjectPropertyImpl, OTPropertyImpl

public interface OTProperty
extends OTResource, Serializable

An interface for ontological properties used in OpenTox web services.

Author:
Pantlelis Sopasakis

Method Summary
 com.hp.hpl.jena.rdf.model.Property asProperty(com.hp.hpl.jena.ontology.OntModel model)
          The following note is copied here from the online OWL reference at http://www.w3.org/TR/owl-ref: Cast the OTProperty object as a Property object of Jena.
 Collection<OntologicalClass> getDomain()
          We quote an excperpt of the documentation about the property rdfs:domain found at W3C online reference:
A domain of a property limits the individuals to which the property can be applied.
 MetaInfo getMetaInfo()
          Get the meta information available abou the property.
 String getName()
          Returns the local name of the ontological property omiiting the namespace string.
 String getNameSpace()
          Returns the namespace of the ontological property or null if not defined.
 com.hp.hpl.jena.rdf.model.Property getProperty(com.hp.hpl.jena.ontology.OntModel model)
          Extract the corresponding property (if any) from the given ontological model.
 Collection<OTProperty> getSuperProperties()
          Get a collection of the super-properties of this ontological property declared using rdfs:subPropertyOf.
 void setDomain(Collection<OntologicalClass> domain)
          The following note is copied here from the online OWL reference at http://www.w3.org/TR/owl-ref: For a property one can define (multiple) rdfs:domain axioms.
 void setMetaInfo(MetaInfo metaInfo)
          Provide meta-information about the property
 void setName(String name)
          Set the local name of the property (namespace not included).
 void setNameSpace(String ns)
          Specify a namespace for the ontological property
 void setSuperProperties(Collection<OTProperty> superProperties)
           
 
Methods inherited from interface org.opentox.toxotis.ontology.OTResource
getUri
 

Method Detail

getNameSpace

String getNameSpace()
Returns the namespace of the ontological property or null if not defined.

Returns:
Namespace of property

setNameSpace

void setNameSpace(String ns)
Specify a namespace for the ontological property

Parameters:
ns - Namespace.

getName

String getName()
Returns the local name of the ontological property omiiting the namespace string.

Returns:
local name of the property as a string.

setName

void setName(String name)
Set the local name of the property (namespace not included).

Parameters:
name - local name.

getMetaInfo

MetaInfo getMetaInfo()
Get the meta information available abou the property.

Returns:
Meta information as an instance of MetaInfo.

setMetaInfo

void setMetaInfo(MetaInfo metaInfo)
Provide meta-information about the property

Parameters:
metaInfo - Meta information about the property.

getSuperProperties

Collection<OTProperty> getSuperProperties()
Get a collection of the super-properties of this ontological property declared using rdfs:subPropertyOf.

Returns:
Collection of super-properties.

setSuperProperties

void setSuperProperties(Collection<OTProperty> superProperties)
Parameters:
superProperties - Collection of super-properties.
See Also:
getSuperProperties

getDomain

Collection<OntologicalClass> getDomain()
We quote an excperpt of the documentation about the property rdfs:domain found at W3C online reference:
A domain of a property limits the individuals to which the property can be applied. If a property relates an individual to another individual, and the property has a class as one of its domains, then the individual must belong to the class. For example, the property hasChild may be stated to have the domain of Mammal. From this a reasoner can deduce that if Frank hasChild Anna, then Frank must be a Mammal. Note that rdfs:domain is called a global restriction since the restriction is stated on the property and not just on the property when it is associated with a particular class. See the discussion below on property restrictions for more information.

Returns:
A collection of the ontological classes that constitute the domain of the ontological property.

getProperty

com.hp.hpl.jena.rdf.model.Property getProperty(com.hp.hpl.jena.ontology.OntModel model)
Extract the corresponding property (if any) from the given ontological model. If the property is not found in the data model, the method return null. In that case where the property does not exist in the data model and it should be created, consider using asProperty(OntModel).

Parameters:
model - Ontological Model
Returns:
Property found in that model of null otherwise.

setDomain

void setDomain(Collection<OntologicalClass> domain)
The following note is copied here from the online OWL reference at http://www.w3.org/TR/owl-ref: For a property one can define (multiple) rdfs:domain axioms. Syntactically, rdfs:domain is a built-in property that links a property (some instance of the class rdf:Property) to a class description. An rdfs:domain axiom asserts that the subjects of such property statements must belong to the class extension of the indicated class description.

Parameters:
domain - A collection of the ontological classes that constitute the domain of the ontological property.

asProperty

com.hp.hpl.jena.rdf.model.Property asProperty(com.hp.hpl.jena.ontology.OntModel model)
The following note is copied here from the online OWL reference at http://www.w3.org/TR/owl-ref: Cast the OTProperty object as a Property object of Jena. If the property already exists in the ontological model, it is not recreated but returned to the user. In that case, this method is equivalent to getProperty.

Parameters:
model - The model to which is property is assigned.
Returns:
The created proeprty in the provided Ontological Model.


Copyright © 2011-2012 OpenTox. All Rights Reserved.