summaryrefslogtreecommitdiffstats
path: root/sandbox/kgoodson/jagg/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/kgoodson/jagg/src/main/java')
-rw-r--r--sandbox/kgoodson/jagg/src/main/java/services/PlanViewImpl.java53
1 files changed, 35 insertions, 18 deletions
diff --git a/sandbox/kgoodson/jagg/src/main/java/services/PlanViewImpl.java b/sandbox/kgoodson/jagg/src/main/java/services/PlanViewImpl.java
index b432522917..13edacaaea 100644
--- a/sandbox/kgoodson/jagg/src/main/java/services/PlanViewImpl.java
+++ b/sandbox/kgoodson/jagg/src/main/java/services/PlanViewImpl.java
@@ -33,7 +33,9 @@ import org.oasisopen.sca.annotation.Init;
import com.example.ipo.jaxb.Milestone;
import com.example.ipo.jaxb.Plan;
+import com.example.ipo.jaxb.RSS;
import com.example.ipo.jaxb.WorkItem;
+import com.example.ipo.jaxb.JiraRSS;
import com.sun.syndication.feed.synd.SyndEntry;
import com.sun.syndication.feed.synd.SyndFeed;
import com.sun.syndication.io.FeedException;
@@ -82,25 +84,40 @@ public class PlanViewImpl implements PlanView {
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
+// 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();
+// }
+
+ try {
+ JAXBContext jaxbContext = JAXBContext
+ .newInstance("com.example.ipo.jaxb");
+ Unmarshaller m2 = jaxbContext.createUnmarshaller();
+ File inputFile = new File("src/main/resources/exampleJira.xml")
+ .getAbsoluteFile();
+
+ RSS j = ((JAXBElement<RSS>) m2.unmarshal(inputFile)).getValue();
+ augment_plan(_p);
+ } catch (Exception e) {
e.printStackTrace();
+ } finally {
+
}