org.weblab_project.core.factory
Class CellFactory

java.lang.Object
  extended by org.weblab_project.core.factory.CellFactory

public class CellFactory
extends java.lang.Object

To create Cells we strongly encourage to use this class. It will enable the creation of a Cell and a contained MediaUnit having valid URIs according with the WebLabRI recommendations.
Since a Cell hasn't any sense without being attached to a Line, we only provide a method for creating Cells that takes a Line in parameter. As a result, the created Cell is added to the Cell List of the Line. And moreover, to prevent from creating empty Cells, we also creates the contained MediaUnit.

Author:
EADS WebLab Team
Date:
2008-06-17

Method Summary
static
<T extends MediaUnit>
Cell
createAndLinkCell(Line line, java.lang.Class<T> muClass)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createAndLinkCell

public static <T extends MediaUnit> Cell createAndLinkCell(Line line,
                                                           java.lang.Class<T> muClass)
Type Parameters:
T - The MediaUnit created will be an instance of <T>, a subclass of MediaUnit.
Parameters:
line - The Line in which to create a Cell containing a MediaUnit of type muClass.
muClass - The class of the MediaUnit to be created in the created Cell.
Returns:
The created Cell containing an instance of muClass.


Copyright © 2004-2010. All Rights Reserved.