@classmethod
  def StaticAdd(cls, collection_urn, token, rdf_value,
                timestamp=None, suffix=None, **kwargs):
    if not isinstance(rdf_value, cls.RDF_TYPE):
      raise ValueError("This collection only accepts values of type %s." %
                       cls.RDF_TYPE.__name__)

    if timestamp is None:
      timestamp = rdfvalue.RDFDatetime().Now()
    if isinstance(timestamp, rdfvalue.RDFDatetime):
      timestamp = timestamp.AsMicroSecondsFromEpoch()

    if not isinstance(collection_urn, rdfvalue.RDFURN):
      collection_urn = rdfvalue.RDFURN(collection_urn)

    result_subject = cls._MakeURN(collection_urn, timestamp, suffix)
    data_store.DB.Set(result_subject,
                      cls.ATTRIBUTE,
                      rdf_value.SerializeToString(),
                      timestamp=timestamp,
                      token=token,
                      **kwargs)
    return cls._ParseURN(result_subject)
Renders this blocks content within the context of the given tool
dataset/ETHPy150Open google/grr/grr/lib/aff4_objects/sequential_collection.py/SequentialCollection.StaticAdd--crossover with--dataset/ETHPy150Open thasso/pyjip/jip/tools.py/Block.render