[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[CASHeW-s-editor-patches] RDF #04: Added RDF URI object handling and mul
From: |
Andrew John Hughes |
Subject: |
[CASHeW-s-editor-patches] RDF #04: Added RDF URI object handling and multiple predicate support. |
Date: |
Mon, 4 Apr 2005 01:59:07 +0100 |
User-agent: |
Mutt/1.5.6+20040907i |
I'm committing the attached patch to continue RDF XML support.
This allows objects to also be URIs as well as literals, and
for one Description element to contain multiple predicates
(thus creating multiple triples). The result is that examples
3 and 4 from the Primer can now be handled.
Changelog:
2005-04-03 Andrew John Hughes <address@hidden>
* src/nongnu/cashews/rdf/Graph.java:
(Graph()): New constructor.
(getGraph()): Returns a clone.
(addTriple(Triple)): New method.
(toString()): New method.
* src/nongnu/cashews/rdf/Literal.java:
(clone()): New method.
(setType(Type)): New method.
* src/nongnu/cashews/rdf/Predicate.java:
(clone()): New method.
* src/nongnu/cashews/rdf/RDFObject.java:
(clone()): New method.
* src/nongnu/cashews/rdf/RDFURI.java:
(RDFURI(java.net.URI)): Call setURI.
(setURI(java.net.URI)): New method.
(clone()): New method.
* src/nongnu/cashews/rdf/Subject.java:
(clone()): New method.
* src/nongnu/cashews/rdf/Triple.java:
(clone()): New method.
(setSubject(Subject)): New method.
(setPredicate(Predicate)): New method.
(setObject(Object)): New method.
(equals(Object)): New method.
(hashCode()): New method.
(getSubject()): New method.
(getPredicate()): New method.
(getObject()): New method.
* src/nongnu/cashews/rdf/Type.java:
(clone()): New method.
* src/nongnu/cashews/rdf/XMLParser.java:
(graph): New field.
(parse(String)): Return a graph.
(parse(java.io.InputSource)): Likewise.
(parse(java.io.File)): Likewise.
(main(String[])): Print out result.
(startElement(String,String,String,org.xml.sax.Attributes)):
Added RDF URI object handling.
(endElement(String,String,String)): Moved triple creation to
post-predicate rather than post-subject.
--
Andrew :-)
Please avoid sending me Microsoft Office (e.g. Word, PowerPoint) attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html
No software patents in Europe -- http://nosoftwarepatents.com
"Value your freedom, or you will lose it, teaches history.
`Don't bother us with politics' respond those who don't want to learn."
-- Richard Stallman
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html
public class gcj extends Freedom implements Java { ... }
rdf-04.diff
Description: Text document
signature.asc
Description: Digital signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [CASHeW-s-editor-patches] RDF #04: Added RDF URI object handling and multiple predicate support.,
Andrew John Hughes <=