com.hp.hpl.mesa.rdf.jena.sample
Class Sample4
java.lang.Object
|
+--com.hp.hpl.mesa.rdf.jena.sample.Sample4
- public class Sample4
- extends java.lang.Object
A simple demonstration of reification.
Reification is the term used when one statement is the subject or object
of another. It does seem to cause some difficulty in understanding.
This implementation takes a very simple view. A statement is a subclass
of resource, and as such can be the subject or object of another
statement. Further, it is possible for a statement s2 to be a member
of a model m, to make a statement about another statement s1, without
s1 being a member of m. This sample code demonstrates this feature.
- Version:
- Release='$Name: $' Revision='$Revision: 1.1 $' Date='$Date: 2001/01/05 14:17:42 $'
- Author:
- bwm
Method Summary |
static void |
main(java.lang.String[] args)
Create a model m. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Sample4
public Sample4()
main
public static void main(java.lang.String[] args)
- Create a model m. Create a statement s1, but do not add it m. Create
a statement s2 about s1 and add it to m. Verify that s1 is not a member of
m, but s2 is. Create a further statement s3 about s2 and the write the xml
serialization of m to the system output stream.
- Parameters:
args
- the command line arguments - there are none for this
application
Copyright © 2001 Hewlett-Packard. All Rights Reserved.