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

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_Class,IRDF_SubClass>
          extended by gr.forth.ics.rdfsuite.swkm.model.impl.RDF_Class
All Implemented Interfaces:
Identifiable, IRDF_Class, IRDF_Resource, IRDF_Schema_Resource<IRDF_Class,IRDF_SubClass>, java.lang.Comparable
Direct Known Subclasses:
RDF_MetaClass

public class RDF_Class
extends RDF_Schema_Resource<IRDF_Class,IRDF_SubClass>
implements IRDF_Class


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_Class(java.lang.String uri, IRDF_Namespace namespace)
           
 
Method Summary
 java.util.Collection<IRDF_SubClass> getAllSubClassesTriples()
          This method retrieves all the subclass triples of this Class recursively
 java.util.Collection<IRDF_SubClass> getAllSuperClassesTriples()
          This method retrieves cursively all the superclass triples of this Class
 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> getDomainOf()
          This method retrieves all the properties with this Class as domain
 java.util.Collection<IRDF_Domain> getDomainOfTriples()
          This method retrieves all the domain triples with this Class as object
 java.util.Collection<IRDF_Resource> getInstances()
          Retrieves the resources that are classified under this class.
 java.util.Collection<IRDF_Type> getInstanceTriples()
          Retrieves the type triple in which this class is the object, that is the "type"
 java.util.Collection<IRDF_Property> getRangeOf()
          This method retrieves all the properties with this Class as range
 java.util.Collection<IRDF_Range> getRangeOfTriples()
          Returns all the properties this class is range
 java.util.Collection<IRDF_SubClass> getSubClassesTriples()
          This method retrieves all the direct subclass triples of this Class
protected  java.util.Collection<? extends IRDF_SubClass> getSubsumptionTriples(boolean upward)
           
 java.util.Collection<IRDF_SubClass> getSuperClassesTriples()
          This method retrieves all the direct superclass triples of this Class
 boolean isAncestorOf(IRDF_Class rdf_class)
          a is subClassOf b if a's treeLabel is contained in any of b's labels
 boolean isDescendantOf(IRDF_Class rdf_class)
          If the labels have not been created this method works recursively a is subClassOf b if a's treeLabel is contained in any of b's labels
 boolean isDomainOf(java.lang.String a_property_uri)
          Tells whether this class is a domain class of property with uri property_uri
 boolean isRangeOf(java.lang.String a_property_uri)
          Tells whether this class is a range class of property with uri property_uri
 boolean isSubClassOf(IRDF_Model model, java.lang.String class_uri)
          Tells whether this class is a direct subclass of class with uri class_uri
 boolean isSuperClassOf(IRDF_Model model, java.lang.String class_uri)
          Tells whether this class is a direct superclass of class with uri class_uri
 
Methods inherited from class gr.forth.ics.rdfsuite.swkm.model.impl.RDF_Schema_Resource
addDirectPropagatedLabel, addDirectPropagatedLabels, addIndirectPropagatedLabel, addIndirectPropagatedLabels, compareTo, contains, getAncestors, getDescendants, getDirectAncestors, getDirectDescendants, 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, getDirectAncestors, getDirectDescendants, 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_Class

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

getAllSubClassesTriples

public java.util.Collection<IRDF_SubClass> getAllSubClassesTriples()
Description copied from interface: IRDF_Class
This method retrieves all the subclass triples of this Class recursively

Specified by:
getAllSubClassesTriples in interface IRDF_Class
Returns:
A Collection. The subclasses of this class are the subjects of these objects

getAllSuperClassesTriples

public java.util.Collection<IRDF_SubClass> getAllSuperClassesTriples()
Description copied from interface: IRDF_Class
This method retrieves cursively all the superclass triples of this Class

Specified by:
getAllSuperClassesTriples in interface IRDF_Class
Returns:
A Collection object. In each such object this class is the subject

getDomainOf

public java.util.Collection<IRDF_Property> getDomainOf()
Description copied from interface: IRDF_Class
This method retrieves all the properties with this Class as domain

Specified by:
getDomainOf in interface IRDF_Class
Returns:
A Collection object

getDomainOfTriples

public java.util.Collection<IRDF_Domain> getDomainOfTriples()
Description copied from interface: IRDF_Class
This method retrieves all the domain triples with this Class as object

