org.dishevelled.vocabulary.simple
Class SimpleConcept

java.lang.Object
  extended by org.dishevelled.vocabulary.simple.SimpleConcept
All Implemented Interfaces:
Concept

public class SimpleConcept
extends java.lang.Object
implements Concept

Simple implementation of the Concept interface.

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

Field Summary
private  java.lang.String accession
          Concept accession.
private  java.util.Set<Assignment> assignments
          Set of assignments.
private  java.lang.String definition
          Concept definition.
private  Domain domain
          Domain.
private  java.util.Set<Projection> inProjections
          Set of in projections.
private  java.util.Set<Relation> inRelations
          Set of in relations.
private  java.lang.String name
          Concept name.
private  java.util.Set<Projection> outProjections
          Set of out projections.
private  java.util.Set<Relation> outRelations
          Set of out relations.
 
Constructor Summary
SimpleConcept(Domain domain, java.lang.String name, java.lang.String accession, java.lang.String definition)
          Create a new concept with the specified name, accession, and definition in the specified domain.
 
Method Summary
(package private)  void addAssignment(SimpleAssignment assignment)
          Add the specified assignment.
(package private)  void addInProjection(SimpleProjection projection)
          Add the specified in projection.
(package private)  void addInRelation(SimpleRelation relation)
          Add the specified in relation.
(package private)  void addOutProjection(SimpleProjection projection)
          Add the specified out projection.
(package private)  void addOutRelation(SimpleRelation relation)
          Add the specified out relation.
 int degree()
          Return the degree of this concept, that is the total number of relations, projections, and assignments linked to this concept.
 java.lang.String getAccession()
          Return the accession (an unique identifier) of this concept.
 java.util.Set<Assignment> getAssignments()
          Return the set of assignments for this concept.
 java.lang.String getDefinition()
          Return the definition of this concept.
 Domain getDomain()
          Return the domain of this concept.
 java.lang.String getName()
          Return the name of this concept.
 java.util.Set<Projection> getProjections()
          Return the set of all projections for this concept.
 java.util.Set<Relation> getRelations()
          Return the set of all relations for this concept.
 java.util.Set<Projection> inProjections()
          Return the set of in projections for this concept, that is those projections that have this concept as the target.
 java.util.Set<Relation> inRelations()
          Return the set of in relations for this concept, that is those relations that have this concept as the target.
 java.util.Set<Projection> outProjections()
          Return the set of out projections for this concept, that is those projections that have this concept as the source.
 java.util.Set<Relation> outRelations()
          Return the set of out relations for this concept, that is those relations that have this concept as the source.
 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
Concept name.


accession

private final java.lang.String accession
Concept accession.


definition

private final java.lang.String definition
Concept definition.


inRelations

private final java.util.Set<Relation> inRelations
Set of in relations.


outRelations

private final java.util.Set<Relation> outRelations
Set of out relations.


inProjections

private final java.util.Set<Projection> inProjections
Set of in projections.


outProjections

private final java.util.Set<Projection> outProjections
Set of out projections.


assignments

private final java.util.Set<Assignment> assignments
Set of assignments.


domain

private final Domain domain
Domain.

Constructor Detail

SimpleConcept

SimpleConcept(Domain domain,
              java.lang.String name,
              java.lang.String accession,
              java.lang.String definition)
Create a new concept with the specified name, accession, and definition in the specified domain. domain and accession must not be null.

Parameters:
domain - domain
name - concept name
accession - concept accession
definition - concept definition
Method Detail

getName

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

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

getAccession

public java.lang.String getAccession()
Description copied from interface: Concept
Return the accession (an unique identifier) of this concept.

Specified by:
getAccession in interface Concept
Returns:
the accession
See Also:
Concept

getDefinition

public java.lang.String getDefinition()
Description copied from interface: Concept
Return the definition of this concept.

Specified by:
getDefinition in interface Concept
Returns:
the definition
See Also:
Concept

degree

public int degree()
Description copied from interface: Concept
Return the degree of this concept, that is the total number of relations, projections, and assignments linked to this concept. The degree must be >= 0.

Specified by:
degree in interface Concept
Returns:
the degree
See Also:
Concept

inRelations

public java.util.Set<Relation> inRelations()
Description copied from interface: Concept
Return the set of in relations for this concept, that is those relations that have this concept as the target. The set must not be null, but may be empty.

Specified by:
inRelations in interface Concept
Returns:
the set of in relations
See Also:
Concept

outRelations

public java.util.Set<Relation> outRelations()
Description copied from interface: Concept
Return the set of out relations for this concept, that is those relations that have this concept as the source. The set must not be null, but may be empty.

Specified by:
outRelations in interface Concept
Returns:
the set of out relations
See Also:
Concept

getRelations

public java.util.Set<Relation> getRelations()
Description copied from interface: Concept
Return the set of all relations for this concept. The set must not be null, but may be empty.

Specified by:
getRelations in interface Concept
Returns:
the set of all relations
See Also:
Concept

inProjections

public java.util.Set<Projection> inProjections()
Description copied from interface: Concept
Return the set of in projections for this concept, that is those projections that have this concept as the target. The set must not be null, but may be empty.

Specified by:
inProjections in interface Concept
Returns:
the set of in projections
See Also:
Concept

outProjections

public java.util.Set<Projection> outProjections()
Description copied from interface: Concept
Return the set of out projections for this concept, that is those projections that have this concept as the source. The set must not be null, but may be empty.

Specified by:
outProjections in interface Concept
Returns:
the set of out projections
See Also:
Concept

getProjections

public java.util.Set<Projection> getProjections()
Description copied from interface: Concept
Return the set of all projections for this concept. The set must not be null, but may be empty.

Specified by:
getProjections in interface Concept
Returns:
the set of all projections
See Also:
Concept

getAssignments

public java.util.Set<Assignment> getAssignments()
Description copied from interface: Concept
Return the set of assignments for this concept. The set must not be null, but may be empty.

Specified by:
getAssignments in interface Concept
Returns:
the set of assignments
See Also:
Concept

getDomain

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

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

addInRelation

void addInRelation(SimpleRelation relation)
Add the specified in relation.

Parameters:
relation - in relation to add

addOutRelation

void addOutRelation(SimpleRelation relation)
Add the specified out relation.

Parameters:
relation - out relation to add

addInProjection

void addInProjection(SimpleProjection projection)
Add the specified in projection.

Parameters:
projection - in projection to add

addOutProjection

void addOutProjection(SimpleProjection projection)
Add the specified out projection.

Parameters:
projection - out projection to add

addAssignment

void addAssignment(SimpleAssignment assignment)
Add the specified assignment.

Parameters:
assignment - assignment to add

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