From 34ca7df798da5031aa91b0d04039983cb077ba42 Mon Sep 17 00:00:00 2001 From: kelvingoodson Date: Fri, 29 Jan 2010 14:02:16 +0000 Subject: checkpoint - almost got example RSS feed of JIRA being consumed - some issues over Item git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@904500 13f79535-47bb-0310-9956-ffa450edef68 --- .../jagg/.settings/org.eclipse.jdt.core.prefs | 5 -- sandbox/kgoodson/jagg/pom.xml | 1 + .../jagg/src/main/java/services/PlanViewImpl.java | 53 ++++++++----- .../kgoodson/jagg/src/main/resources/JiraRSS.xsd | 92 ++++++++++++++++++++++ .../jagg/src/main/resources/JiraSideband.xml | 2 +- .../jagg/src/main/resources/exampleJira.xml | 52 ++++++++++++ 6 files changed, 181 insertions(+), 24 deletions(-) delete mode 100644 sandbox/kgoodson/jagg/.settings/org.eclipse.jdt.core.prefs create mode 100644 sandbox/kgoodson/jagg/src/main/resources/JiraRSS.xsd create mode 100644 sandbox/kgoodson/jagg/src/main/resources/exampleJira.xml (limited to 'sandbox/kgoodson') diff --git a/sandbox/kgoodson/jagg/.settings/org.eclipse.jdt.core.prefs b/sandbox/kgoodson/jagg/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index d61e19a23f..0000000000 --- a/sandbox/kgoodson/jagg/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,5 +0,0 @@ -#Thu Jan 21 10:52:25 GMT 2010 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.source=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 diff --git a/sandbox/kgoodson/jagg/pom.xml b/sandbox/kgoodson/jagg/pom.xml index b4d14055c6..55ec04f610 100644 --- a/sandbox/kgoodson/jagg/pom.xml +++ b/sandbox/kgoodson/jagg/pom.xml @@ -122,6 +122,7 @@ JiraSideband.xsd + JiraRSS.xsd 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 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 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) m2.unmarshal(inputFile)).getValue(); + augment_plan(_p); + } catch (Exception e) { e.printStackTrace(); + } finally { + } diff --git a/sandbox/kgoodson/jagg/src/main/resources/JiraRSS.xsd b/sandbox/kgoodson/jagg/src/main/resources/JiraRSS.xsd new file mode 100644 index 0000000000..8cd89b6c2c --- /dev/null +++ b/sandbox/kgoodson/jagg/src/main/resources/JiraRSS.xsd @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sandbox/kgoodson/jagg/src/main/resources/JiraSideband.xml b/sandbox/kgoodson/jagg/src/main/resources/JiraSideband.xml index 8f27510a0a..fc6f66e770 100644 --- a/sandbox/kgoodson/jagg/src/main/resources/JiraSideband.xml +++ b/sandbox/kgoodson/jagg/src/main/resources/JiraSideband.xml @@ -36,7 +36,7 @@ - + Add support for .... FB 2001-01-01 diff --git a/sandbox/kgoodson/jagg/src/main/resources/exampleJira.xml b/sandbox/kgoodson/jagg/src/main/resources/exampleJira.xml new file mode 100644 index 0000000000..16b4f82451 --- /dev/null +++ b/sandbox/kgoodson/jagg/src/main/resources/exampleJira.xml @@ -0,0 +1,52 @@ + + + ASF JIRA + https://issues.apache.org:443/jira + This file is an XML representation of an issue + en-uk + + 3.13.5 + 360 + 07-07-2009 + Enterprise + + + [TUSCANY-3397] Add support for identifying the SCA Spec Version for contribution metadata + https://issues.apache.org:443/jira/browse/TUSCANY-3397 + Provide the same support we have for Composites, for Contribution Metadata + + TUSCANY-3397 + Add support for identifying the SCA Spec Version for contribution metadata + Bug + Major + Resolved + Fixed + Luciano Resende + Luciano Resende + Fri, 18 Dec 2009 17:31:07 +0000 (UTC) + Fri, 18 Dec 2009 17:58:58 +0000 (UTC) + Java-SCA-2.0 + Java-SCA-2.0 + Java SCA Core Runtime + + 0 + + Fixed, you can now identify the spec version of the contribution metadata based on the SCA Namespace being used, this means that, for SCA 1.1, specVersion will return http://docs.oasis-open.org/ns/opencsa/sca/200912 + + + + + + Time in Status + + + + Resolution Date + + Fri, 18 Dec 2009 17:58:58 +0000 (UTC) + + + + + + -- cgit v1.2.3