net.sf.mpxj.primavera
Class PrimaveraXERFileReader

java.lang.Object
  extended by net.sf.mpxj.reader.AbstractProjectReader
      extended by net.sf.mpxj.primavera.PrimaveraXERFileReader
All Implemented Interfaces:
ProjectReader

public final class PrimaveraXERFileReader
extends AbstractProjectReader

This class creates a new ProjectFile instance by reading a Primavera XER file.


Constructor Summary
PrimaveraXERFileReader()
           
 
Method Summary
 void addProjectListener(ProjectListener listener)
          Add a listener to receive events as a project is being read.
 Map<Integer,String> listProjects(InputStream is)
          Populates a Map instance representing the IDs and names of projects available in the current file.
 ProjectFile read(InputStream is)
          Read a file where the contents of the project file are supplied via an input stream.
 List<ProjectFile> readAll(InputStream is)
          This is a convenience method which allows all projects in an XER file to be read in a single pass.
 void setProjectID(int projectID)
          Set the ID of the project to be read.
 
Methods inherited from class net.sf.mpxj.reader.AbstractProjectReader
read, read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrimaveraXERFileReader

public PrimaveraXERFileReader()
Method Detail

addProjectListener

public void addProjectListener(ProjectListener listener)
Add a listener to receive events as a project is being read.

Parameters:
listener - ProjectListener instance

setProjectID

public void setProjectID(int projectID)
Set the ID of the project to be read.

Parameters:
projectID - project ID

read

public ProjectFile read(InputStream is)
                 throws MPXJException
Read a file where the contents of the project file are supplied via an input stream.

Parameters:
is - InputStream instance
Returns:
ProjectFile instance
Throws:
MPXJException

readAll

public List<ProjectFile> readAll(InputStream is)
                          throws MPXJException
This is a convenience method which allows all projects in an XER file to be read in a single pass.

Parameters:
is - input stream
Returns:
list of ProjectFile instances
Throws:
MPXJException

listProjects

public Map<Integer,String> listProjects(InputStream is)
                                 throws MPXJException
Populates a Map instance representing the IDs and names of projects available in the current file.

Parameters:
is - input stream used to read XER file
Returns:
Map instance containing ID and name pairs
Throws:
MPXJException


Copyright © 2012. All Rights Reserved.