Esempio n. 1
0
 @Override
 protected void putAttributes(AttributeGenerator generator) {
   generator.put(HREF, href);
   generator.put(REF, ref);
   generator.put(SOURCE, source);
   generator.put(TYPE, type);
 }
  @Override
  public void putAttributes(AttributeGenerator generator) {
    super.putAttributes(generator);

    if (encoding != Encoding.NONE) {
      generator.put(ATTRIBUTE_ENCODING, encoding.name().toLowerCase());
    }
  }
 @Override
 protected void putAttributes(AttributeGenerator generator) {
   putAttributeIfGreaterZero(generator, "viewCount", viewCount);
   putAttributeIfGreaterZero(generator, "videoWatchCount", videoWatchCount);
   putAttributeIfGreaterZero(generator, "subscriberCount", subscriberCount);
   putAttributeIfGreaterZero(generator, "totalUploadViews", totalUploadViews);
   if (lastWebAccess != null) {
     generator.put("lastWebAccess", lastWebAccess);
   }
 }
 @Override
 protected void putAttributes(AttributeGenerator generator) {
   generator.put(GAINPERCENTAGE, gainPercentage);
   generator.put(RETURN1W, return1w);
   generator.put(RETURN1Y, return1y);
   generator.put(RETURN3M, return3m);
   generator.put(RETURN3Y, return3y);
   generator.put(RETURN4W, return4w);
   generator.put(RETURN5Y, return5y);
   generator.put(RETURNOVERALL, returnOverall);
   generator.put(RETURNYTD, returnYTD);
   generator.put(SHARES, shares);
 }
 @Override
 protected void putAttributes(AttributeGenerator generator) {
   generator.put(VALUE, value);
 }
  @Override
  protected void putAttributes(AttributeGenerator generator) {
    super.putAttributes(generator);

    if (fileSize > 0) {
      generator.put("fileSize", fileSize);
    }

    generator.put("type", type);
    generator.put("medium", medium);
    if (isDefault) {
      generator.put("isDefault", isDefault);
    }
    generator.put(
        "expression", expression, new AttributeHelper.LowerCaseEnumToAttributeValue<Expression>());
    if (bitrate > 0) {
      generator.put("bitrate", bitrate);
    }
    if (framerate > 0) {
      generator.put("framerate", framerate);
    }
    if (samplingrate > 0) {
      generator.put("samplingrate", samplingrate);
    }
    if (channels > 0) {
      generator.put("channels", channels);
    }
    if (duration > 0) {
      generator.put("duration", duration);
    }
    generator.put("language", language);
  }
Esempio n. 7
0
 @Override
 protected void putAttributes(AttributeGenerator generator) {
   generator.put(COUNT, count);
   generator.put(UPDATED, updated);
 }
 /** Put the attribute only to the generator if its value is greater than zero. */
 private void putAttributeIfGreaterZero(AttributeGenerator generator, String key, long value) {
   if (value > 0) {
     generator.put(key, value);
   }
 }
 @Override
 protected void putAttributes(AttributeGenerator generator) {
   generator.setContent(value.toString());
 }
 @Override
 protected void putAttributes(AttributeGenerator generator) {
   generator.setContent(VALUE_ENUM_TO_ATTRIBUTE_VALUE.getAttributeValue(value));
 }
 @Override
 protected void putAttributes(AttributeGenerator generator) {
   super.putAttributes(generator);
   generator.put("total", total);
 }