|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgr.forth.ics.rdfsuite.swkm.model.impl.RDF_Resource
public class RDF_Resource
| Field Summary | |
|---|---|
protected int |
column
|
protected java.util.Collection<IRDF_Comment> |
comments
|
protected java.util.Collection<IRDF_IsDefinedBy> |
isDefinedBys
|
protected java.util.Collection<IRDF_Label> |
labels
|
protected int |
line
|
protected java.lang.String |
local_name
|
protected static org.apache.log4j.Logger |
log
|
protected IRDF_Namespace |
namespace
|
protected java.util.Collection<IRDF_SeeAlso> |
seeAlsos
|
protected java.util.Collection<IRDF_Type> |
types
|
protected java.lang.String |
uri
|
| Constructor Summary | |
|---|---|
RDF_Resource(java.lang.String uri)
Constructor for "data" RDF_Resources that are not correlated with a namespace |
|
RDF_Resource(java.lang.String uri,
IRDF_Namespace ns)
Constructor for schema RDF_Resources that are correlated with a Namespace |
|
| Method Summary | |
|---|---|
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 |
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String local_name
protected java.lang.String uri
protected IRDF_Namespace namespace
protected java.util.Collection<IRDF_Comment> comments
protected java.util.Collection<IRDF_Label> labels
protected java.util.Collection<IRDF_SeeAlso> seeAlsos
protected java.util.Collection<IRDF_IsDefinedBy> isDefinedBys
protected java.util.Collection<IRDF_Type> types
protected static final org.apache.log4j.Logger log
protected int line
protected int column
| Constructor Detail |
|---|
public RDF_Resource(java.lang.String uri,
IRDF_Namespace ns)
throws gr.forth.ics.rdfsuite.services.exceptions.IncompatibleUrisException
gr.forth.ics.rdfsuite.services.exceptions.IncompatibleUrisException - if the namespace part of the uri and the namespace it
belongs to are not the samepublic RDF_Resource(java.lang.String uri)
uri - | Method Detail |
|---|
public java.util.Collection<IRDF_Literal> getComments()
IRDF_Resource
getComments in interface IRDF_Resourcepublic java.util.Collection<IRDF_Comment> getCommentsTriples()
IRDF_Resource
getCommentsTriples in interface IRDF_Resourcepublic java.util.Collection<IRDF_Resource> getIsDefinedBys()
IRDF_Resource
getIsDefinedBys in interface IRDF_Resourcepublic java.util.Collection<IRDF_IsDefinedBy> getIsDefinedBysTriples()
IRDF_Resource
getIsDefinedBysTriples in interface IRDF_Resourcepublic java.util.Collection<IRDF_Literal> getLabels()
IRDF_Resource
getLabels in interface IRDF_Resourcepublic java.util.Collection<IRDF_Label> getLabelsTriples()
IRDF_Resource
getLabelsTriples in interface IRDF_Resourcepublic java.lang.String getLocalName()
IRDF_Resource
getLocalName in interface IRDF_Resourcepublic IRDF_Namespace getNamespace()
IRDF_Resource
getNamespace in interface IRDF_Resourcepublic java.lang.String getNamespacePart()
IRDF_Resource
getNamespacePart in interface IRDF_Resourcepublic java.util.Collection<IRDF_Resource> getSeeAlsos()
IRDF_Resource
getSeeAlsos in interface IRDF_Resourcepublic java.util.Collection<IRDF_SeeAlso> getSeeAlsosTriples()
IRDF_Resource
getSeeAlsosTriples in interface IRDF_Resourcepublic java.util.Collection<IRDF_Resource> getTypes()
IRDF_Resource
getTypes in interface IRDF_Resourcepublic java.util.Collection<IRDF_Type> getTypesTriples()
IRDF_Resource
getTypesTriples in interface IRDF_Resourcepublic java.lang.String getURI()
IRDF_Resource
getURI in interface IdentifiablegetURI in interface IRDF_Resourcepublic void setLocalName(java.lang.String localName)
IRDF_Resource
setLocalName in interface IRDF_Resourcepublic void setNamespace(IRDF_Namespace namespace)
IRDF_Resource
setNamespace in interface IRDF_Resourcenamespace - An IRDF_Namespace object
public void setURI(java.lang.String uri)
throws gr.forth.ics.rdfsuite.services.exceptions.IncompatibleUrisException
IRDF_Resource
setURI in interface IdentifiablesetURI in interface IRDF_Resourceuri - The URI to be set to the Resource
gr.forth.ics.rdfsuite.services.exceptions.IncompatibleUrisException - if the namespace part of the uri and the namespace it belongs to
are not compatiblepublic int getColumn()
IRDF_Resource
getColumn in interface IRDF_Resourcepublic int getLine()
IRDF_Resource
getLine in interface IRDF_Resourcepublic void setColumn(int column)
IRDF_Resource
setColumn in interface IRDF_Resourcecolumn - An intpublic void setLine(int line)
IRDF_Resource
setLine in interface IRDF_Resourceline - An int
public boolean hasTypeOf(IRDF_Model model,
IRDF_Class rdf_class)
IRDF_Resource
hasTypeOf in interface IRDF_Resourcerdf_class - The candidate type class
public java.util.Collection<IRDF_Resource> getAllTypes(IRDF_Model model)
getAllTypes in interface IRDF_Resourcepublic java.lang.String toString()
toString in interface IRDF_ResourcetoString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||