org.activemath.content.items
Class ItemRelationType

java.lang.Object
  extended by org.activemath.content.items.ItemRelationType

public class ItemRelationType
extends Object

A relation type between Items.

This class implements a typesafe enumeration pattern, so instances of this class can be safely compared with "==".

TODO: We can also add special behavior, such a "isA(ItemRelationType)", so relations can get a hierachy.


Field Summary
static ItemRelationType AGAINST
           
static ItemRelationType FOR
           
static ItemRelationType IS_A
           
protected static Category log
           
static ItemRelationType OF
           
static ItemRelationType REFERENCES
           
static ItemRelationType SIMILAR
           
 
Method Summary
static ItemRelationType getByName(String relName)
           
 boolean isA(ItemRelationType rel)
          Say if a relation type matches a super type.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected static Category log

FOR

public static final ItemRelationType FOR

IS_A

public static final ItemRelationType IS_A

OF

public static final ItemRelationType OF

REFERENCES

public static final ItemRelationType REFERENCES

SIMILAR

public static final ItemRelationType SIMILAR

AGAINST

public static final ItemRelationType AGAINST
Method Detail

getByName

public static final ItemRelationType getByName(String relName)
Returns:
ItemRelationType instance for type typeName, or null

toString

public String toString()
Overrides:
toString in class Object

isA

public final boolean isA(ItemRelationType rel)
Say if a relation type matches a super type. TODO: complete this method