diff options
author | kelvingoodson <kelvingoodson@13f79535-47bb-0310-9956-ffa450edef68> | 2010-01-29 15:53:44 +0000 |
---|---|---|
committer | kelvingoodson <kelvingoodson@13f79535-47bb-0310-9956-ffa450edef68> | 2010-01-29 15:53:44 +0000 |
commit | e95b8dab55698aa2b43b8b525c9922f0ca0be121 (patch) | |
tree | f5e5b6440d0073c6ece7eb8742c9d050d189ed42 /sandbox/kgoodson/jagg/src/main/java | |
parent | 58049ed3431927e180cedcbc863773eb7960e91c (diff) |
jaxb digestion of dummy jira xml file working, needs now to go off and download jira xml instead
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@904531 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sandbox/kgoodson/jagg/src/main/java')
-rw-r--r-- | sandbox/kgoodson/jagg/src/main/java/services/PlanViewImpl.java | 39 |
1 files changed, 17 insertions, 22 deletions
diff --git a/sandbox/kgoodson/jagg/src/main/java/services/PlanViewImpl.java b/sandbox/kgoodson/jagg/src/main/java/services/PlanViewImpl.java index 13edacaaea..b4c5840154 100644 --- a/sandbox/kgoodson/jagg/src/main/java/services/PlanViewImpl.java +++ b/sandbox/kgoodson/jagg/src/main/java/services/PlanViewImpl.java @@ -31,6 +31,8 @@ import javax.xml.bind.Unmarshaller; import org.oasisopen.sca.annotation.Init; +import com.example.ipo.jaxb.Item; +import com.example.ipo.jaxb.JiraData; import com.example.ipo.jaxb.Milestone; import com.example.ipo.jaxb.Plan; import com.example.ipo.jaxb.RSS; @@ -83,27 +85,9 @@ public class PlanViewImpl implements PlanView { for (WorkItem wi: m.getWorkItem()) { String jira = wi.getJira(); String feed = rssPrefix += jira + "/" + jira + ".xml"; - -// SyndFeedInput input = new SyndFeedInput(); -// try { -// SyndFeed sfeed = input.build(new XmlReader(new URL(feed))); -// List<SyndEntry> entries = sfeed.getEntries(); -// SyndEntry jiraEntry = (SyndEntry)entries.toArray()[0]; -// String title = jiraEntry.getTitle(); -// System.out.println(sfeed.toString()); -// } catch (IllegalArgumentException e) { -// // TODO Auto-generated catch block -// e.printStackTrace(); -// } catch (MalformedURLException e) { -// // TODO Auto-generated catch block -// e.printStackTrace(); -// } catch (FeedException e) { -// // TODO Auto-generated catch block -// e.printStackTrace(); -// } catch (IOException e) { -// // TODO Auto-generated catch block -// e.printStackTrace(); -// } + JiraData jd = new JiraData(); + wi.setJiraData(jd); + jd.setID(jira); try { JAXBContext jaxbContext = JAXBContext @@ -113,7 +97,18 @@ public class PlanViewImpl implements PlanView { .getAbsoluteFile(); RSS j = ((JAXBElement<RSS>) m2.unmarshal(inputFile)).getValue(); - augment_plan(_p); + System.out.println(j.toString()); + Item i = j.getChannel().getItem(); + System.out.println(i.toString()); + List<JAXBElement<?>> c = i.getContent(); + for (JAXBElement<?> element : c) { + if("status".equals(element.getName().getLocalPart())){ + jd.setStatus((String)element.getValue()); + } + if("responsible".equals(element.getName().getLocalPart())) { + jd.setAssignedTo((String)element.getValue()); + } + } } catch (Exception e) { e.printStackTrace(); } finally { |