|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.mindswap.rdfparser.rdf.RDFResource
Fields inherited from interface org.mindswap.rdfparser.consts.RDFConsts |
OLD_DAMLURL, RDF, RDF_About, RDF_AboutEach, RDF_AboutEachPrefix, RDF_Alt, RDF_Bag, RDF_BagID, RDF_Class, RDF_Comment, RDF_ConstraintProperty, RDF_Description, RDF_Domain, RDF_First, RDF_ID, RDF_IsDefinedBy, RDF_Label, RDF_Li, RDF_Nil, RDF_NodeID, RDF_Object, RDF_ParseType, RDF_Predicate, RDF_Property, RDF_Range, RDF_Resource, RDF_Rest, RDF_SeeAlso, RDF_Seq, RDF_SubClass, RDF_Subject, RDF_SubProperty, RDF_TERMS, RDF_Type, RDF_Value, RDFSURL, RDFURL |
Constructor Summary | |
RDFResource()
|
|
RDFResource(java.lang.String s)
|
Method Summary | |
void |
addAttribute(java.lang.String key,
java.lang.String value)
Adds an attribute with specified name and value to this resource. |
void |
addAttributes(AttributeList list)
Adds all attributes in the list to this resource. |
void |
addEquivalentTo(java.lang.String s)
Adds the id of an equivalent resource to the list of equivalent resources. |
void |
addNode(RDFResource r)
Adds a single resource node. |
void |
addNodes(RDFResourceList l)
Adds all nodes in the list to this resource. |
java.lang.Object |
clone()
Makes a copy of this object. |
boolean |
equals(java.lang.Object obj)
Compares to resources for equivalence. |
java.lang.String |
getAttributeByName(java.lang.String name)
Returns the value of a specific attribute. |
AttributeList |
getAttributes()
Gets the attributes associated with this resource. |
java.lang.String |
getComment()
Returns the comment associated with this resource. |
java.util.Vector |
getEquivalentTos()
Returns this list of resources this resource is equivalent to. |
java.lang.String |
getFriendlyId()
Returns the friendly id (no url, just name) of this resource. |
java.lang.String |
getFriendlyType()
Returns the friendly type (no URI) of the resource. |
java.lang.String |
getId()
Returns the id of this resource. |
java.lang.String |
getLabel()
Returns the label associated with this resource. |
RDFResourceList |
getNodes()
Returns all child nodes of this resource. |
org.mindswap.n3.ntriples.NTripleList |
getNTriples()
Return a list of NTriples that are equivalent to this resource. |
abstract org.mindswap.n3.ntriples.NTripleList |
getNTriples(Namespaces ns)
Return a list of NTriples that are equivalent to this resource. |
abstract org.mindswap.n3.ntriples.NTripleList |
getNTriples(java.lang.String subject,
Namespaces ns)
Return a list of NTriples that are equivalent to this resource. |
RDFResourceList |
getResourceByType(java.lang.String type)
Returns a list of all child resources associated with this resource with the specified type. |
java.util.Vector |
getTriples(Namespaces ns)
Return a list of generic Triples that are equivalent to this resource. |
java.util.Vector |
getTriples(java.lang.String subject,
Namespaces ns)
Return a list of generic Triples that are equivalent to this resource. |
abstract java.lang.String |
getType()
Returns the type of this object as a string. |
java.lang.String |
getURI()
Returns the URI to the file where this resource is located. |
void |
removeEquivalentTo(java.lang.String s)
Removes the id of an equivalent resource from the list of equivalent resources. |
void |
setAttributes(AttributeList a)
Sets the attributes associted with this resource. |
void |
setComment(java.lang.String c)
Sets the comment associated with this resource. |
void |
setEquivalentTos(java.util.Vector v)
Sets the list of equivalent resource. |
void |
setId(java.lang.String s)
Sets the Id of this resource. |
void |
setLabel(java.lang.String l)
Sets the label associated with this resource. |
java.lang.String |
toRDF()
Returns the RDF representation of this class as a String |
java.lang.String |
toRDF(Namespaces ns)
Returns the RDF representation of this class as a String |
abstract java.lang.String |
toRDF(Namespaces ns,
int ind)
Returns the RDF representation of this class as a String |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public RDFResource()
public RDFResource(java.lang.String s)
Method Detail |
public RDFResourceList getNodes()
public void addNodes(RDFResourceList l)
xti
- A list of nodes to addaddNode(org.mindswap.rdfparser.rdf.RDFResource)
public void addNode(RDFResource r)
r
- Resource to addpublic void addAttribute(java.lang.String key, java.lang.String value)
key
- Attribute namevalue
- Attribute valuepublic void addAttributes(AttributeList list)
list
- A list of attributes to addaddAttribute(java.lang.String, java.lang.String)
public java.lang.Object clone()
public void setId(java.lang.String s)
s
- the new idpublic java.lang.String getId()
public java.lang.String getFriendlyId()
public void setComment(java.lang.String c)
c
- the new commentpublic java.lang.String getComment()
public java.lang.String getLabel()
public void setLabel(java.lang.String l)
l
- the new labelpublic java.lang.String getURI()
public abstract java.lang.String getType()
XMLConsts
,
RDFConsts
,
DAMLConsts
,
OWLConsts
public java.lang.String getFriendlyType()
getType()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public void setAttributes(AttributeList a)
a
- New set of Attributespublic AttributeList getAttributes()
public java.lang.String getAttributeByName(java.lang.String name)
name
- Name of attribute to search forpublic RDFResourceList getResourceByType(java.lang.String type)
xti
- The type to search forpublic java.util.Vector getEquivalentTos()
public void addEquivalentTo(java.lang.String s)
xti
- Id of equivalent resourcepublic void removeEquivalentTo(java.lang.String s)
xti
- Id of equivalent resourcepublic void setEquivalentTos(java.util.Vector v)
xti
- list of id's of equivalent resourcespublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toRDF()
toRDF(org.mindswap.xmlparser.Namespaces)
,
toRDF(org.mindswap.xmlparser.Namespaces,int)
public java.lang.String toRDF(Namespaces ns)
toRDF()
,
toRDF(org.mindswap.xmlparser.Namespaces,int)
public abstract java.lang.String toRDF(Namespaces ns, int ind)
toRDF()
,
toRDF(org.mindswap.xmlparser.Namespaces)
public org.mindswap.n3.ntriples.NTripleList getNTriples()
getNTriples(org.mindswap.xmlparser.Namespaces)
,
getNTriples(String, org.mindswap.xmlparser.Namespaces)
public abstract org.mindswap.n3.ntriples.NTripleList getNTriples(Namespaces ns)
getNTriples()
,
getNTriples(String, org.mindswap.xmlparser.Namespaces)
public abstract org.mindswap.n3.ntriples.NTripleList getNTriples(java.lang.String subject, Namespaces ns)
getNTriples()
,
getNTriples(org.mindswap.xmlparser.Namespaces)
public java.util.Vector getTriples(Namespaces ns)
getTriples(String, org.mindswap.xmlparser.Namespaces)
public java.util.Vector getTriples(java.lang.String subject, Namespaces ns)
getTriples(org.mindswap.xmlparser.Namespaces)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |