Package net.sf.mpxj

Examples of net.sf.mpxj.Filter


         if (filterFixedData == null || filterFixedData.length < 4)
         {
            continue;
         }

         Filter filter = new Filter();
         filter.setID(Integer.valueOf(MPPUtility.getInt(filterFixedData, 0)));
         filter.setName(MPPUtility.removeAmpersands(MPPUtility.getUnicodeString(filterFixedData, 4)));
         byte[] filterVarData = varData.getByteArray(filter.getID(), getVarDataType());
         if (filterVarData == null)
         {
            continue;
         }

         //System.out.println(MPPUtility.hexdump(filterVarData, true, 16, ""));
         List<GenericCriteriaPrompt> prompts = new LinkedList<GenericCriteriaPrompt>();

         filter.setShowRelatedSummaryRows(MPPUtility.getByte(filterVarData, 4) != 0);
         filter.setCriteria(criteriaReader.process(file, filterVarData, 0, -1, prompts, null, criteriaType));

         filter.setIsTaskFilter(criteriaType[0]);
         filter.setIsResourceFilter(criteriaType[1]);
         filter.setPrompts(prompts);

         file.addFilter(filter);
         //System.out.println(filter);
      }
   }
View Full Code Here


         GenericCriteria c = criteria.process(m_parent, data, offset + 4, entryOffset, null, fields, null);
         //System.out.println(c);

         if (!fields.isEmpty())
         {
            Filter filter = new Filter();
            filter.setCriteria(c);
            m_autoFilters.add(filter);
            m_autoFiltersByType.put(fields.get(0), filter);
         }

         //
View Full Code Here

    */
   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);
      }
      else
      {
         System.out.println(filter);
         System.out.println();

         if (filter.isTaskFilter())
         {
            processTaskFilter(project, filter);
         }
         else
         {
View Full Code Here

         // may need to sort this out
         GenericCriteria c = criteria.process(m_parent, data, offset + 12, -1, null, null, null);
         //System.out.println(c);

         Filter filter = new Filter();
         filter.setCriteria(c);
         m_autoFilters.add(filter);
         m_autoFiltersByType.put(field, filter);

         //
         // Move to the next filter
View Full Code Here

         GenericCriteria c = criteria.process(m_parent, data, offset + 4, entryOffset, null, fields, null);
         //System.out.println(c);

         if (!fields.isEmpty())
         {
            Filter filter = new Filter();
            filter.setCriteria(c);
            m_autoFilters.add(filter);
            m_autoFiltersByType.put(fields.get(0), filter);
         }

         //
View Full Code Here

TOP

Related Classes of net.sf.mpxj.Filter

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.