gr.forth.ics.rdfsuite.swkm.model
Interface IRDF_Resource

All Superinterfaces:
Identifiable
All Known Subinterfaces:
IRDF_Class, IRDF_Container, IRDF_Individual, IRDF_MetaClass, IRDF_Property, IRDF_Schema_Resource<TYPE,TRIPLE>, IRDF_Statement
All Known Implementing Classes:
RDF_Class, RDF_Container, RDF_Individual, RDF_MetaClass, RDF_Property, RDF_Resource, RDF_Schema_Resource, RDF_Statement

public interface IRDF_Resource
extends Identifiable

Resource is the base class of our internal model and represents any RDF node, like class,property,class instance or container. Every Resource is described by a URI which is a unique identifier. The URI has a local name and a namespace. With each resource,four default properties are attached namely seeAlso,label,comment,isDefinedBy


Method Summary
 java.util.Collection<IRDF_Resource> getAllTypes(IRDF_Model model)
          Retrieves all types of this resource recursively
 int getColumn()
          Retrieves the column that the resource occured in the input file
 java.util.Collection<IRDF_Literal> getComments()
          Retrieves all the Comments defined for this RDF_Resource
 java.util.Collection<IRDF_Comment> getCommentsTriples()
          Retrieves all the RDF_Comment triples defined for this RDF_Resource
 java.util.Collection<IRDF_Resource> getIsDefinedBys()
          Retrieves all the isDefinedBys defined for this RDF_Resource
 java.util.Collection<IRDF_IsDefinedBy> getIsDefinedBysTriples()
          Retrieves all the RDF_IsDefinedBy triples defined for this RDF_Resource
 java.util.Collection<IRDF_Literal> getLabels()
          Retrieves all the labels defined for this RDF_Resource
 java.util.Collection<IRDF_Label> getLabelsTriples()
          Retrieves all the RDF_Label triples defined for this RDF_Resource
 int getLine()
          Retrieves the line that the resource occured in the input file
 java.lang.String getLocalName()
          Retrieves the local name of the specified Resource,that is - if exists - the part that is after #.In any other case it returns an empty string
 IRDF_Namespace getNamespace()
          Retrieves the namespace this resource belongs to
 java.lang.String getNamespacePart()
          Retrieves the namespace part of the URI of the specified Resource.
 java.util.Collection<IRDF_Resource> getSeeAlsos()
          Adds an label for this IRDF_Resource
 java.util.Collection<IRDF_SeeAlso> getSeeAlsosTriples()
          Retrieves all the RDF_SeeAlso triples defined for this RDF_Resource
 java.util.Collection<IRDF_Resource> getTypes()
          Retrieves the types defined for this resource from the model (Depending to the resource its type may be a metaclass, a class or a property)
 java.util.Collection<IRDF_Type> getTypesTriples()
          Retrieves the type triples defined for this resource from the model
 java.lang.String getURI()
          Composes the namespace of the Resource from the namespace uri and the local name
 boolean hasTypeOf(IRDF_Model model, IRDF_Class rdf_class)
          Tells whether a class is a type class of this resource
 void setColumn(int column)
          Sets the column that the resource occured in the input file
 void setLine(int line)
          Sets the line that the resource occured in the input file
 void setLocalName(java.lang.String localName)
          Sets the local name for the specified resource in case the full URI is not known
 void setNamespace(IRDF_Namespace namespace)
          Sets the namespace this resource belongs to
 void setURI(java.lang.String uri)
          Sets the URI of the specified Resource.
 java.lang.String toString()
           
 

Method Detail

getNamespace

IRDF_Namespace getNamespace()
Retrieves the namespace this resource belongs to

Returns:
An IRDF_Namespace object

setNamespace

void setNamespace(IRDF_Namespace namespace)
Sets the namespace this resource belongs to

Parameters:
namespace - An IRDF_Namespace object

getURI

java.lang.String getURI()
Composes the namespace of the Resource from the namespace uri and the local name

