[Top][All Lists]

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

[CASHeW-s-editor-patches] RDF #06: Handle rdf:datatype.

From: Andrew John Hughes
Subject: [CASHeW-s-editor-patches] RDF #06: Handle rdf:datatype.
Date: Mon, 4 Apr 2005 23:06:27 +0100
User-agent: Mutt/1.5.6+20040907i

I'm committing the attached patch which allows the RDF parser
to handle the rdf:datatype attribute.  All types are currently
represented as instances of UnknownTypes.  This allows the
final two examples in part 3.1 of the primer to be handled,
and lets the parser handle the following types of RDF
documents (taken from 3.1):

    *  All blank nodes are assigned blank node identifiers.
    * Each node is listed in turn as the subject of an un-nested
        rdf:Description element, using an rdf:about attribute
        if the node has a URIref, or an rdf:nodeID attribute
        if the node is blank.
      For each triple with this node as subject, an appropriate
        property element is created, with either literal content
        (possibly empty), an rdf:resource attribute specifying
        the object of the triple (if the object node has a
        URIref), or an rdf:nodeID attribute specifying the
        object of the triple (if the object node is blank).

Once the <rdf:Description> shortcut and collections are handled,
we should be able to parse an OWL-S process model as RDF (in


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

        * src/nongnu/cashews/rdf/
        (Literal(String,Type)): New constructor.
        * src/nongnu/cashews/rdf/
        Extends the Cloneable interface.
        * src/nongnu/cashews/rdf/
        New class.
        (typeClasses): New field mapping URIs to type classes.
        (static): Static initializer for the map.
        (TypeFactory): New constructor.
        (getInstance(String)): New method.
        * src/nongnu/cashews/rdf/
        New class.
        (uri): New field.
        (UnknownType(String)): New constructor.
        (toString()): New method.
        (clone()): New method.
        (getValue(String)): New method.
        * src/nongnu/cashews/rdf/
        (RDFHandler.type): New field.
        (RDFHandler(java.util.logging.Handler)): Initialise new field.
        Capture use of rdf:datatype.
        (characters(char[],int,int)): Create typed literals.
        (endElement(String,String,String)): Clear new field on predicate end.

Andrew :-)

Please avoid sending me Microsoft Office (e.g. Word, PowerPoint) attachments.

No software patents in Europe --

"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!
public class gcj extends Freedom implements Java { ... }

Attachment: rdf-06.diff
Description: Text document

Attachment: signature.asc
Description: Digital signature

reply via email to

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