Пример #1
0
 /*package*/
 static List<RetweetDetails> createRetweetDetails(Response res, KxSDK kxSDK) throws KxException {
   Document doc = res.asDocument();
   if (isRootNodeNilClasses(doc)) {
     return new ArrayList<RetweetDetails>(0);
   } else {
     try {
       ensureRootNodeNameIs("retweets", doc);
       NodeList list = doc.getDocumentElement().getElementsByTagName("retweet_details");
       int size = list.getLength();
       List<RetweetDetails> statuses = new ArrayList<RetweetDetails>(size);
       for (int i = 0; i < size; i++) {
         Element status = (Element) list.item(i);
         statuses.add(new RetweetDetails(res, status, kxSDK));
       }
       return statuses;
     } catch (KxException te) {
       ensureRootNodeNameIs("nil-classes", doc);
       return new ArrayList<RetweetDetails>(0);
     }
   }
 }
Пример #2
0
 /*package*/ RetweetDetails(Response res, KxSDK kxSDK) throws KxException {
   super(res);
   Element elem = res.asDocument().getDocumentElement();
   init(res, elem, kxSDK);
 }