Package com.ebay.sdk.attributes.model

Examples of com.ebay.sdk.attributes.model.SearchAttributeSet


    }
    //
    SearchAttributeSet[] sets = ProductFinderParamParser.parseProductFinderPostData(nameValues);
    for(int i = 0; i < sets.length; i++ )
    {
      SearchAttributeSet set = sets[i];
      CategoryType cat = findCategoryByProductFinderID(cats, set.getProductFinderID());
//      CategoryType cat = cats[0];

      if( cat == null ) {
        throw new SdkException("findCategoryByProductFinderID failed.");
      }
      set.setCategoryID(Integer.parseInt(cat.getCategoryID()));
      //set.setCategoryOrdinal(i);
//     set.setProductFinderID(cat.getProductFinderID().intValue());

      // Set to the first CSID.
      CharacteristicsSetType[] css = cat.getCharacteristicsSets();
      if( css != null && css.length > 0 )
        set.setAttributeSetID(css[0].getAttributeSetID().intValue());
    }

    return sets;
  }
View Full Code Here


    //
    SearchAttributeSet[] sets = new SearchAttributeSet[gkey_pfid.size()];
    for( i = 0; i < sets.length; i++ )
    {
      sets[i] = new SearchAttributeSet();
      sets[i].setProductFinderID(Integer.parseInt((String)rgPFID[i]));
    }

    //
    Object[] keys = request.keySet().toArray();
    for(i = 0; i < keys.length; i++ )
    {
      String key = (String) keys[i];

      if (!key.startsWith(A))
        continue;

      String skey = key.substring(A.length());
      String aid, groupKey;
      int us_idx = skey.indexOf(US);
      if( us_idx != -1 )
      {
        aid = skey.substring(0, us_idx);
        groupKey = skey.substring(us_idx);
      }
      else
      {
        aid = skey;
        groupKey = "";
      }

      String valStr = ((String[])request.get(key))[0];

      Object objPFID = findValueByStringKey(gkey_pfid, groupKey);
      if( objPFID == null )
        throw new SdkException("Invalid group key.");

      SearchAttributeSet set = findAttributeSetByPFID(sets, Integer.parseInt((String)objPFID));
      SearchAttribute attr = new SearchAttribute();
      attr.setAttributeID(Integer.parseInt(aid));
      Value val = new Value();
      val.setValueID(new Integer(valStr));
      attr.addValue(val);
      set.add(attr);
    }

    return sets;
  }
View Full Code Here

TOP

Related Classes of com.ebay.sdk.attributes.model.SearchAttributeSet

Copyright © 2018 www.massapicom. 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.