gr.forth.ics.rdfsuite.swkm.model.impl
Class RDF_Property

java.lang.Object
  extended by gr.forth.ics.rdfsuite.swkm.model.impl.RDF_Resource
      extended by gr.forth.ics.rdfsuite.swkm.model.impl.RDF_Schema_Resource<IRDF_Property,IRDF_SubProperty>
          extended by gr.forth.ics.rdfsuite.swkm.model.impl.RDF_Property
All Implemented Interfaces:
Identifiable, IRDF_Property, IRDF_Resource, IRDF_Schema_Resource<IRDF_Property,IRDF_SubProperty>, java.lang.Comparable

public class RDF_Property
extends RDF_Schema_Resource<IRDF_Property,IRDF_SubProperty>
implements IRDF_Property


Field Summary
protected static org.apache.log4j.Logger log
           
 
Fields inherited from class gr.forth.ics.rdfsuite.swkm.model.impl.RDF_Schema_Resource
direct_propagated_labels, indirect_propagated_labels, propLabelsToBeAdded, propLabelsToBeRemoved, tree_label
 
Fields inherited from class gr.forth.ics.rdfsuite.swkm.model.impl.RDF_Resource
column, comments, isDefinedBys, labels, line, local_name, namespace, seeAlsos, types, uri
 
Constructor Summary
RDF_Property(java.lang.String uri, IRDF_Namespace namespace)
           
 
Method Summary
 java.util.Collection<IRDF_SubProperty> getAllSubPropertiesTriples()
          This method retrieves all the subproperty triples of this Property recursively
 java.util.Collection<IRDF_SubProperty> getAllSuperPropertiesTriples()
          This method retrieves recursively all the superproperty triples of this Property
 java.util.Collection<IRDF_Resource> getAllTypes(IRDF_Model model)
          This dummy method is overriden by methods in subclasses(RDF_Class,RDF_Property e.t.c) Parameter RDF_Model is needed in order for the types to be retrieved from the model
 java.util.Collection<IRDF_Property> getDirectAncestors()
           
 java.util.Collection<IRDF_Property> getDirectDescendants()
           
 java.util.Collection<IRDF_Class> getDomains()
          This method retrieves all the domain classes of this Property
 java.util.Collection<IRDF_Domain> getDomainsTriples()
          This method retrieves all the domain triples with this Property as subject
 java.util.Collection<IRDF_Class> getRanges()
          This method retrieves all the range classes of this Property
 java.util.Collection<IRDF_Range> getRangesTriples()
          This method retrieves all the range triples with this Property as subject
 java.util.Collection<IRDF_SubProperty> getSubPropertiesTriples()
          This method retrieves all the direct subproperty triples of this Property
protected  java.util.Collection<? extends IRDF_SubProperty> getSubsumptionTriples(boolean upward)
           
 java.util.Collection<IRDF_SubProperty> getSuperPropertiesTriples()
          This method retrieves all the direct superproperty triples of this Property
 boolean hasDomain(java.lang.String a_class_uri)
          Tells whether this property has a domain class with uri property_uri
 boolean hasRange(java.lang.String a_class_uri)
          Tells whether this property has a range class with uri class_uri
 boolean isAncestorOf(IRDF_Property rdf_property)
          a is subPropertyOf b if a's treeLabel is contained in any of b's labels
 boolean isDescendantOf(IRDF_Property rdf_property)
          a is subPropertyOf b if a's treeLabel is contained in any of b's labels
 boolean isSubPropertyOf(IRDF_Model model, java.lang.String property_uri)
          Tells whether this property is a subproperty of property with uri property_uri
 boolean isSuperPropertyOf(IRDF_Model model, java.lang.String property_uri)
          Tells whether this property is a superproperty of property with uri property_uri
 
Methods inherited from class gr.forth.ics.rdfsuite.swkm.model.impl.RDF_Schema_Resource
addDirectPropagatedLabel, addDirectPropagatedLabels, addIndirectPropagatedLabel, addIndirectPropagatedLabels, compareTo, contains, getAncestors, getDescendants, getDirectPropagatedLabels, getHasUnstoredLabels, getIndirectPropagatedLabels, getTree_label, printLabels, setDirectPropagatedLabels, setHasUnstoredLabels, setIndirectPropagatedLabels, setTree_label, updateIndirectPropagatedLabel
 
