Package net.sf.mpxj.reader

Examples of net.sf.mpxj.reader.ProjectReader


    @Override
    public List<CalendarDTO> getCalendarDTOs(InputStream file, String filename) {

        try {

            ProjectReader reader = ProjectReaderUtility
                    .getProjectReader(filename);

            // In case that orders are imported too
            projectFile = reader.read(file);

            return MPXJProjectFileConversor.convertCalendars(projectFile);

        } catch (Exception e) {
View Full Code Here


     */
    @Override
    public OrderDTO getImportData(InputStream file, String filename) {
        try {

            ProjectReader reader = ProjectReaderUtility
                    .getProjectReader(filename);

                return MPXJProjectFileConversor
                        .convert(reader.read(file), filename);

        } catch (Exception e) {

            throw new RuntimeException(e);

View Full Code Here

    * @param filename name of the MPX file
    * @throws Exception on file read error
    */
   private static void query(String filename) throws Exception
   {
      ProjectReader reader = ProjectReaderUtility.getProjectReader(filename);
      ProjectFile mpx = reader.read(filename);

      System.out.println("MPP file type: " + mpx.getMppFileType());

      listProjectHeader(mpx);

View Full Code Here

    * @param filename input file name
    * @param filtername input filter name
    */
   private static void filter(String filename, String filtername) throws Exception
   {
      ProjectReader reader = ProjectReaderUtility.getProjectReader(filename);
      ProjectFile project = reader.read(filename);
      Filter filter = project.getFilterByName(filtername);

      if (filter == null)
      {
         displayAvailableFilters(project);
View Full Code Here

    */
   public void process(String inputFile, String outputFile) throws Exception
   {
      System.out.println("Reading input file started.");
      long start = System.currentTimeMillis();
      ProjectReader reader = ProjectReaderUtility.getProjectReader(inputFile);
      ProjectFile projectFile = reader.read(inputFile);
      long elapsed = System.currentTimeMillis() - start;
      System.out.println("Reading input file completed in " + elapsed + "ms.");

      System.out.println("Writing output file started.");
      start = System.currentTimeMillis();
View Full Code Here

TOP

Related Classes of net.sf.mpxj.reader.ProjectReader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.