Examples of Record


Examples of net.sf.cb2java.data.Record

     */
    public void testWeCanParseAlpha() throws FileNotFoundException, IOException {
        Copybook copybook = CopybookParser.parse("TYPES", new FileInputStream(new File("./src/test/resources/types.copybook")));
        assertEquals(16, copybook.getLength());
        List<Record> records = copybook.parseData(new FileInputStream(new File("./src/test/resources/types.txt")));
        Record record = records.get(0);
        assertEquals("!", record.getChild("TYPES").getChildren().get(0).getChildren().get(0).toString());
        assertEquals(">--------<", record.getChild("TYPES").getChildren().get(0).getChildren().get(1).toString());
    }
View Full Code Here

Examples of net.sf.jpluck.palm.Record

    /*String alternateURI = (String) alternateURIMap.get(uri);
    if (alternateURI != null) {
        uri = alternateURI;
    }*/
    for (Iterator iterator = recordList.iterator(); iterator.hasNext();) {
      Record record = (Record) iterator.next();
      if (record instanceof LinkableRecord) {
        LinkableRecord linkableRecord = (LinkableRecord) record;
        if (linkableRecord.getURI().equals(uri)) {
          newHome = (LinkableRecord) record;
          break;
View Full Code Here

Examples of no.priv.garshol.duke.Record

  }

  @Test
  public void testNormal() throws IOException {
    // First, index up the record
    Record r = TestUtils.makeRecord("ID", "abc", "NAME", "b");
    db.index(r);
    db.commit();

    // Then, retrieve it and verify that it's correct
    r = db.findRecordById("abc");
    assertEquals("abc", r.getValue("ID"));
    assertEquals("b", r.getValue("NAME"));
  }
View Full Code Here

Examples of org.apache.avro.generic.GenericData.Record

    super.stop();
    LOGGER.info("Twitter source {} stopped.", getName());
  }

  public void onStatus(Status status)  {
    Record doc = extractRecord("", avroSchema, status);
    if (doc == null) {
      return; // skip
    }
    docs.add(doc);
    if (docs.size() >= maxBatchSize ||
View Full Code Here

Examples of org.apache.blur.thrift.generated.Record

public class BlurThriftHelperTest {

  @Test
  public void testRecordMatch() {
    Record r1 = BlurThriftHelper.newRecord("test-family", "record-1", BlurThriftHelper.newColumn("a", "b"));
    Record r2 = BlurThriftHelper.newRecord("test-family", "record-1", BlurThriftHelper.newColumn("c", "d"));
    Record r3 = BlurThriftHelper.newRecord("test-family", "record-2", BlurThriftHelper.newColumn("e", "f"));
    Record r4 = BlurThriftHelper.newRecord("test-family-2", "record-1", BlurThriftHelper.newColumn("g", "h"));

    assertTrue("should match with same family and record-id", BlurThriftHelper.match(r1, r2));
    assertFalse("should not match with different record-id", BlurThriftHelper.match(r1, r3));
    assertFalse("should not match with different family", BlurThriftHelper.match(r1, r4));
  }
View Full Code Here

Examples of org.apache.camel.component.stax.model.Record

        recordsEndpoint.expectedMessageCount(10);
        recordsEndpoint.allMessages().body().isInstanceOf(Record.class);

        recordsEndpoint.assertIsSatisfied();

        Record five = recordsEndpoint.getReceivedExchanges().get(4).getIn().getBody(Record.class);
        assertEquals("4", five.getKey());
        assertEquals("#4", five.getValue());
    }
View Full Code Here

Examples of org.apache.empire.data.Record

        return action.getRecordKeyString(record);
    }
   
    public boolean isNewRecord()
    {
        Record record = getRecord();
        if (record==null || record.isValid()==false)
        {   // Check whether we can get the record key from the request or the session
            String property = getRecordPropertyName();
            String key = getActionParam(property, persistence==SessionPersistence.Key);
            if (key!=null)
                return action.getRecordNewFlagFromString(key); // Return key or null
            if (persistence!=SessionPersistence.Data)
                return false; // Unknown
            // Get Record from the session
            record = getRecordFromSession();
            if (record==null)
                return false; // No Record Provided
            // We have a record
            // setRecord(record);
        }
        return record.isNew();
    }
View Full Code Here

Examples of org.apache.flink.types.Record

      throw new IllegalStateException("Can use either 'getOutgoingEdges()' or 'sendMessageToAllTargets()'.");
    }
   
    edgesUsed = true;
    while (edges.hasNext()) {
      Record next = edges.next();
      VertexKey k = next.getField(1, this.keyClass);
      outValue.setField(0, k);
      outValue.setField(1, m);
      out.collect(outValue);
    }
  }
View Full Code Here

Examples of org.apache.hadoop.metrics2.util.MetricsCache.Record

      int sbBaseLen = sb.length();

      String type = null;
      GangliaSlope slopeFromMetric = null;
      GangliaSlope calculatedSlope = null;
      Record cachedMetrics = null;
      if (!isSupportSparseMetrics()) {
        // for sending dense metrics, update metrics cache
        // and get the updated data
        cachedMetrics = metricsCache.update(record);

        if (cachedMetrics != null && cachedMetrics.metricsEntrySet() != null) {
          for (Map.Entry<String, Metric> entry : cachedMetrics.metricsEntrySet()) {
            Metric metric = entry.getValue();
            sb.append(metric.name());
            String name = sb.toString();

            // visit the metric to identify the Ganglia type and slope
View Full Code Here

Examples of org.apache.jackrabbit.core.journal.Record

            if (status != STARTED) {
                log.info("not started: update create ignored.");
                return;
            }
            try {
                Record record = producer.append();
                update.setAttribute(ATTRIBUTE_RECORD, record);
            } catch (JournalException e) {
                String msg = "Unable to create log entry.";
                log.error(msg, e);
            } catch (Throwable e) {
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.