org.opentox.toxotis.ontology.impl
Class OTPropertyImpl

java.lang.Object
  extended by org.opentox.toxotis.ontology.impl.OTPropertyImpl
All Implemented Interfaces:
Serializable, OTProperty, OTResource
Direct Known Subclasses:
OTDatatypePropertyImpl, OTObjectPropertyImpl

public abstract class OTPropertyImpl
extends Object
implements OTProperty

Author:
Pantelis Sopasakis, Charalampos Chomenides
See Also:
Serialized Form

Constructor Summary
OTPropertyImpl()
           
OTPropertyImpl(String name)
           
OTPropertyImpl(String name, String nameSpace)
           
 
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.
 String getUri()
          The URI of the ontological resource that uniquely identifies it.
 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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OTPropertyImpl

public OTPropertyImpl()

OTPropertyImpl

public OTPropertyImpl(String name)

OTPropertyImpl

public OTPropertyImpl(String name,
                      String nameSpace)
Method Detail

getMetaInfo

public MetaInfo getMetaInfo()
Description copied from interface: OTProperty
Get the meta information available abou the property.

Specified by:
getMetaInfo in interface OTProperty
Returns:
Meta information as an instance of MetaInfo.

setMetaInfo

public void setMetaInfo(MetaInfo metaInfo)
Description copied from interface: OTProperty
Provide meta-information about the property

Specified by:
setMetaInfo in interface OTProperty
Parameters:
metaInfo - Meta information about the property.

getDomain

public Collection<OntologicalClass> getDomain()
Description copied from interface: OTProperty
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.

Specified by:
getDomain in interface OTProperty
Returns:
A collection of the ontological classes that constitute the domain of the ontological property.

setDomain

public void setDomain(Collection<OntologicalClass> domain)
Description copied from interface: OTProperty
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.

Specified by:
setDomain in interface OTProperty
Parameters:
domain - A collection of the ontological classes that constitute the domain of the ontological property.

getSuperProperties

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

Specified by:
getSuperProperties in interface OTProperty
Returns:
Collection of super-properties.

setSuperProperties

public void setSuperProperties(Collection<OTProperty> superProperties)
Specified by:
setSuperProperties in interface OTProperty
Parameters:
superProperties - Collection of super-properties.
See Also:
getSuperProperties

getNameSpace

public String getNameSpace()
Description copied from interface: OTProperty
Returns the namespace of the ontological property or null if not defined.

Specified by:
getNameSpace in interface OTProperty
Returns:
Namespace of property

setNameSpace

public void setNameSpace(String ns)
Description copied from interface: OTProperty
Specify a namespace for the ontological property

Specified by:
setNameSpace in interface OTProperty
Parameters:
ns - Namespace.

getName

public String getName()
Description copied from interface: OTProperty
Returns the local name of the ontological property omiiting the namespace string.

Specified by:
getName in interface OTProperty
Returns:
local name of the property as a string.

setName

public void setName(String name)
Description copied from interface: OTProperty
Set the local name of the property (namespace not included).

Specified by:
setName in interface OTProperty
Parameters:
name - local name.

getUri

public String getUri()
Description copied from interface: OTResource
The URI of the ontological resource that uniquely identifies it.

Specified by:
getUri in interface OTResource
Returns:
The URI of the resource as a string/

getProperty

public com.hp.hpl.jena.rdf.model.Property getProperty(com.hp.hpl.jena.ontology.OntModel model)
Description copied from interface: OTProperty
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).

Specified by:
getProperty in interface OTProperty
Parameters:
model - Ontological Model
Returns:
Property found in that model of null otherwise.

asProperty

public com.hp.hpl.jena.rdf.model.Property asProperty(com.hp.hpl.jena.ontology.OntModel model)
Description copied from interface: OTProperty
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.

Specified by:
asProperty in interface OTProperty
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.