Examples of Deletion


Examples of net.sf.cram.encoding.read_features.Deletion

      cigarElementLength = cigarElement.getLength();
      CigarOperator operator = cigarElement.getOperator();

      switch (operator) {
      case D:
        features.add(new Deletion(zeroBasedPositionInRead + 1,
            cigarElementLength));
        break;
      case N:
        features.add(new RefSkip(zeroBasedPositionInRead + 1,
            cigarElementLength));
View Full Code Here

Examples of net.sf.cram.encoding.read_features.Deletion

        SoftClip sc = (SoftClip) v;
        for (int i = 0; i < sc.getSequence().length; i++)
          bases[posInRead++ - 1] = sc.getSequence()[i];
        break;
      case Deletion.operator:
        Deletion dv = (Deletion) v;
        posInSeq += dv.getLength();
        break;
      case InsertBase.operator:
        InsertBase ib = (InsertBase) v;
        bases[posInRead++ - 1] = ib.getBase();
        break;
View Full Code Here

Examples of net.sf.cram.encoding.read_features.Deletion

            SoftClip fv = new SoftClip(pos,
                softClipCodec.readData());
            rf.add(fv);
            break;
          case Deletion.operator:
            Deletion dv = new Deletion(pos, dlc.readData());
            rf.add(dv);
            break;
          case RefSkip.operator:
            RefSkip rsv = new RefSkip(pos, refSkipCodec.readData());
            rf.add(rsv);
View Full Code Here

Examples of net.sf.cram.encoding.read_features.Deletion

        case SoftClip.operator:
          SoftClip fv = (SoftClip) f;
          softClipCodec.writeData(fv.getSequence());
          break;
        case Deletion.operator:
          Deletion dv = (Deletion) f;
          dlc.writeData(dv.getLength());
          break;
        case RefSkip.operator:
          RefSkip rsv = (RefSkip) f;
          refSkipCodec.writeData(rsv.getLength());
          break;
View Full Code Here

Examples of net.sf.cram.encoding.read_features.Deletion

            sv.setPosition(newPos);
            sv.setBaseChange(new BaseChange(random.nextInt(4)));
            record.getReadFeatures().add(sv);
            break;
          case Deletion.operator:
            Deletion dv = new Deletion();
            dv.setPosition(newPos);
            dv.setLength(random.nextInt(10));
            record.getReadFeatures().add(dv);
            break;
          case Insertion.operator:
            Insertion iv = new Insertion();
            iv.setPosition(newPos);
View Full Code Here

Examples of org.apache.cassandra.avro.Deletion

                       column.timestamp = System.currentTimeMillis() * 1000;
                       columns.add(column);
                   }
                   if (columns.isEmpty()) // a deletion
                   {
                       mutation.deletion = new Deletion();
                       mutation.deletion.super_column = objToBB(pair.get(0));
                       mutation.deletion.timestamp = System.currentTimeMillis() * 1000;
                   }
                   else
                   {
                       sc.columns = columns;
                       mutation.column_or_supercolumn = new ColumnOrSuperColumn();
                       mutation.column_or_supercolumn.super_column = sc;
                   }
               }
               else // assume column since it couldn't be anything else
               {
                   if (pair.get(1) == null)
                   {
                       mutation.deletion = new Deletion();
                       mutation.deletion.predicate = new org.apache.cassandra.avro.SlicePredicate();
                       mutation.deletion.predicate.column_names = Arrays.asList(objToBB(pair.get(0)));
                       mutation.deletion.timestamp = System.currentTimeMillis() * 1000;
                   }
                   else
View Full Code Here

Examples of org.apache.cassandra.avro.Deletion

                       column.timestamp = System.currentTimeMillis() * 1000;
                       columns.add(column);
                   }
                   if (columns.isEmpty()) // a deletion
                   {
                       mutation.deletion = new Deletion();
                       mutation.deletion.super_column = objToBB(pair.get(0));
                       mutation.deletion.timestamp = System.currentTimeMillis() * 1000;
                   }
                   else
                   {
                       sc.columns = columns;
                       mutation.column_or_supercolumn = new ColumnOrSuperColumn();
                       mutation.column_or_supercolumn.super_column = sc;
                   }
               }
               else // assume column since it could be anything else
               {
                   if (pair.get(1) == null)
                   {
                       mutation.deletion = new Deletion();
                       mutation.deletion.predicate = new org.apache.cassandra.avro.SlicePredicate();
                       mutation.deletion.predicate.column_names = Arrays.asList(objToBB(pair.get(0)));
                       mutation.deletion.timestamp = System.currentTimeMillis() * 1000;
                   }
                   else
View Full Code Here

Examples of org.apache.cassandra.hadoop.avro.Deletion

                       column.timestamp = System.currentTimeMillis() * 1000;
                       columns.add(column);
                   }
                   if (columns.isEmpty()) // a deletion
                   {
                       mutation.deletion = new Deletion();
                       mutation.deletion.super_column = objToBB(pair.get(0));
                       mutation.deletion.timestamp = System.currentTimeMillis() * 1000;
                   }
                   else
                   {
                       sc.columns = columns;
                       mutation.column_or_supercolumn = new ColumnOrSuperColumn();
                       mutation.column_or_supercolumn.super_column = sc;
                   }
               }
               else // assume column since it couldn't be anything else
               {
                   if (pair.get(1) == null)
                   {
                       mutation.deletion = new Deletion();
                       mutation.deletion.predicate = new org.apache.cassandra.hadoop.avro.SlicePredicate();
                       mutation.deletion.predicate.column_names = Arrays.asList(objToBB(pair.get(0)));
                       mutation.deletion.timestamp = System.currentTimeMillis() * 1000;
                   }
                   else
View Full Code Here

Examples of org.apache.cassandra.thrift.Deletion

    return addSubDelete(key, cf, sc, keyspace.createClock());
  }

  public <SN, N, V> Mutator<K> addSubDelete(K key, String cf, HSuperColumn<SN, N, V> sc, long clock)
  {
    Deletion d = new Deletion().setTimestamp(clock);

    if (sc.getColumns() != null) {
      SlicePredicate pred = new SlicePredicate();
      for (HColumn<N, V> col : sc.getColumns()) {
        pred.addToColumn_names(col.getNameSerializer().toByteBuffer(
            col.getName()));
      }
      d.setPredicate(pred);
    }

    d.setSuper_column(sc.getNameByteBuffer());
    getPendingMutations().addDeletion(key, Arrays.asList(cf), d);

    return this;
  }
View Full Code Here

Examples of org.apache.cassandra.thrift.Deletion

   * {@inheritDoc}
   */
  @Override
  public <N> Mutator<K> addDeletion(K key, String cf, N columnName,
      Serializer<N> nameSerializer, long clock) {
    Deletion d;
    if (columnName != null) {
      SlicePredicate sp = new SlicePredicate();
      sp.addToColumn_names(nameSerializer.toByteBuffer(columnName));
      d = new Deletion().setTimestamp(clock).setPredicate(sp);
    } else {
      d = new Deletion().setTimestamp(clock);
    }
    getPendingMutations().addDeletion(key, Arrays.asList(cf), d);
    return this;
  }
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.