Examples of MetadataEntryExtension


Examples of com.google.api.gbase.client.MetadataEntryExtension

   * an itemtype GoogleBaseEntry item.
   *
   * @param entry a Google Base data API itemtype entry
   */
  private static void printItemTypeEntry(GoogleBaseEntry entry) {
    MetadataEntryExtension metadata = entry.getGoogleBaseMetadata();
    ItemTypeDescription itemTypeDescription = metadata.getItemTypeDescription();
    System.out.println(itemTypeDescription.getName() + " - " + entry.getId());
    for (GoogleBaseAttributeId attrId : itemTypeDescription.getAttributeIds()) {
      System.out.println(attrId.getName() +
          " (" + attrId.getType().getName() + ")");
    }
View Full Code Here

Examples of com.google.api.gbase.client.MetadataEntryExtension

   * of a metadata GoogleBaseEntry item.
   *
   * @param entry a Google Base data API metadata entry
   */
  private static void printMetadataEntry(GoogleBaseEntry entry) {
    MetadataEntryExtension metadata = entry.getGoogleBaseMetadata();
    AttributeHistogram attributeHistogram = metadata.getAttributeHistogram();
    System.out.println(attributeHistogram.getAttributeName() +
        " (" + attributeHistogram.getAttributeType().getName() + "): " +
        "valueCount=" + attributeHistogram.getTotalValueCount() + " - " +
        entry.getId());
    for (UniqueValue value : attributeHistogram.getValues()) {
View Full Code Here

Examples of com.google.api.gbase.client.MetadataEntryExtension

   * @param entry an entry with a MetadataEntryExtension
   */
  private void extractValuesFromEntry(int numValue,
                                      String attrName,
                                      GoogleBaseEntry entry) {
    MetadataEntryExtension metadata = entry.getGoogleBaseMetadata();
    AttributeHistogram attributeHistogram = metadata.getAttributeHistogram();
    List<? extends UniqueValue> values = attributeHistogram.getValues();
   
    int valuesCount = Math.min(numValue, values.size());
    String[] usedValues = new String[valuesCount];
    for (int i = 0; i < valuesCount; i++) {
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.