org.openrdf.elmo.impl
Class ElmoEntityCompositor

java.lang.Object
  extended by org.openrdf.elmo.impl.ElmoEntityCompositor
All Implemented Interfaces:
ElmoEntityResolver

public class ElmoEntityCompositor
extends Object
implements ElmoEntityResolver

This class takes a collection of roles (interfaces or classes) and uses composition to combine this into a single class.

Author:
James Leigh

Constructor Summary
ElmoEntityCompositor()
           
 
Method Summary
 void addBehaviourFactory(ElmoBehaviourFactory<?> factory)
           
 void addFactoryClass(Class<?> factory, Class<?>... constructor)
           
 Class<?> resolveRoles(Class<?>[] roles)
          Finds or creates a class that implements all the concepts and behaviours in roles.
 void setBehaviourClassResolver(ElmoMapperResolver loader)
           
 void setClassDefiner(ClassFactory definer)
           
 void setFactoryClasses(Map<List<Class<?>>,Class<?>> factories)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ElmoEntityCompositor

public ElmoEntityCompositor()
Method Detail

setBehaviourClassResolver

public void setBehaviourClassResolver(ElmoMapperResolver loader)

setClassDefiner

public void setClassDefiner(ClassFactory definer)

addFactoryClass

public void addFactoryClass(Class<?> factory,
                            Class<?>... constructor)

setFactoryClasses

public void setFactoryClasses(Map<List<Class<?>>,Class<?>> factories)

addBehaviourFactory

public void addBehaviourFactory(ElmoBehaviourFactory<?> factory)

resolveRoles

public Class<?> resolveRoles(Class<?>[] roles)
Description copied from interface: ElmoEntityResolver
Finds or creates a class that implements all the concepts and behaviours in roles. The returned class must implement all interfaces in the list and implement all interfaces that are implemented by the classes in the list.

Specified by:
resolveRoles in interface ElmoEntityResolver
Parameters:
roles - Array of concepts and behaviours
Returns:
Class that implements all the roles given.


Copyright © 2004-2007. All Rights Reserved.