Methods inherited from class gr.forth.ics.rdfsuite.swkm.model.impl.RDF_Resource
getColumn, getComments, getCommentsTriples, getIsDefinedBys, getIsDefinedBysTriples, getLabels, getLabelsTriples, getLine, getLocalName, getNamespace, getNamespacePart, getSeeAlsos, getSeeAlsosTriples, getTypes, getTypesTriples, getURI, hasTypeOf, setColumn, setLine, setLocalName, setNamespace, setURI, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface gr.forth.ics.rdfsuite.swkm.model.IRDF_Schema_Resource
addDirectPropagatedLabel, addDirectPropagatedLabels, addIndirectPropagatedLabel, addIndirectPropagatedLabels, contains, getAncestors, getDescendants, getDirectPropagatedLabels, getHasUnstoredLabels, getIndirectPropagatedLabels, getTree_label, setDirectPropagatedLabels, setHasUnstoredLabels, setIndirectPropagatedLabels, setTree_label, updateIndirectPropagatedLabel
 
Methods inherited from interface gr.forth.ics.rdfsuite.swkm.model.IRDF_Resource
getColumn, getComments, getCommentsTriples, getIsDefinedBys, getIsDefinedBysTriples, getLabels, getLabelsTriples, getLine, getLocalName, getNamespace, getNamespacePart, getSeeAlsos, getSeeAlsosTriples, getTypes, getTypesTriples, getURI, hasTypeOf, setColumn, setLine, setLocalName, setNamespace, setURI, toString
 

Field Detail

log

protected static final org.apache.log4j.Logger log
Constructor Detail

RDF_Property

public RDF_Property(java.lang.String uri,
                    IRDF_Namespace namespace)
Parameters:
uri -
namespace -
Method Detail

getAllSubPropertiesTriples

public java.util.Collection<IRDF_SubProperty> getAllSubPropertiesTriples()
Description copied from interface: IRDF_Property
This method retrieves all the subproperty triples of this Property recursively

Specified by:
getAllSubPropertiesTriples in interface IRDF_Property
Returns:
A Collection. The subproperties of this property are the subjects of these objects

getAllSuperPropertiesTriples

public java.util.Collection<IRDF_SubProperty> getAllSuperPropertiesTriples()
Description copied from interface: IRDF_Property
This method retrieves recursively all the superproperty triples of this Property

Specified by:
getAllSuperPropertiesTriples in interface IRDF_Property
Returns:
A Collection object. In each such object this property is the subject

getDomains

public java.util.Collection<IRDF_Class> getDomains()
Description copied from interface: IRDF_Property
This method retrieves all the domain classes of this Property

Specified by:
getDomains in interface IRDF_Property
Returns:
A Collection object

getDomainsTriples

public java.util.Collection<IRDF_Domain> getDomainsTriples()
Description copied from interface: IRDF_Property
This method retrieves all the domain triples with this Property as subject

Specified by:
getDomainsTriples in interface IRDF_Property
Returns:
A Collection object

getRanges

public java.util.Collection<IRDF_Class> getRanges()
Description copied from interface: IRDF_Property
This method retrieves all the range classes of this Property

Specified by:
getRanges in interface IRDF_Property
Returns:
A Collection object

getRangesTriples

public java.util.Collection<IRDF_Range> getRangesTriples()
Description copied from interface: IRDF_Property
This method retrieves all the range triples with this Property as subject

Specified by:
getRangesTriples in interface IRDF_Property
Returns:
A Collection object

getDirectDescendants

public java.util.Collection<IRDF_Property> getDirectDescendants()
Specified by:
getDirectDescendants in interface IRDF_Schema_Resource<IRDF_Property,IRDF_SubProperty>
Overrides:
getDirectDescendants in class RDF_Schema_Resource<IRDF_Property,IRDF_SubProperty>
Returns:
a collection of the children (direct descendants) of this node

getSubPropertiesTriples

public java.util.Collection<IRDF_SubProperty> getSubPropertiesTriples()
Description copied from interface: IRDF_Property
This method retrieves all the direct subproperty triples of this Property

