infovis.io
Class AbstractWriterFactory

java.lang.Object
  extended by infovis.utils.BasicFactory
      extended by infovis.io.AbstractWriterFactory
Direct Known Subclasses:
GraphWriterFactory

public abstract class AbstractWriterFactory
extends BasicFactory

Class AbstractWriterFactory

Version:
$Revision: 1.5 $
Author:
Jean-Daniel Fekete

Nested Class Summary
static class AbstractWriterFactory.AbstractCreator
           
static interface AbstractWriterFactory.Creator
           
 
Constructor Summary
AbstractWriterFactory(String factoryName)
           
 
Method Summary
 void add(AbstractWriterFactory.Creator c)
          Adds a creator of table reader.
 AbstractWriter create(String name, Table table)
          Returns an AbstractReader able to read the specified resource name or null.
 AbstractWriterFactory.Creator getCreatorAt(int index)
          Returns the Creator at a specified index.
 AbstractWriterFactory.Creator getCreatorNamed(String name)
           
 Iterator iterator()
          Returns an iterator over the added creators.
 boolean remove(AbstractWriterFactory.Creator c)
          Removes a creator of table reader.
 boolean tryWrite(String name, Table table)
           
 
Methods inherited from class infovis.utils.BasicFactory
loadProperties
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractWriterFactory

public AbstractWriterFactory(String factoryName)
Method Detail

add

public void add(AbstractWriterFactory.Creator c)
Adds a creator of table reader.

Parameters:
c - the Creator.

remove

public boolean remove(AbstractWriterFactory.Creator c)
Removes a creator of table reader.

Parameters:
c - the Creator.
Returns:
true if the Creator was removed.

iterator

public Iterator iterator()
Returns an iterator over the added creators.

Returns:
an iterator over the added creators.

getCreatorAt

public AbstractWriterFactory.Creator getCreatorAt(int index)
Returns the Creator at a specified index.

Parameters:
index - the index.
Returns:
the Creator at a specified index or null.

getCreatorNamed

public AbstractWriterFactory.Creator getCreatorNamed(String name)

create

public AbstractWriter create(String name,
                             Table table)
Returns an AbstractReader able to read the specified resource name or null.

Parameters:
name - the resource name.
table - the table.
Returns:
an AbstractReader able to read the specified resource name or null.

tryWrite

public boolean tryWrite(String name,
                        Table table)


Copyright 2005 by Jean-Daniel Fekete and INRIA, France All rights reserved.