implementations
Class JavaSingleRelation

java.lang.Object
  |
  +--implementations.JavaImplementationGenerator
        |
        +--implementations.JavaSingleRelation
All Implemented Interfaces:
ImplementationGeneratorI
Direct Known Subclasses:
JAsCoSingleRelation, SEESCOASingleRelation

public class JavaSingleRelation
extends JavaImplementationGenerator

Implementation generator plugin class for implementing a SingleRelation composite in Java.

Version:
0.1.06, 5 February 2003
Author:
Dennis Wagelaar

Constructor Summary
JavaSingleRelation()
          Constructs a JavaSingleRelation.
 
Method Summary
 void apply(ImplementationGenerator implementation, GenerateImplementationVisitor generateImpl)
          Applies the implementation generator.
protected  void applyPerOwner()
          Applies the implementation generator for each Owner concept.
protected  void applyToOwner(Concept owner, java.util.Collection properties)
          Applies the implementation generator to an Owner concept.
protected  void checkRoles()
          Checks the composite roles for existence.
protected  CompositeRole getOwnerRole()
          Retrieves the Owner role of the composite.
protected  CompositeRole getPropertyRole()
          Retrieves the Property role of the composite.
 
Methods inherited from class implementations.JavaImplementationGenerator
createClause, createMethod, getClasses, getComposite, getConceptsFor, getCurrentImplementation, getCurrentImplementation, getImplGen, getInstanceName, getInterfaces, getModel, getPrimitives, getVisitor, insertImports, insertInheritance, insertMethod, insertMethodOverrideID, insertParameters, insertPrimitiveImplementation, insertPrimitiveImplementations, insertReturnType, insertVariables, isClass, isInterface, isMethod, isPrimitive, isStatic, lcfirst, setCurrentImplementation, setCurrentImplementation, ucfirst
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaSingleRelation

public JavaSingleRelation()
Constructs a JavaSingleRelation.
Method Detail

getOwnerRole

protected CompositeRole getOwnerRole()
Retrieves the Owner role of the composite.
Returns:
The Owner CompositeRole.

getPropertyRole

protected CompositeRole getPropertyRole()
Retrieves the Property role of the composite.
Returns:
The Property CompositeRole.

checkRoles

protected void checkRoles()
                   throws CoComposeException
Checks the composite roles for existence.
Throws:
CoComposeException - if a required role does not exist.

applyPerOwner

protected void applyPerOwner()
                      throws CoComposeException
Applies the implementation generator for each Owner concept.
Throws:
CoComposeException - if generating implementation failed.

applyToOwner

protected void applyToOwner(Concept owner,
                            java.util.Collection properties)
                     throws CoComposeException
Applies the implementation generator to an Owner concept.
Parameters:
owner - The concept to apply the role part for.
properties - The set of property concepts.
Throws:
CoComposeException - if generating implementation failed.

apply

public void apply(ImplementationGenerator implementation,
                  GenerateImplementationVisitor generateImpl)
           throws CoComposeException
Applies the implementation generator.
Overrides:
apply in class JavaImplementationGenerator
Parameters:
implementation - The implementation generator to apply.
generateImpl - The language specific code generation operation visitor.
Throws:
CoComposeException - if generating implementation failed.