Specified by:
getSubPropertiesTriples in interface IRDF_Property
Returns:
A Collection object. In each such object this property is the object

getDirectAncestors

public java.util.Collection<IRDF_Property> getDirectAncestors()
Specified by:
getDirectAncestors in interface IRDF_Schema_Resource<IRDF_Property,IRDF_SubProperty>
Overrides:
getDirectAncestors in class RDF_Schema_Resource<IRDF_Property,IRDF_SubProperty>
Returns:
a collection of the fathers (direct ancestors) of this node

getSuperPropertiesTriples

public java.util.Collection<IRDF_SubProperty> getSuperPropertiesTriples()
Description copied from interface: IRDF_Property
This method retrieves all the direct superproperty triples of this Property

Specified by:
getSuperPropertiesTriples in interface IRDF_Property
Returns:
A Colletion object. In each such object this property is the subject

hasDomain

public boolean hasDomain(java.lang.String a_class_uri)
Description copied from interface: IRDF_Property
Tells whether this property has a domain class with uri property_uri

Specified by:
hasDomain in interface IRDF_Property
Parameters:
a_class_uri - A String
Returns:
true if this property has a domain class with uri property_uri

hasRange

public boolean hasRange(java.lang.String a_class_uri)
Description copied from interface: IRDF_Property
Tells whether this property has a range class with uri class_uri

Specified by:
hasRange in interface IRDF_Property
Returns:
true if this property has a range class with uri class_uri

isSuperPropertyOf

public boolean isSuperPropertyOf(IRDF_Model model,
                                 java.lang.String property_uri)
Description copied from interface: IRDF_Property
Tells whether this property is a superproperty of property with uri property_uri

Specified by:
isSuperPropertyOf in interface IRDF_Property
property_uri - A String
Returns:
true if this property is a superproperty of property with uri property_uri

isSubPropertyOf

public boolean isSubPropertyOf(IRDF_Model model,
                               java.lang.String property_uri)
Description copied from interface: IRDF_Property
Tells whether this property is a subproperty of property with uri property_uri

Specified by:
isSubPropertyOf in interface IRDF_Property
property_uri - A String
Returns:
true if this property is a subproperty of property with uri property_uri

isAncestorOf

public boolean isAncestorOf(IRDF_Property rdf_property)
                     throws gr.forth.ics.rdfsuite.services.exceptions.LabelCreationException
a is subPropertyOf b if a's treeLabel is contained in any of b's labels

Specified by:
isAncestorOf in interface IRDF_Property
Specified by:
isAncestorOf in interface IRDF_Schema_Resource<IRDF_Property,IRDF_SubProperty>
Parameters:
rdf_property - An IRDF_Property
Returns:
true if this property is a superproperty of property with uri property_uri
Throws:
gr.forth.ics.rdfsuite.services.exceptions.LabelCreationException - if the labels are not yet created

isDescendantOf

public boolean isDescendantOf(IRDF_Property rdf_property)
                       throws gr.forth.ics.rdfsuite.services.exceptions.LabelCreationException
a is subPropertyOf b if a's treeLabel is contained in any of b's labels

Specified by:
isDescendantOf in interface IRDF_Property
Specified by:
isDescendantOf in interface IRDF_Schema_Resource<IRDF_Property,IRDF_SubProperty>
Parameters:
rdf_property - An IRDF_Property
Returns:
true if this property is a subproperty of property with uri property_uri
Throws:
gr.forth.ics.rdfsuite.services.exceptions.LabelCreationException

getAllTypes

public java.util.Collection<IRDF_Resource> getAllTypes(IRDF_Model model)
Description copied from class: RDF_Resource
This dummy method is overriden by methods in subclasses(RDF_Class,RDF_Property e.t.c) Parameter RDF_Model is needed in order for the types to be retrieved from the model

Specified by:
getAllTypes in interface IRDF_Resource
Overrides:
getAllTypes in class RDF_Resource
Returns:

getSubsumptionTriples

protected java.util.Collection<? extends IRDF_SubProperty> getSubsumptionTriples(boolean upward)
Specified by:
getSubsumptionTriples in class RDF_Schema_Resource<IRDF_Property,IRDF_SubProperty>