Specified by:
getURI in interface Identifiable
Returns:
The URI of the specified Resource

setURI

void setURI(java.lang.String uri)
Sets the URI of the specified Resource. If the namespace part of the uri is inconsistent to the namespace's uri an excetion is thrown

Specified by:
setURI in interface Identifiable
Parameters:
uri - The URI to be set to the Resource

getLocalName

java.lang.String getLocalName()
Retrieves the local name of the specified Resource,that is - if exists - the part that is after #.In any other case it returns an empty string

Returns:
The local name of the specified Resource

setLocalName

void setLocalName(java.lang.String localName)
Sets the local name for the specified resource in case the full URI is not known


getNamespacePart

java.lang.String getNamespacePart()
Retrieves the namespace part of the URI of the specified Resource. The namespace part is the part of the URI from its beggining until "#" sign if it exists(It contains "#")

Returns:
The namespace part of the URI of the specified Resource

getCommentsTriples

java.util.Collection<IRDF_Comment> getCommentsTriples()
Retrieves all the RDF_Comment triples defined for this RDF_Resource

Returns:
A Collection object

getLabelsTriples

java.util.Collection<IRDF_Label> getLabelsTriples()
Retrieves all the RDF_Label triples defined for this RDF_Resource

Returns:
A Collection object

getSeeAlsosTriples

java.util.Collection<IRDF_SeeAlso> getSeeAlsosTriples()
Retrieves all the RDF_SeeAlso triples defined for this RDF_Resource

Returns:
A Collection object

getIsDefinedBysTriples

java.util.Collection<IRDF_IsDefinedBy> getIsDefinedBysTriples()
Retrieves all the RDF_IsDefinedBy triples defined for this RDF_Resource

Returns:
A Collection object

getTypesTriples

java.util.Collection<IRDF_Type> getTypesTriples()
Retrieves the type triples defined for this resource from the model

Parameters:
IRDF_Model - the model in which the resource is defined
Returns:
A Collection object

getComments

java.util.Collection<IRDF_Literal> getComments()
Retrieves all the Comments defined for this RDF_Resource

Returns:
A Collection object

getLabels

java.util.Collection<IRDF_Literal> getLabels()
Retrieves all the labels defined for this RDF_Resource

Returns:
A Collection object

getSeeAlsos

java.util.Collection<IRDF_Resource> getSeeAlsos()
Adds an label for this IRDF_Resource

Parameters:
label - An IRDF_Literal object public void addLabel(IRDF_Literal label); /** Retrieves all the see alsos defined for this RDF_Resource
Returns:
A Collection object

getIsDefinedBys

java.util.Collection<IRDF_Resource> getIsDefinedBys()
Retrieves all the isDefinedBys defined for this RDF_Resource

Returns:
A Collection object

getTypes

java.util.Collection<IRDF_Resource> getTypes()
Retrieves the types defined for this resource from the model (Depending to the resource its type may be a metaclass, a class or a property)

Parameters:
model - IRDF_Model
Returns:
A Collection object

setLine

void setLine(int line)
Sets the line that the resource occured in the input file

Parameters:
line - An int

getLine

int getLine()
Retrieves the line that the resource occured in the input file

Returns:
An int

setColumn

void setColumn(int column)
Sets the column that the resource occured in the input file

Parameters:
column - An int

getColumn

int getColumn()
Retrieves the column that the resource occured in the input file

Returns:
An int

hasTypeOf

boolean hasTypeOf(IRDF_Model model,
                  IRDF_Class rdf_class)
Tells whether a class is a type class of this resource

Parameters:
rdf_class - The candidate type class
Returns:
True if this resource is type of the given class

getAllTypes

java.util.Collection<IRDF_Resource> getAllTypes(IRDF_Model model)
Retrieves all types of this resource recursively

Parameters:
model -
Returns:

toString

java.lang.String toString()
Overrides:
toString in class java.lang.Object