Class 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.

Release='$Name: $' Revision='$Revision: 1.1 $' Date='$Date: 2001/01/05 14:17:42 $'

Constructor Summary
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

Constructor Detail


public Sample4()
Method Detail


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.
args - the command line arguments - there are none for this application

Copyright 2001 Hewlett-Packard. All Rights Reserved.