cashew-s-editor-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[CASHeW-s-editor-patches] FYI: RDF #08


From: Andrew John Hughes
Subject: [CASHeW-s-editor-patches] FYI: RDF #08
Date: Sun, 17 Apr 2005 19:35:00 +0100
User-agent: Mutt/1.5.6+20040907i

I'm committing the attached patch to add support
for typed nodes within RDF.  This also handles
the following shortcut:

<owls:Process>
 
=>

<rdf:Description><rdf:type rdf:resource="&owls;Process"></rdf:Description>

where &owls; is an entity representing the same URI as used for the OWL-S
namespace.

It also does some restructing of the parser in preparation for
later additions.

Changelog:

2005-04-17  Andrew John Hughes  <address@hidden>

        * src/nongnu/cashews/commons/Pair.java:
        Now serializable, along with some doc. fixes.
        (serialVersionUID): Added.
        (toString()): New method.
        * src/nongnu/cashews/commons/PairMap.java:
        New class to handle maps with a Pair as the key.
        (serialVersionUID): For serialization.
        (PairMap()): New constructor.
        (PairMap(int)): Likewise.
        (PairMap(int,float)): Likewise.
        (PairMap(PairMap<A,B,? extends V>)): Likewise.
        (containsKey(A,B)): Shortcut for pair handling.
        (get(A,B)): Likewise.
        (put(A,B,V)): Likewise.
        (remove(A,B)): Likewise.
        * src/nongnu/cashews/commons/PairSet.java:
        New class to handle sets of Pairs.
        (serialVersionUID): For serialization.
        (PairSet()): New constructor.
        (PairSet(int)): Likewise.
        (PairSet(int,float)): Likewise.
        (PairSet(PairSet<A,B)): Likewise.
        (contains(A,B)): Shortcut for pair handling.
        (add(A,B)): Likewise.
        (remove(A,B)): Likewise.        
        * src/nongnu/cashews/rdf/Blank.java:
        Now properly extends Node.
        (toString()): Modified for subclass status.
        (clone()): Likewise.
        * src/nongnu/cashews/rdf/Node.java:
        Turned into a class which implements Subject and RDFObject.
        (type): New field holding the type of the node.
        (clone()): New method.
        (setType(URI)): New method.
        (getType()): New method.
        (toString()): New method.
        (setType(String)): New method.
        * src/nongnu/cashews/rdf/RDFHandler.java:
        Moved from XMLParser to a separate class.
        (RDF_NAMESPACE): Moved from XMLParser.
        (graph): Moved from XMLParser.
        (getGraph()): New accessor.
        (parseAttributes(org.xml.sax.Attributes)): Convert attributes
        to a PairMap.
        (handleAttributes(PairMap<String,String,String>): Handle RDF attribs
        in a central location.
        (setSubjectType(String)): Central place for setting node type.
        * src/nongnu/cashews/rdf/RDFObject.java:
        Now a implemented interface of Node.
        * src/nongnu/cashews/rdf/RDFURI.java:
        (toString()): Modified for subclass status.
        (clone()): Likewise.
        * src/nongnu/cashews/rdf/XMLParser.java:
        Now a small subclass to Parser.
        (RDF_NAMESPACE): Moved to RDFHandler.
        (reader): Moved to Parser.
        (graph): Moved to RDFHandler.
        (rdfHandler): Generic version in Parser.
        (XMLParser(java.util.logging.Handler)): Shortcut for an RDF parse.
        (parse(String)): Moved to Parser.
        (parse(org.xml.sax.InputSource)): Moved to Parser.
        (parse(java.io.File)): Moved to Parser.
        (RDFHandler): Moved to its own class.
        * src/nongnu/cashews/xml/Parser.java:
        New class for a basic XML parser.
        (reader): Field from rdf.XMLParser.
        (xmlHandler): New field.
        (Parser(java.util.logging.Handler)): Shortcut for a basic parse.
        (Parser(java.util.logging.Handler,nongnu.cashews.xml.XmlBaseHandler)):
        Central constructor.
        (parse(String)): Moved from rdf.XMLParser.
        (parse(org.xml.sax.InputSource)): Moved from rdf.XMLParser.
        (parse(java.io.File)): Moved from rdf.XMLParser.
        (getHandler()): New accessor.
        (main(String[])): Test harness.

-- 
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 { ... }

Attachment: rdf-08.diff
Description: Text document

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]