edu.iastate.metnet.aracyc
Class AbstractAracycFileReader

java.lang.Object
  extended by edu.iastate.metnet.aracyc.AbstractAracycFileReader
All Implemented Interfaces:
IAracycFileReader
Direct Known Subclasses:
AttributeFileReader, AttributeFileReaderEx, TabularFileReader, TabularFileReaderEx

public class AbstractAracycFileReader
extends java.lang.Object
implements IAracycFileReader

abstract reader which implements read line stuff

Author:
Jie Li

Field Summary
(package private) static org.apache.log4j.Logger logger
          log4j facility
 
Constructor Summary
AbstractAracycFileReader()
           
 
Method Summary
protected  java.util.LinkedList getFileLines(java.io.InputStream inputStream)
           
protected  java.util.LinkedList getFileLines(java.lang.String filename)
          get the file lines as the linked list, and remove any comment line which are preceded by #
 void print(java.util.Map file)
          the map structure should contain the unique as the key, then another map as the value.
 java.util.Map read(java.io.InputStream inputStream)
           
 java.util.Map read(java.lang.String filename)
          empty function need to be implemented by subclass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

static org.apache.log4j.Logger logger
log4j facility

Constructor Detail

AbstractAracycFileReader

public AbstractAracycFileReader()
Method Detail

read

public java.util.Map read(java.lang.String filename)
empty function need to be implemented by subclass

Specified by:
read in interface IAracycFileReader
Parameters:
filename - filename of the dump file,
Returns:
the data structure

read

public java.util.Map read(java.io.InputStream inputStream)
Specified by:
read in interface IAracycFileReader

getFileLines

protected java.util.LinkedList getFileLines(java.lang.String filename)
get the file lines as the linked list, and remove any comment line which are preceded by #

Parameters:
filename - the file name
Returns:
the linked list of each line in the file

getFileLines

protected java.util.LinkedList getFileLines(java.io.InputStream inputStream)

print

public void print(java.util.Map file)
the map structure should contain the unique as the key, then another map as the value. the secondary map contain the string as the key and a set of value for the key

Specified by:
print in interface IAracycFileReader
Parameters:
file - the data structure