Examples of toText()


Examples of buri.ddmsence.ddms.resource.Person.toText()

    PropertyReader.setProperty("output.indexLevel", "0");
    assertEquals("entityType: person\nname: Brian\nname: BU\nphone: 703-885-1000\nsurname: Uri\n", person.toText());

    PropertyReader.setProperty("output.indexLevel", "1");
    assertEquals("entityType: person\nname[1]: Brian\nname[2]: BU\nphone: 703-885-1000\nsurname: Uri\n",
      person.toText());

    PropertyReader.setProperty("output.indexLevel", "2");
    assertEquals("entityType: person\nname[1]: Brian\nname[2]: BU\nphone[1]: 703-885-1000\nsurname: Uri\n",
      person.toText());
  }
View Full Code Here

Examples of buri.ddmsence.ddms.resource.Person.toText()

    assertEquals("entityType: person\nname[1]: Brian\nname[2]: BU\nphone: 703-885-1000\nsurname: Uri\n",
      person.toText());

    PropertyReader.setProperty("output.indexLevel", "2");
    assertEquals("entityType: person\nname[1]: Brian\nname[2]: BU\nphone[1]: 703-885-1000\nsurname: Uri\n",
      person.toText());
  }

  @Test
  public void testExtensibleFailure() throws InvalidDDMSException {
    // No failure cases to test right now.
View Full Code Here

Examples of buri.ddmsence.ddms.resource.Person.toText()

    List<String> names = Util.getXsListAsList("Brian BU");
    List<String> phones = Util.getXsListAsList("703-885-1000");
    Person person = new Person(names, "Uri", phones, null, null, null);

    PropertyReader.setProperty("output.indexLevel", "0");
    assertEquals("entityType: person\nname: Brian\nname: BU\nphone: 703-885-1000\nsurname: Uri\n", person.toText());

    PropertyReader.setProperty("output.indexLevel", "1");
    assertEquals("entityType: person\nname[1]: Brian\nname[2]: BU\nphone: 703-885-1000\nsurname: Uri\n",
      person.toText());
View Full Code Here

Examples of com.cloudera.flume.reporter.ReportEvent.toText()

        .getLongMetric(InsistentOpenDecorator.A_ATTEMPTS));
    assertEquals(new Long(1), rpt
        .getLongMetric(InsistentOpenDecorator.A_SUCCESSES));
    assertEquals(new Long(2), rpt
        .getLongMetric(InsistentOpenDecorator.A_RETRIES));
    System.out.println(rpt.toText());
  }

  /**
   * Test that an IOD tries the correct number of times to reopen a failing
   * sink, then gives up.
View Full Code Here

Examples of com.cloudera.flume.reporter.ReportEvent.toText()

          failCount++;
        }
      }

      ReportEvent rpt = getMetrics();
      LOG.info(rpt.toText());
      reportSink.append(e);
      // record info but do not pass the message on.
      return;
    }
View Full Code Here

Examples of com.cloudera.flume.reporter.ReportEvent.toText()

      Benchmark b = benchmarks.get(tag).getLeft();
      b.mark("benchmarkDone");
      b.done();

      ReportEvent rpt = getMetrics();
      LOG.info(rpt.toText());
      reportSink.append(rpt);

    } else if (Arrays.equals(bench, BenchmarkInjectDecorator.BENCH_ERROR)) {
      Benchmark b = benchmarks.get(tag).getLeft();
      b.mark("benchmarkError");
View Full Code Here

Examples of com.cloudera.flume.reporter.ReportEvent.toText()

      b.mark("benchmarkError");
      b.done();
      LOG.info(getMetrics().toText());

      ReportEvent rpt = getMetrics();
      LOG.info(rpt.toText());
      reportSink.append(rpt);
    } else {
      String msg = "Unexpected Benchmark event type: " + tag;
      LOG.error(msg);
      throw new IllegalArgumentException(msg);
View Full Code Here

Examples of com.vividsolutions.jts.geom.Geometry.toText()

       
              SimpleFeature feature = featureIterator.next();
       
              Geometry defaultGeometry = (Geometry) feature.getDefaultGeometry();
              ProjectPlugin.log(className
                + "- Original feature: " + defaultGeometry.toText()); //$NON-NLS-1$
       
              if (!defaultGeometry.isValid()) {
            ProjectPlugin
              .log(className
                + "- Original feature has invalid geometry: " + defaultGeometry.toText()); //$NON-NLS-1$
View Full Code Here

Examples of com.vividsolutions.jts.geom.Geometry.toText()

                + "- Original feature: " + defaultGeometry.toText()); //$NON-NLS-1$
       
              if (!defaultGeometry.isValid()) {
            ProjectPlugin
              .log(className
                + "- Original feature has invalid geometry: " + defaultGeometry.toText()); //$NON-NLS-1$
            throw new SplitFeaturesCommandException(
              Messages.SplitFeaturesCommand_the_feature_has_invalid_geometry);
              }
              featureList.add(feature);
       
View Full Code Here

Examples of com.vividsolutions.jts.geom.Geometry.toText()

    Geometry geometry;

    geometry = reader.read(wkt);
   
    if(!geometry.isValid()){
        throw new IllegalStateException("the geometry is not valid: " + geometry.toText() ); //$NON-NLS-1$
    }

    return geometry;
  }
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.