Package org.brickred.socialauth

Examples of org.brickred.socialauth.Recommendation


        LOG.debug("Recommendations count "
            + recommendations.getLength());
        recommendationsArr = new Recommendation[recommendations
            .getLength()];
        for (int i = 0; i < recommendations.getLength(); i++) {
          Recommendation recommendationObj = new Recommendation();
          Element recommendationEl = (Element) recommendations
              .item(i);
          String rid = XMLParseUtil.getElementData(recommendationEl,
              "id");
          if (rid != null) {
            recommendationObj.setRecommendationId(rid);
          }
          String text = XMLParseUtil.getElementData(recommendationEl,
              "recommendation-text");
          if (text != null) {
            recommendationObj.setRecommendationText(text);
          }

          String code = XMLParseUtil.getElementData(recommendationEl,
              "code");
          if (code != null) {
            recommendationObj.setRecommendationType(code);
          }

          NodeList recommenderNodes = recommendationEl
              .getElementsByTagName("recommender");
          if (recommenderNodes != null
              && recommenderNodes.getLength() > 0) {
            Element recommenderEl = (Element) recommenderNodes
                .item(0);
            String recommenderId = XMLParseUtil.getElementData(
                recommenderEl, "id");
            if (recommenderId != null) {
              recommendationObj.setRecommenderId(recommenderId);
            }
            String fname = XMLParseUtil.getElementData(
                recommenderEl, "first-name");
            if (fname != null) {
              recommendationObj.setRecommenderFirstName(fname);
            }
            String lname = XMLParseUtil.getElementData(
                recommenderEl, "last-name");
            if (lname != null) {
              recommendationObj.setRecommenderLastName(lname);
            }

          }
          recommendationsArr[i] = recommendationObj;
        }
View Full Code Here


        LOG.debug("Recommendations count "
            + recommendations.getLength());
        recommendationsArr = new Recommendation[recommendations
            .getLength()];
        for (int i = 0; i < recommendations.getLength(); i++) {
          Recommendation recommendationObj = new Recommendation();
          Element recommendationEl = (Element) recommendations
              .item(i);
          String rid = XMLParseUtil.getElementData(recommendationEl,
              "id");
          if (rid != null) {
            recommendationObj.setRecommendationId(rid);
          }
          String text = XMLParseUtil.getElementData(recommendationEl,
              "recommendation-text");
          if (text != null) {
            recommendationObj.setRecommendationText(text);
          }

          String code = XMLParseUtil.getElementData(recommendationEl,
              "code");
          if (code != null) {
            recommendationObj.setRecommendationType(code);
          }

          NodeList recommenderNodes = recommendationEl
              .getElementsByTagName("recommender");
          if (recommenderNodes != null
              && recommenderNodes.getLength() > 0) {
            Element recommenderEl = (Element) recommenderNodes
                .item(0);
            String recommenderId = XMLParseUtil.getElementData(
                recommenderEl, "id");
            if (recommenderId != null) {
              recommendationObj.setRecommenderId(recommenderId);
            }
            String fname = XMLParseUtil.getElementData(
                recommenderEl, "first-name");
            if (fname != null) {
              recommendationObj.setRecommenderFirstName(fname);
            }
            String lname = XMLParseUtil.getElementData(
                recommenderEl, "last-name");
            if (lname != null) {
              recommendationObj.setRecommenderLastName(lname);
            }

          }
          recommendationsArr[i] = recommendationObj;
        }
View Full Code Here

TOP

Related Classes of org.brickred.socialauth.Recommendation

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.