edu.iu.iv.modeling.tarl.output.impl
Class DefaultOutputWriter

java.lang.Object
  |
  +--edu.iu.iv.modeling.tarl.output.impl.DefaultOutputWriter
All Implemented Interfaces:
OutputWriter

public class DefaultOutputWriter
extends java.lang.Object
implements OutputWriter

This class provides a default implementation of the OutputWriterInterface in order to write the Output Files. It assumes the default implementation of the standard interfaces.

Author:
Jeegar T Maru
See Also:
DefaultPublicationGroup, DefaultAuthorGroup, DefaultTopicGroup

Field Summary
 int[] authorMap
          Stores an array to map the author id integers to the Pajek identifiers
 int authorOffset
          Stores the offset for the author list in the Pajek file if publications are included
 AuthorGroup authors
          Stores the AuthorGroupInterface for the model
 int[] publicationMap
          Stores an array to map the publication id integers to the Pajek identifiers
 PublicationGroup publications
          Stores the PublicationGroupInterface for the model
 TopicGroup topics
          Stores the TopicGroupInterface for the model
 
Constructor Summary
DefaultOutputWriter()
          Specifies a default constructor
 
Method Summary
 void initialize(PublicationGroup publicationGroup, AuthorGroup authorGroup, TopicGroup topicGroup)
          Initializes the OutputWriter with the given publications and authors
 void writeDataFiles(java.lang.String folderPath)
          Writes out the Data Files to the file system in the given folder
 void writePajekFiles(java.lang.String folderPath)
          Writes out Pajek Files to the file system in the given folder
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

publications

public PublicationGroup publications
Stores the PublicationGroupInterface for the model


authors

public AuthorGroup authors
Stores the AuthorGroupInterface for the model


topics

public TopicGroup topics
Stores the TopicGroupInterface for the model


publicationMap

public int[] publicationMap
Stores an array to map the publication id integers to the Pajek identifiers


authorMap

public int[] authorMap
Stores an array to map the author id integers to the Pajek identifiers


authorOffset

public int authorOffset
Stores the offset for the author list in the Pajek file if publications are included

Constructor Detail

DefaultOutputWriter

public DefaultOutputWriter()
Specifies a default constructor

Method Detail

initialize

public void initialize(PublicationGroup publicationGroup,
                       AuthorGroup authorGroup,
                       TopicGroup topicGroup)
Initializes the OutputWriter with the given publications and authors

Specified by:
initialize in interface OutputWriter
Parameters:
publicationGroup - Specifies the group of all the publications for the model
authorGroup - Specifies the group of all authors for the model
topicGroup - Specifies the group of all topics for the model

writePajekFiles

public void writePajekFiles(java.lang.String folderPath)
                     throws java.io.FileNotFoundException
Writes out Pajek Files to the file system in the given folder

Specified by:
writePajekFiles in interface OutputWriter
Parameters:
folderPath - Specifies the location of the folder for the output files
Throws:
java.io.FileNotFoundException - if the files cannot be written to the file system

writeDataFiles

public void writeDataFiles(java.lang.String folderPath)
                    throws java.io.FileNotFoundException
Writes out the Data Files to the file system in the given folder

Specified by:
writeDataFiles in interface OutputWriter
Parameters:
folderPath - Specifies the location of the folder for the output files
Throws:
java.io.FileNotFoundException - if the files cannot be written to the file system