Package org.brickred.socialauth.util

Examples of org.brickred.socialauth.util.DateComponents


              .getElementsByTagName("start-date");
          if (sd != null && sd.getLength() > 0) {
            String year = XMLParseUtil.getElementData(
                (Element) sd.item(0), "year");
            if (year != null) {
              DateComponents comp = new DateComponents();
              comp.setYear(Integer.parseInt(year));
              educationObj.setStartDate(comp);
            }

          }
          NodeList ed = educationEl.getElementsByTagName("end-date");
          if (ed != null && ed.getLength() > 0) {
            String year = XMLParseUtil.getElementData(
                (Element) ed.item(0), "year");
            if (year != null) {
              DateComponents comp = new DateComponents();
              comp.setYear(Integer.parseInt(year));
              educationObj.setEndDate(comp);
            }

          }
          educationsArr[i] = educationObj;
        }
      }

      // get positions
      NodeList positions = root.getElementsByTagName("position");
      if (positions != null && positions.getLength() > 0) {
        LOG.debug("Positions count " + positions.getLength());
        positionsArr = new Position[positions.getLength()];
        for (int i = 0; i < positions.getLength(); i++) {
          Position positionnObj = new Position();
          Element positionEl = (Element) positions.item(i);
          String pid = XMLParseUtil.getElementData(positionEl, "id");
          if (pid != null) {
            positionnObj.setPositionId(pid);
          }
          String title = XMLParseUtil.getElementData(positionEl,
              "title");
          if (title != null) {
            positionnObj.setTitle(title);
          }
          String isCurrent = XMLParseUtil.getElementData(positionEl,
              "is-current");
          if (isCurrent != null) {
            positionnObj.setCurrentCompany(Boolean
                .valueOf(isCurrent));
          }
          NodeList sd = positionEl.getElementsByTagName("start-date");
          if (sd != null && sd.getLength() > 0) {
            String year = XMLParseUtil.getElementData(
                (Element) sd.item(0), "year");
            if (year != null) {
              DateComponents comp = new DateComponents();
              comp.setYear(Integer.parseInt(year));
              positionnObj.setStartDate(comp);
            }

          }
          NodeList ed = positionEl.getElementsByTagName("end-date");
          if (ed != null && ed.getLength() > 0) {
            String year = XMLParseUtil.getElementData(
                (Element) ed.item(0), "year");
            if (year != null) {
              DateComponents comp = new DateComponents();
              comp.setYear(Integer.parseInt(year));
              positionnObj.setEndDate(comp);
            }

          }
View Full Code Here


              .getElementsByTagName("start-date");
          if (sd != null && sd.getLength() > 0) {
            String year = XMLParseUtil.getElementData(
                (Element) sd.item(0), "year");
            if (year != null) {
              DateComponents comp = new DateComponents();
              comp.setYear(Integer.parseInt(year));
              educationObj.setStartDate(comp);
            }

          }
          NodeList ed = educationEl.getElementsByTagName("end-date");
          if (ed != null && ed.getLength() > 0) {
            String year = XMLParseUtil.getElementData(
                (Element) ed.item(0), "year");
            if (year != null) {
              DateComponents comp = new DateComponents();
              comp.setYear(Integer.parseInt(year));
              educationObj.setEndDate(comp);
            }

          }
          educationsArr[i] = educationObj;
        }
      }

      // get positions
      NodeList positions = root.getElementsByTagName("position");
      if (positions != null && positions.getLength() > 0) {
        LOG.debug("Positions count " + positions.getLength());
        positionsArr = new Position[positions.getLength()];
        for (int i = 0; i < positions.getLength(); i++) {
          Position positionnObj = new Position();
          Element positionEl = (Element) positions.item(i);
          String pid = XMLParseUtil.getElementData(positionEl, "id");
          if (pid != null) {
            positionnObj.setPositionId(pid);
          }
          String title = XMLParseUtil.getElementData(positionEl,
              "title");
          if (title != null) {
            positionnObj.setTitle(title);
          }
          String isCurrent = XMLParseUtil.getElementData(positionEl,
              "is-current");
          if (isCurrent != null) {
            positionnObj.setCurrentCompany(Boolean
                .valueOf(isCurrent));
          }
          NodeList sd = positionEl.getElementsByTagName("start-date");
          if (sd != null && sd.getLength() > 0) {
            String year = XMLParseUtil.getElementData(
                (Element) sd.item(0), "year");
            if (year != null) {
              DateComponents comp = new DateComponents();
              comp.setYear(Integer.parseInt(year));
              positionnObj.setStartDate(comp);
            }

          }
          NodeList ed = positionEl.getElementsByTagName("end-date");
          if (ed != null && ed.getLength() > 0) {
            String year = XMLParseUtil.getElementData(
                (Element) ed.item(0), "year");
            if (year != null) {
              DateComponents comp = new DateComponents();
              comp.setYear(Integer.parseInt(year));
              positionnObj.setEndDate(comp);
            }

          }
View Full Code Here

TOP

Related Classes of org.brickred.socialauth.util.DateComponents

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.