Specified by:
getDomainOfTriples in interface IRDF_Class
Returns:
A Collection object

getRangeOf

public java.util.Collection<IRDF_Property> getRangeOf()
Description copied from interface: IRDF_Class
This method retrieves all the properties with this Class as range

Specified by:
getRangeOf in interface IRDF_Class
Returns:
A Collection object

getRangeOfTriples

public java.util.Collection<IRDF_Range> getRangeOfTriples()
Returns all the properties this class is range

Specified by:
getRangeOfTriples in interface IRDF_Class
Returns:
A Collection object

getSubClassesTriples

public java.util.Collection<IRDF_SubClass> getSubClassesTriples()
Description copied from interface: IRDF_Class
This method retrieves all the direct subclass triples of this Class

Specified by:
getSubClassesTriples in interface IRDF_Class
Returns:
A Collection object. In each such object this class is the object

getSuperClassesTriples

public java.util.Collection<IRDF_SubClass> getSuperClassesTriples()
Description copied from interface: IRDF_Class
This method retrieves all the direct superclass triples of this Class

Specified by:
getSuperClassesTriples in interface IRDF_Class
Returns:
A Colletion object. In each such object this class is the subject

isSuperClassOf

public boolean isSuperClassOf(IRDF_Model model,
                              java.lang.String class_uri)
Description copied from interface: IRDF_Class
Tells whether this class is a direct superclass of class with uri class_uri

Specified by:
isSuperClassOf in interface IRDF_Class
class_uri - A String
Returns:
true if this class is a superclass of class with uri class_uri

isSubClassOf

public boolean isSubClassOf(IRDF_Model model,
                            java.lang.String class_uri)
Description copied from interface: IRDF_Class
Tells whether this class is a direct subclass of class with uri class_uri

Specified by:
isSubClassOf in interface IRDF_Class
Parameters:
model - IRDF_Model
class_uri - A String
Returns:
true if this class is a subclass of class with uri class_uri

isDomainOf

public boolean isDomainOf(java.lang.String a_property_uri)
Description copied from interface: IRDF_Class
Tells whether this class is a domain class of property with uri property_uri

Specified by:
isDomainOf in interface IRDF_Class
Returns:
true if this class is a domain class of property with uri property_uri

isRangeOf

public boolean isRangeOf(java.lang.String a_property_uri)
Description copied from interface: IRDF_Class
Tells whether this class is a range class of property with uri property_uri

Specified by:
isRangeOf in interface IRDF_Class
Returns:
true if this class is a range class of property with uri property_uri

isAncestorOf

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

Specified by:
isAncestorOf in interface IRDF_Class
Specified by:
isAncestorOf in interface IRDF_Schema_Resource<IRDF_Class,IRDF_SubClass>
Returns:
true if this class is a superclass of class with uri class_uri
Throws:
gr.forth.ics.rdfsuite.services.exceptions.LabelCreationException - if labels have not been created for the elements of this model

isDescendantOf

public boolean isDescendantOf(IRDF_Class rdf_class)
If the labels have not been created this method works recursively a is subClassOf b if a's treeLabel is contained in any of b's labels

Specified by:
isDescendantOf in interface IRDF_Class
Specified by:
isDescendantOf in interface IRDF_Schema_Resource<IRDF_Class,IRDF_SubClass>
Returns:
true if this class is a subclass of class with uri class_uri
Throws:
gr.forth.ics.rdfsuite.services.exceptions.LabelCreationException - if labels have not been created for the elements of this model

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_SubClass> getSubsumptionTriples(boolean upward)
Specified by:
getSubsumptionTriples in class RDF_Schema_Resource<IRDF_Class,IRDF_SubClass>

getInstanceTriples

public java.util.Collection<IRDF_Type> getInstanceTriples()
Description copied from interface: IRDF_Class
Retrieves the type triple in which this class is the object, that is the "type"

Specified by:
getInstanceTriples in interface IRDF_Class
Returns:
An Collection

getInstances

public java.util.Collection<IRDF_Resource> getInstances()
Description copied from interface: IRDF_Class
Retrieves the resources that are classified under this class. If this class is a metaclass then the resources will be classes else if this class is a simple class the resources will be class instances

Specified by:
getInstances in interface IRDF_Class
Returns:
A Collection