org.dishevelled.vocabulary.simple
Class SimpleRelation

java.lang.Object
  extended by org.dishevelled.vocabulary.simple.SimpleRelation
All Implemented Interfaces:
Relation

public class SimpleRelation
extends java.lang.Object
implements Relation

Simple implementation of the Relation interface.

Version:
$Revision$ $Date$
Author:
Michael Heuer

Field Summary
private  Domain domain
          Domain.
private  java.lang.String name
          Relation name.
private  SimpleConcept source
          Source concept.
private  SimpleConcept target
          Target concept.
 
Constructor Summary
SimpleRelation(Domain domain, java.lang.String name, SimpleConcept source, SimpleConcept target)
          Create a new relation in the specified domain between concepts source and target with the specified name.
 
Method Summary
 Domain getDomain()
          Return the domain of this relation.
 java.lang.String getName()
          Return the name of this relation.
 Concept getSource()
          Return the source concept of this relation.
 Concept getTarget()
          Return the target concept of this relation.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

private final java.lang.String name
Relation name.


source

private final SimpleConcept source
Source concept.


target

private final SimpleConcept target
Target concept.


domain

private final Domain domain
Domain.

Constructor Detail

SimpleRelation

SimpleRelation(Domain domain,
               java.lang.String name,
               SimpleConcept source,
               SimpleConcept target)
Create a new relation in the specified domain between concepts source and target with the specified name. All of domain, source, and target must not be null.

Parameters:
domain - domain
name - relation name
source - source concept
target - target concept
Method Detail

getName

public java.lang.String getName()
Description copied from interface: Relation
Return the name of this relation.

Specified by:
getName in interface Relation
Returns:
the name
See Also:
Relation

getSource

public Concept getSource()
Description copied from interface: Relation
Return the source concept of this relation. The source concept must not be null.

Specified by:
getSource in interface Relation
Returns:
the source concept
See Also:
Relation

getTarget

public Concept getTarget()
Description copied from interface: Relation
Return the target concept of this relation. The target concept must not be null.

Specified by:
getTarget in interface Relation
Returns:
the target concept
See Also:
Relation

getDomain

public Domain getDomain()
Description copied from interface: Relation
Return the domain of this relation. The domain must not be null.

Specified by:
getDomain in interface Relation
Returns:
the domain
See Also:
Relation

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object


Copyright (c) 2002-2004 held jointly by the individual authors. Licensed under the GNU Lesser General Public License (LGPL).