Examples of Reader


Examples of cz.muni.fi.pa165.library.backend.Reader

  
    private void createReaderData() {
        EntityManager em = emf.createEntityManager();
        em.getTransaction().begin();
      
        em.persist(new Reader("Anton", "Bernolak", "10.4.1875", "Bernolakovo 453, SR",
                "anton.bernolak@gmail.com", "0903 560 987", "aaa"));
        em.persist(new Reader("Martin", "Skrecok", "5.10.1990", "Jurkovicova 16, SR",
                "martin.skrecok@gmail.com", "903 875 349", "bbb"));
        em.persist(new Reader("Leon", "Powe", "20.5.1950", "Golden Street, Boston, USA",
                "leon.powe@gmail.com", "740 320 853", "ccc"));
      
        em.getTransaction().commit();
        if (em != null) {
            em.close();
View Full Code Here

Examples of darkyenus.utils.files.Reader

                newFile = pathAnalizer;
            }else{
                newFile = new File(reference.getWorkingDirectory(), arguments[0]);
            }

            Reader reader = new Reader(newFile);
            return StringUtil.join(reader.readRest(), "\n");
        } catch (Exception ex) {
            if (arguments.length < 1 || !arguments[0].equalsIgnoreCase("mute")) {
                System.out.println("Could not read file: "+ex);
            }
            return "null";
View Full Code Here

Examples of dcc.m.textFile.READER

        StData.gui.main(new String[0]);

    }

    public static void CHECK(File f) {
        READER read = null;
        try {
            read = new READER(f);
        } catch (FileNotFoundException ex) {
            Logger.getLogger(algoD.class.getName()).log(Level.SEVERE, null, ex);
        }
        while (true) {
            try {
                System.out.println(read.nextLine());
            } catch (IOException ex) {
                Logger.getLogger(algoD.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }
View Full Code Here

Examples of de.willuhn.datasource.serialize.Reader

      {
        monitor.setStatusText(i18n.tr("Importiere Backup"));
        Logger.info("importing backup " + file.getAbsolutePath());
        final ClassLoader loader = Application.getPluginLoader().getManifest(HBCI.class).getClassLoader();

        Reader reader = null;
        try
        {
          InputStream is = new BufferedInputStream(new FileInputStream(file));
          reader = new XmlReader(is,new ObjectFactory() {
         
            public GenericObject create(String type, String id, Map values) throws Exception
            {
              AbstractDBObject object = (AbstractDBObject) Settings.getDBService().createObject(loader.loadClass(type),null);
              object.setID(id);
              Iterator i = values.keySet().iterator();
              while (i.hasNext())
              {
                String name = (String) i.next();
                object.setAttribute(name,values.get(name));
              }
              return object;
            }
         
          });
         
          long count = 1;
          GenericObject o = null;
          while ((o = reader.read()) != null)
          {
            try
            {
              ((AbstractDBObject)o).insert();
            }
            catch (Exception e)
            {
              if (o instanceof Protokoll)
              {
                // Bei den Protokollen kann das passieren. Denn beim Import der Datei werden vorher
                // die Konten importiert. Und deren Anlage fuehrt auch bereits zur Erstellung von
                // Protokollen, deren IDs dann im Konflikt zu diesen hier stehen.
                Logger.write(Level.DEBUG,"unable to import " + o.getClass().getName() + ":" + o.getID() + ", skipping",e);
              }
              else
              {
                Logger.error("unable to import " + o.getClass().getName() + ":" + o.getID() + ", skipping",e);
                monitor.log("  " + i18n.tr("{0} fehlerhaft ({1}), �berspringe",new String[]{BeanUtil.toString(o),e.getMessage()}));
              }
            }
            if (count++ % 100 == 0)
              monitor.addPercentComplete(1);
          }
         
          monitor.setStatus(ProgressMonitor.STATUS_DONE);
          monitor.setStatusText("Backup importiert");
          monitor.setPercentComplete(100);
        }
        catch (Exception e)
        {
          Logger.error("error while importing data",e);
          throw new ApplicationException(e.getMessage());
        }
        finally
        {
          if (reader != null)
          {
            try
            {
              reader.close();
              Logger.info("backup imported");
            }
            catch (Exception e) {/*useless*/}
          }
        }
View Full Code Here

Examples of de.willuhn.jameica.hbci.passports.ddv.rmi.Reader

  public boolean equals(Object obj)
  {
    if (!(obj instanceof Reader))
      return false;
   
    Reader other = (Reader) obj;
    String s1 = this.getClass().getName()  + this.getName();
    String s2 = other.getClass().getName() + other.getName();
    return s1.equals(s2);
  }
View Full Code Here

Examples of eu.curia.suivi2.datamanager.Reader

      // Create Spring Context
      ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(
          "applicationContext.xml");

      // Get bean
      final Reader reader = (Reader) ctx.getBean("readerThread");
      final Updater updater = (Updater) ctx.getBean("updaterThread");
      final UpdaterNoWait updaterNoWait = (UpdaterNoWait) ctx
          .getBean("updaterNoWaitThread");

      // Get thread
      Thread thReader = new Thread() {
        @SuppressWarnings("boxing")
        @Override
        public void run() {
          try {
            reader.action();
          } catch (DataAccessException dae) {
            // Check if there is a lock exception...
            if (dae instanceof TopLinkOptimisticLockingFailureException) {
              System.out
                  .printf(
View Full Code Here

Examples of gdcm.Reader

      throw new Exception("Could not scan");
      }

    for( long idx = 0; idx < fns.size(); ++idx )
      {
      Reader r = new Reader();
      String fn = fns.get( (int)idx );
      String outfn = fn + ".png";
      r.SetFileName( fn );
      TagSetType tst = new TagSetType();
      tst.insert( new Tag(0x7fe0,0x10) );
      b = r.ReadUpToTag( new Tag(0x88,0x200), tst );
      UIntArrayType dims = ImageHelper.GetDimensionsValue( r.GetFile() );
      if( b )
        {
        IconImageFilter iif = new IconImageFilter();
        System.out.println( "Processing: " + fn );

        iif.SetFile( r.GetFile() );
        b = iif.Extract();
        if( b )
          {
          Bitmap icon = iif.GetIconImage(0);
          WritePNG(icon, outfn);
          }
        else
          {
          ImageReader ir = new ImageReader();
          ir.SetFileName( fn );
          if( ir.Read() )
            {
            Image img = ir.GetImage();
            StringFilter sf = new StringFilter();
            sf.SetFile( r.GetFile() );
            String strval = sf.ToString( new Tag(0x0028,0x0120) );
            IconImageGenerator iig = new IconImageGenerator();
            iig.SetPixmap( img );
            iig.AutoPixelMinMax( true );
            try {
View Full Code Here

Examples of ivory.core.data.document.IntDocVector.Reader

    public void map(IntWritable key, IntDocVector doc, Context context)
        throws IOException, InterruptedException {
      docno = key.get();

      long startTime = System.currentTimeMillis();
      Reader r = doc.getReader();

      int dl = 0;
      while (r.hasMoreTerms()) {
        int term = r.nextTerm();
        r.getPositions(termPositions);

        // Set up the key and value, and emit.
        pair.set(term, docno);
        context.write(pair, termPositions);
View Full Code Here

Examples of java.io.Reader

          +" only. For cost-sensitive *prediction*, use one of the"
          +" cost-sensitive metaschemes such as"
          +" weka.classifiers.meta.CostSensitiveClassifier or"
          +" weka.classifiers.meta.MetaCost");

      Reader costReader = null;
      try {
        costReader = new BufferedReader(new FileReader(costFileName));
      } catch (Exception e) {
        throw new Exception("Can't open file " + e.getMessage() + '.');
      }
      try {
        // First try as a proper cost matrix format
        return new CostMatrix(costReader);
      } catch (Exception ex) {
        try {
          // Now try as the poxy old format :-)
          //System.err.println("Attempting to read old format cost file");
          try {
            costReader.close(); // Close the old one
            costReader = new BufferedReader(new FileReader(costFileName));
          } catch (Exception e) {
            throw new Exception("Can't open file " + e.getMessage() + '.');
          }
          CostMatrix costMatrix = new CostMatrix(numClasses);
View Full Code Here

Examples of java.io.Reader

 
    private static RuleBase createKnowledgeBase() {
        // create a builder
        PackageBuilder builder = new PackageBuilder();
        // load the process
        Reader source = new InputStreamReader(
            WorkingMemoryDbLoggerTest.class.getResourceAsStream("/ruleflow.rf"));
        builder.addProcessFromXml(source);
        source = new InputStreamReader(
        WorkingMemoryDbLoggerTest.class.getResourceAsStream("/ruleflow2.rf"));
        builder.addProcessFromXml(source);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.