From nuvem-commits-returnmitchellbarry@example.com Mon Mar 07 02:24:56 2011 Return-Path: <nuvem-commits-returnmitchellbarry@example.com> Delivered-To: mitchellbarry@example.com Received: (qmail 80514 invoked from network); 7 Mar 2011 02:24:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 7 Mar 2011 02:24:56 -0000 Received: (qmail 14461 invoked by uid 500); 7 Mar 2011 02:24:56 -0000 Delivered-To: mitchellbarry@example.com Received: (qmail 14431 invoked by uid 500); 7 Mar 2011 02:24:56 -0000 Mailing-List: contact mitchellbarry@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:mitchellbarry@example.com> List-Unsubscribe: <mailto:mitchellbarry@example.com> List-Post: <mailto:mitchellbarry@example.com> List-Id: <nuvem-commits.incubator.apache.org> Reply-To: mitchellbarry@example.com Delivered-To: mailing list mitchellbarry@example.com Received: (qmail 14422 invoked by uid 99); 7 Mar 2011 02:24:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Mar 2011 02:24:56 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Mar 2011 02:24:53 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 5C8C82388A02; Mon, 7 Mar 2011 02:24:32 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1078653 - in /incubator/nuvem/trunk/nuvem-parallel: nuvem/cons.py nuvem/list_.py test.py Date: Mon, 07 Mar 2011 02:24:32 -0000 To: mitchellbarry@example.com From: mitchellbarry@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <mitchellbarry@example.com> X-Virus-Checked: Checked by ClamAV on apache.org Author: jsdelfino Date: Mon Mar 7 02:24:31 2011 New Revision: 1078653 URL: http://svn.apache.org/viewvc?rev=1078653&view=rev Log: Make 'list' component easier to compose by using one reference per element in the list, instead of a 'cons'-like linked list construction pattern. Rename the original list component to 'cons'. Added: incubator/nuvem/trunk/nuvem-parallel/nuvem/cons.py - copied, changed from r1074928, incubator/nuvem/trunk/nuvem-parallel/nuvem/list_.py Modified: incubator/nuvem/trunk/nuvem-parallel/nuvem/list_.py incubator/nuvem/trunk/nuvem-parallel/test.py Copied: incubator/nuvem/trunk/nuvem-parallel/nuvem/cons.py (from r1074928, incubator/nuvem/trunk/nuvem-parallel/nuvem/list_.py) URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-parallel/nuvem/cons.py?p2=incubator/nuvem/trunk/nuvem-parallel/nuvem/cons.py&p1=incubator/nuvem/trunk/nuvem-parallel/nuvem/list_.py&r1=1074928&r2=1078653&rev=1078653&view=diff ============================================================================== (empty) Modified: incubator/nuvem/trunk/nuvem-parallel/nuvem/list_.py URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-parallel/nuvem/list_.py?rev=1078653&r1=1078652&r2=1078653&view=diff ============================================================================== --- incubator/nuvem/trunk/nuvem-parallel/nuvem/list_.py (original) +++ incubator/nuvem/trunk/nuvem-parallel/nuvem/list_.py Mon Mar 7 02:24:31 2011 @@ -15,9 +15,7 @@ # specific language governing permissions and limitations # under the License. -def get(r, first, rest): - rst = rest.get(r) - if rst is None: - return (first.get(r),) - return (first.get(r),) + rst +def get(*args): + r = args[0] + return tuple(map(lambda x: x.get(r), args[1:len(args) - 1])) Modified: incubator/nuvem/trunk/nuvem-parallel/test.py URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-parallel/test.py?rev=1078653&r1=1078652&r2=1078653&view=diff ============================================================================== --- incubator/nuvem/trunk/nuvem-parallel/test.py (original) +++ incubator/nuvem/trunk/nuvem-parallel/test.py Mon Mar 7 02:24:31 2011 @@ -37,6 +37,7 @@ from nuvem import not_ from nuvem import equals from nuvem import lesser from nuvem import greater +from nuvem import cons from nuvem import list_ from nuvem import empty from nuvem import first @@ -95,10 +96,13 @@ def testLogic(): return True def testLists(): - assert list_.get((), mkref('first', lambda r: 'abc'), mkref('rest', lambda r: None)) == ('abc',) - assert list_.get((), mkref('first', lambda r: 'abc'), mkref('rest', lambda r: ())) == ('abc',) - assert list_.get((), mkref('first', lambda r: 'abc'), mkref('rest', lambda r: ('def',))) == ('abc', 'def') - assert list_.get((), mkref('first', lambda r: 'abc'), mkref('rest', lambda r: ('def', 'ghi'))) == ('abc', 'def', 'ghi') + assert list_.get((), mkref('item', lambda r: None)) == () + assert list_.get((), mkref('item', lambda r: 'abc'), mkref('item', lambda r: None)) == ('abc',) + assert list_.get((), mkref('item', lambda r: 'abc'), mkref('item', lambda r: 'def'), mkref('item', lambda r: None)) == ('abc', 'def') + assert cons.get((), mkref('first', lambda r: 'abc'), mkref('rest', lambda r: None)) == ('abc',) + assert cons.get((), mkref('first', lambda r: 'abc'), mkref('rest', lambda r: ())) == ('abc',) + assert cons.get((), mkref('first', lambda r: 'abc'), mkref('rest', lambda r: ('def',))) == ('abc', 'def') + assert cons.get((), mkref('first', lambda r: 'abc'), mkref('rest', lambda r: ('def', 'ghi'))) == ('abc', 'def', 'ghi') assert empty.get(()) == () assert first.get((), mkref('l', lambda r: ('abc', 'def'))) == 'abc' assert rest.get((), mkref('l', lambda r: ('abc', 'def', 'ghi'))) == ('def', 'ghi') From nuvem-commits-returnmitchellbarry@example.com Thu Mar 10 18:33:21 2011 Return-Path: <nuvem-commits-returnmitchellbarry@example.com> Delivered-To: mitchellbarry@example.com Received: (qmail 55953 invoked from network); 10 Mar 2011 18:33:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 10 Mar 2011 18:33:21 -0000 Received: (qmail 25290 invoked by uid 500); 10 Mar 2011 18:33:21 -0000 Delivered-To: mitchellbarry@example.com Received: (qmail 25259 invoked by uid 500); 10 Mar 2011 18:33:21 -0000 Mailing-List: contact mitchellbarry@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:mitchellbarry@example.com> List-Unsubscribe: <mailto:mitchellbarry@example.com> List-Post: <mailto:mitchellbarry@example.com> List-Id: <nuvem-commits.incubator.apache.org> Reply-To: mitchellbarry@example.com Delivered-To: mailing list mitchellbarry@example.com Received: (qmail 25252 invoked by uid 99); 10 Mar 2011 18:33:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Mar 2011 18:33:20 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Mar 2011 18:33:19 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 760C6238896F; Thu, 10 Mar 2011 18:32:57 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1080307 - in /incubator/nuvem/trunk: nuvem-google/ nuvem-standalone/ store-appengine-webapp/ store-assets/ store-catalog-appengine-webapp/ store-catalog-ibmcloud-webapp/ store-merger-appengine-webapp/ Date: Thu, 10 Mar 2011 18:32:57 -0000 To: mitchellbarry@example.com From: mitchellbarry@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <mitchellbarry@example.com> Author: sagara Date: Thu Mar 10 18:32:56 2011 New Revision: 1080307 URL: http://svn.apache.org/viewvc?rev=1080307&view=rev Log: Replaced ${pom.version} by ${project.version} as it deprecated in Maven 3.0. Modified: incubator/nuvem/trunk/nuvem-google/pom.xml incubator/nuvem/trunk/nuvem-standalone/pom.xml incubator/nuvem/trunk/store-appengine-webapp/pom.xml incubator/nuvem/trunk/store-assets/pom.xml incubator/nuvem/trunk/store-catalog-appengine-webapp/pom.xml incubator/nuvem/trunk/store-catalog-ibmcloud-webapp/pom.xml incubator/nuvem/trunk/store-merger-appengine-webapp/pom.xml Modified: incubator/nuvem/trunk/nuvem-google/pom.xml URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-google/pom.xml?rev=1080307&r1=1080306&r2=1080307&view=diff ============================================================================== --- incubator/nuvem/trunk/nuvem-google/pom.xml (original) +++ incubator/nuvem/trunk/nuvem-google/pom.xml Thu Mar 10 18:32:56 2011 @@ -35,13 +35,13 @@ <dependency> <groupId>org.apache.nuvem</groupId> <artifactId>nuvem-cloud-api</artifactId> - <version>${pom.version}</version> + <version>${project.version}</version> </dependency> <dependency> <groupId>org.apache.nuvem</groupId> <artifactId>nuvem-cloud-google-appengine-sdk</artifactId> - <version>${pom.version}</version> + <version>${project.version}</version> <type>pom</type> </dependency> Modified: incubator/nuvem/trunk/nuvem-standalone/pom.xml URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-standalone/pom.xml?rev=1080307&r1=1080306&r2=1080307&view=diff ============================================================================== --- incubator/nuvem/trunk/nuvem-standalone/pom.xml (original) +++ incubator/nuvem/trunk/nuvem-standalone/pom.xml Thu Mar 10 18:32:56 2011 @@ -35,7 +35,7 @@ <dependency> <groupId>org.apache.nuvem</groupId> <artifactId>nuvem-cloud-api</artifactId> - <version>${pom.version}</version> + <version>${project.version}</version> </dependency> <dependency> Modified: incubator/nuvem/trunk/store-appengine-webapp/pom.xml URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/store-appengine-webapp/pom.xml?rev=1080307&r1=1080306&r2=1080307&view=diff ============================================================================== --- incubator/nuvem/trunk/store-appengine-webapp/pom.xml (original) +++ incubator/nuvem/trunk/store-appengine-webapp/pom.xml Thu Mar 10 18:32:56 2011 @@ -34,25 +34,25 @@ <dependency> <groupId>org.apache.nuvem</groupId> <artifactId>store-assets</artifactId> - <version>${pom.version}</version> + <version>${project.version}</version> </dependency> <dependency> <groupId>org.apache.nuvem</groupId> <artifactId>nuvem-cloud-api</artifactId> - <version>${pom.version}</version> + <version>${project.version}</version> </dependency> <dependency> <groupId>org.apache.nuvem</groupId> <artifactId>nuvem-cloud-google</artifactId> - <version>${pom.version}</version> + <version>${project.version}</version> </dependency> <dependency> <groupId>org.apache.nuvem</groupId> <artifactId>nuvem-cloud-standalone</artifactId> - <version>${pom.version}</version> + <version>${project.version}</version> </dependency> <dependency> Modified: incubator/nuvem/trunk/store-assets/pom.xml URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/store-assets/pom.xml?rev=1080307&r1=1080306&r2=1080307&view=diff ============================================================================== --- incubator/nuvem/trunk/store-assets/pom.xml (original) +++ incubator/nuvem/trunk/store-assets/pom.xml Thu Mar 10 18:32:56 2011 @@ -36,13 +36,13 @@ <dependency> <groupId>org.apache.nuvem</groupId> <artifactId>nuvem-cloud-api</artifactId> - <version>${pom.version}</version> + <version>${project.version}</version> </dependency> <dependency> <groupId>org.apache.nuvem</groupId> <artifactId>nuvem-cloud-google</artifactId> - <version>${pom.version}</version> + <version>${project.version}</version> </dependency> <dependency> Modified: incubator/nuvem/trunk/store-catalog-appengine-webapp/pom.xml URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/store-catalog-appengine-webapp/pom.xml?rev=1080307&r1=1080306&r2=1080307&view=diff ============================================================================== --- incubator/nuvem/trunk/store-catalog-appengine-webapp/pom.xml (original) +++ incubator/nuvem/trunk/store-catalog-appengine-webapp/pom.xml Thu Mar 10 18:32:56 2011 @@ -34,19 +34,19 @@ <dependency> <groupId>org.apache.nuvem</groupId> <artifactId>store-assets</artifactId> - <version>${pom.version}</version> + <version>${project.version}</version> </dependency> <dependency> <groupId>org.apache.nuvem</groupId> <artifactId>nuvem-cloud-api</artifactId> - <version>${pom.version}</version> + <version>${project.version}</version> </dependency> <dependency> <groupId>org.apache.nuvem</groupId> <artifactId>nuvem-cloud-google</artifactId> - <version>${pom.version}</version> + <version>${project.version}</version> </dependency> <dependency> Modified: incubator/nuvem/trunk/store-catalog-ibmcloud-webapp/pom.xml URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/store-catalog-ibmcloud-webapp/pom.xml?rev=1080307&r1=1080306&r2=1080307&view=diff ============================================================================== --- incubator/nuvem/trunk/store-catalog-ibmcloud-webapp/pom.xml (original) +++ incubator/nuvem/trunk/store-catalog-ibmcloud-webapp/pom.xml Thu Mar 10 18:32:56 2011 @@ -34,7 +34,7 @@ <dependency> <groupId>org.apache.nuvem</groupId> <artifactId>store-assets</artifactId> - <version>${pom.version}</version> + <version>${project.version}</version> </dependency> <dependency> Modified: incubator/nuvem/trunk/store-merger-appengine-webapp/pom.xml URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/store-merger-appengine-webapp/pom.xml?rev=1080307&r1=1080306&r2=1080307&view=diff ============================================================================== --- incubator/nuvem/trunk/store-merger-appengine-webapp/pom.xml (original) +++ incubator/nuvem/trunk/store-merger-appengine-webapp/pom.xml Thu Mar 10 18:32:56 2011 @@ -34,19 +34,19 @@ <dependency> <groupId>org.apache.nuvem</groupId> <artifactId>store-assets</artifactId> - <version>${pom.version}</version> + <version>${project.version}</version> </dependency> <dependency> <groupId>org.apache.nuvem</groupId> <artifactId>nuvem-cloud-api</artifactId> - <version>${pom.version}</version> + <version>${project.version}</version> </dependency> <dependency> <groupId>org.apache.nuvem</groupId> <artifactId>nuvem-cloud-google</artifactId> - <version>${pom.version}</version> + <version>${project.version}</version> </dependency> <dependency> From nuvem-commits-returnmitchellbarry@example.com Sun Mar 13 19:21:24 2011 Return-Path: <nuvem-commits-returnmitchellbarry@example.com> Delivered-To: mitchellbarry@example.com Received: (qmail 61691 invoked from network); 13 Mar 2011 19:21:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 13 Mar 2011 19:21:24 -0000 Received: (qmail 56788 invoked by uid 500); 13 Mar 2011 19:21:24 -0000 Delivered-To: mitchellbarry@example.com Received: (qmail 56756 invoked by uid 500); 13 Mar 2011 19:21:24 -0000 Mailing-List: contact mitchellbarry@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:mitchellbarry@example.com> List-Unsubscribe: <mailto:mitchellbarry@example.com> List-Post: <mailto:mitchellbarry@example.com> List-Id: <nuvem-commits.incubator.apache.org> Reply-To: mitchellbarry@example.com Delivered-To: mailing list mitchellbarry@example.com Received: (qmail 56749 invoked by uid 99); 13 Mar 2011 19:21:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 Mar 2011 19:21:24 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 Mar 2011 19:21:20 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 64E1123888CF; Sun, 13 Mar 2011 19:20:57 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1081202 - in /incubator/nuvem/trunk/nuvem-parallel: nuvem/eval_.py nuvem/exec_.py test.py Date: Sun, 13 Mar 2011 19:20:57 -0000 To: mitchellbarry@example.com From: mitchellbarry@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <mitchellbarry@example.com> X-Virus-Checked: Checked by ClamAV on apache.org Author: jsdelfino Date: Sun Mar 13 19:20:57 2011 New Revision: 1081202 URL: http://svn.apache.org/viewvc?rev=1081202&view=rev Log: Add components that eval a python expression and execute a python statement. Added: incubator/nuvem/trunk/nuvem-parallel/nuvem/eval_.py incubator/nuvem/trunk/nuvem-parallel/nuvem/exec_.py Modified: incubator/nuvem/trunk/nuvem-parallel/test.py Added: incubator/nuvem/trunk/nuvem-parallel/nuvem/eval_.py URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-parallel/nuvem/eval_.py?rev=1081202&view=auto ============================================================================== --- incubator/nuvem/trunk/nuvem-parallel/nuvem/eval_.py (added) +++ incubator/nuvem/trunk/nuvem-parallel/nuvem/eval_.py Sun Mar 13 19:20:57 2011 @@ -0,0 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +def get(r, py, ref): + pye = py.get(r) + return eval(pye if isinstance(pye, basestring) else pye[1][0]) Added: incubator/nuvem/trunk/nuvem-parallel/nuvem/exec_.py URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-parallel/nuvem/exec_.py?rev=1081202&view=auto ============================================================================== --- incubator/nuvem/trunk/nuvem-parallel/nuvem/exec_.py (added) +++ incubator/nuvem/trunk/nuvem-parallel/nuvem/exec_.py Sun Mar 13 19:20:57 2011 @@ -0,0 +1,22 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +def get(r, py, ref): + val = None + pys = py.get(r) + exec(pys if isinstance(pys, basestring) else pys[1][0]) + return val Modified: incubator/nuvem/trunk/nuvem-parallel/test.py URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-parallel/test.py?rev=1081202&r1=1081201&r2=1081202&view=diff ============================================================================== --- incubator/nuvem/trunk/nuvem-parallel/test.py (original) +++ incubator/nuvem/trunk/nuvem-parallel/test.py Sun Mar 13 19:20:57 2011 @@ -67,6 +67,8 @@ from nuvem import join from nuvem import replace from nuvem import lowercase from nuvem import uppercase +from nuvem import eval_ +from nuvem import exec_ def testValues(): assert true_.get(()) == True @@ -143,6 +145,15 @@ def testText(): assert uppercase.get((), mkref('s', lambda r: 'abc')) == 'ABC' return True +def testEval(): + assert eval_.get((), mkref('py', lambda r: '1 + 2'), mkref('ref', lambda r: 4)) == 3 + assert eval_.get((), mkref('py', lambda r: 'ref.get(r) + 2'), mkref('ref', lambda r: 4)) == 6 + assert eval_.get((5,), mkref('py', lambda r: 'ref.get(r) + r[0] + 2'), mkref('ref', lambda r: 4)) == 11 + assert exec_.get((), mkref('py', lambda r: 'val = 1 + 2'), mkref('ref', lambda r: 4)) == 3 + assert exec_.get((), mkref('py', lambda r: 'val = ref.get(r) + 2'), mkref('ref', lambda r: 4)) == 6 + assert exec_.get((5,), mkref('py', lambda r: 'val = ref.get(r) + r[0] + 2'), mkref('ref', lambda r: 4)) == 11 + return True + if __name__ == '__main__': print 'Testing...' testValues() @@ -151,5 +162,6 @@ if __name__ == '__main__': testMath() testURL() testText() + testEval() print 'OK' From nuvem-commits-returnmitchellbarry@example.com Sun Mar 20 23:37:49 2011 Return-Path: <nuvem-commits-returnmitchellbarry@example.com> Delivered-To: mitchellbarry@example.com Received: (qmail 4449 invoked from network); 20 Mar 2011 23:37:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 20 Mar 2011 23:37:49 -0000 Received: (qmail 63298 invoked by uid 500); 20 Mar 2011 23:37:49 -0000 Delivered-To: mitchellbarry@example.com Received: (qmail 63273 invoked by uid 500); 20 Mar 2011 23:37:48 -0000 Mailing-List: contact mitchellbarry@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:mitchellbarry@example.com> List-Unsubscribe: <mailto:mitchellbarry@example.com> List-Post: <mailto:mitchellbarry@example.com> List-Id: <nuvem-commits.incubator.apache.org> Reply-To: mitchellbarry@example.com Delivered-To: mailing list mitchellbarry@example.com Received: (qmail 63266 invoked by uid 99); 20 Mar 2011 23:37:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 20 Mar 2011 23:37:48 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 20 Mar 2011 23:37:46 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 17F6F238899C; Sun, 20 Mar 2011 23:37:23 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1083614 - /incubator/nuvem/trunk/.gitignore Date: Sun, 20 Mar 2011 23:37:23 -0000 To: mitchellbarry@example.com From: mitchellbarry@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <mitchellbarry@example.com> X-Virus-Checked: Checked by ClamAV on apache.org Author: jsdelfino Date: Sun Mar 20 23:37:22 2011 New Revision: 1083614 URL: http://svn.apache.org/viewvc?rev=1083614&view=rev Log: Add .gitignore file to tell git to ignore build outputs. Added: incubator/nuvem/trunk/.gitignore Added: incubator/nuvem/trunk/.gitignore URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/.gitignore?rev=1083614&view=auto ============================================================================== --- incubator/nuvem/trunk/.gitignore (added) +++ incubator/nuvem/trunk/.gitignore Sun Mar 20 23:37:22 2011 @@ -0,0 +1,30 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# git-ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ + +target/ +dojo/ +classes/ +lib/ +*.pyc + From nuvem-commits-returnmitchellbarry@example.com Sun Mar 20 23:37:54 2011 Return-Path: <nuvem-commits-returnmitchellbarry@example.com> Delivered-To: mitchellbarry@example.com Received: (qmail 4501 invoked from network); 20 Mar 2011 23:37:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 20 Mar 2011 23:37:53 -0000 Received: (qmail 63362 invoked by uid 500); 20 Mar 2011 23:37:53 -0000 Delivered-To: mitchellbarry@example.com Received: (qmail 63330 invoked by uid 500); 20 Mar 2011 23:37:53 -0000 Mailing-List: contact mitchellbarry@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:mitchellbarry@example.com> List-Unsubscribe: <mailto:mitchellbarry@example.com> List-Post: <mailto:mitchellbarry@example.com> List-Id: <nuvem-commits.incubator.apache.org> Reply-To: mitchellbarry@example.com Delivered-To: mailing list mitchellbarry@example.com Received: (qmail 63323 invoked by uid 99); 20 Mar 2011 23:37:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 20 Mar 2011 23:37:53 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 20 Mar 2011 23:37:50 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 041FD2388A2C; Sun, 20 Mar 2011 23:37:27 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1083615 - in /incubator/nuvem/trunk/nuvem-parallel: nuvem/format_.py nuvem/join.py nuvem/parse.py nuvem/replace.py test.py Date: Sun, 20 Mar 2011 23:37:26 -0000 To: mitchellbarry@example.com From: mitchellbarry@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <mitchellbarry@example.com> X-Virus-Checked: Checked by ClamAV on apache.org Author: jsdelfino Date: Sun Mar 20 23:37:26 2011 New Revision: 1083615 URL: http://svn.apache.org/viewvc?rev=1083615&view=rev Log: Add components to format and parse text. Change join and replace components to support unwired references. Added: incubator/nuvem/trunk/nuvem-parallel/nuvem/format_.py incubator/nuvem/trunk/nuvem-parallel/nuvem/parse.py - copied, changed from r1083614, incubator/nuvem/trunk/nuvem-parallel/nuvem/join.py Modified: incubator/nuvem/trunk/nuvem-parallel/nuvem/join.py incubator/nuvem/trunk/nuvem-parallel/nuvem/replace.py incubator/nuvem/trunk/nuvem-parallel/test.py Added: incubator/nuvem/trunk/nuvem-parallel/nuvem/format_.py URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-parallel/nuvem/format_.py?rev=1083615&view=auto ============================================================================== --- incubator/nuvem/trunk/nuvem-parallel/nuvem/format_.py (added) +++ incubator/nuvem/trunk/nuvem-parallel/nuvem/format_.py Sun Mar 20 23:37:26 2011 @@ -0,0 +1,40 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +def get(r, f, a): + def isList(v): + if getattr(v, '__iter__', False) == False: + return False + if isinstance(v, basestring) or isinstance(v, dict): + return False + return True + + def isAssoc(v): + if not isList(v): + return False + if len(v) != 2: + return False + if isinstance(v[0], basestring) and v[0][0:1] == "'": + return True + return False + + l = a.get(r) + la = filter(lambda x: not isAssoc(x), l) + ka = dict(map(lambda x: (x[0][1:], x[1]), filter(lambda x: isAssoc(x), l))) + + return f.get(r).format(*la, **ka) + Modified: incubator/nuvem/trunk/nuvem-parallel/nuvem/join.py URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-parallel/nuvem/join.py?rev=1083615&r1=1083614&r2=1083615&view=diff ============================================================================== --- incubator/nuvem/trunk/nuvem-parallel/nuvem/join.py (original) +++ incubator/nuvem/trunk/nuvem-parallel/nuvem/join.py Sun Mar 20 23:37:26 2011 @@ -18,5 +18,6 @@ import string def get(r, sep, l): - return string.join(l.get(r), sep.get(r)) + s = sep.get(r) + return string.join(l.get(r), '' if s is None else s) Copied: incubator/nuvem/trunk/nuvem-parallel/nuvem/parse.py (from r1083614, incubator/nuvem/trunk/nuvem-parallel/nuvem/join.py) URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-parallel/nuvem/parse.py?p2=incubator/nuvem/trunk/nuvem-parallel/nuvem/parse.py&p1=incubator/nuvem/trunk/nuvem-parallel/nuvem/join.py&r1=1083614&r2=1083615&rev=1083615&view=diff ============================================================================== --- incubator/nuvem/trunk/nuvem-parallel/nuvem/join.py (original) +++ incubator/nuvem/trunk/nuvem-parallel/nuvem/parse.py Sun Mar 20 23:37:26 2011 @@ -15,8 +15,9 @@ # specific language governing permissions and limitations # under the License. -import string +import re -def get(r, sep, l): - return string.join(l.get(r), sep.get(r)) +def get(r, e, s): + m = re.search(e.get(r), s.get(r)) + return () if m is None else m.groups() Modified: incubator/nuvem/trunk/nuvem-parallel/nuvem/replace.py URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-parallel/nuvem/replace.py?rev=1083615&r1=1083614&r2=1083615&view=diff ============================================================================== --- incubator/nuvem/trunk/nuvem-parallel/nuvem/replace.py (original) +++ incubator/nuvem/trunk/nuvem-parallel/nuvem/replace.py Sun Mar 20 23:37:26 2011 @@ -16,5 +16,6 @@ # under the License. def get(r, fr, to, s): - return s.get(r).replace(fr.get(r), to.get(r)) + t = to.get(r) + return s.get(r).replace(fr.get(r), '' if t is None else t) Modified: incubator/nuvem/trunk/nuvem-parallel/test.py URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-parallel/test.py?rev=1083615&r1=1083614&r2=1083615&view=diff ============================================================================== --- incubator/nuvem/trunk/nuvem-parallel/test.py (original) +++ incubator/nuvem/trunk/nuvem-parallel/test.py Sun Mar 20 23:37:26 2011 @@ -67,6 +67,8 @@ from nuvem import join from nuvem import replace from nuvem import lowercase from nuvem import uppercase +from nuvem import format_ +from nuvem import parse from nuvem import eval_ from nuvem import exec_ @@ -140,9 +142,13 @@ def testText(): assert contains.get((), mkref('sub', lambda r: 'bc'), mkref('s', lambda r: 'abcd')) == True assert split.get((), mkref('sep', lambda r: 'x'), mkref('s', lambda r: 'abcxdef')) == ('abc', 'def') assert join.get((), mkref('sep', lambda r: 'x'), mkref('s', lambda r: ('abc', 'def'))) == 'abcxdef' + assert join.get((), mkref('sep', lambda r: None), mkref('s', lambda r: ('abc', 'def'))) == 'abcdef' assert replace.get((), mkref('from', lambda r: 'x'), mkref('to', lambda r: 'y'), mkref('s', lambda r: 'abcxdefxghi')) == 'abcydefyghi' + assert replace.get((), mkref('from', lambda r: 'x'), mkref('to', lambda r: None), mkref('s', lambda r: 'abcxdefxghi')) == 'abcdefghi' assert lowercase.get((), mkref('s', lambda r: 'ABC')) == 'abc' assert uppercase.get((), mkref('s', lambda r: 'abc')) == 'ABC' + assert format_.get((), mkref('f', lambda r: '{0} + {1} = {r}'), mkref('a', lambda r: (2, 3, ("'r", 5)))) == '2 + 3 = 5' + assert parse.get((), mkref('e', lambda r: r'(\w+) (\w+)'), mkref('s', lambda r: 'a b c')) == ('a', 'b') return True def testEval(): From nuvem-commits-returnmitchellbarry@example.com Tue Mar 22 04:56:17 2011 Return-Path: <nuvem-commits-returnmitchellbarry@example.com> Delivered-To: mitchellbarry@example.com Received: (qmail 56855 invoked from network); 22 Mar 2011 04:56:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 22 Mar 2011 04:56:17 -0000 Received: (qmail 97811 invoked by uid 500); 22 Mar 2011 04:56:17 -0000 Delivered-To: mitchellbarry@example.com Received: (qmail 97784 invoked by uid 500); 22 Mar 2011 04:56:14 -0000 Mailing-List: contact mitchellbarry@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:mitchellbarry@example.com> List-Unsubscribe: <mailto:mitchellbarry@example.com> List-Post: <mailto:mitchellbarry@example.com> List-Id: <nuvem-commits.incubator.apache.org> Reply-To: mitchellbarry@example.com Delivered-To: mailing list mitchellbarry@example.com Received: (qmail 97777 invoked by uid 99); 22 Mar 2011 04:56:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Mar 2011 04:56:12 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Mar 2011 04:56:11 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 0420D238890D; Tue, 22 Mar 2011 04:55:40 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1084068 - in /incubator/nuvem/trunk: pom.xml store-appengine-webapp/README store-appengine-webapp/pom.xml store-catalog-appengine-webapp/README store-catalog-appengine-webapp/pom.xml Date: Tue, 22 Mar 2011 04:55:39 -0000 To: mitchellbarry@example.com From: mitchellbarry@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <mitchellbarry@example.com> Author: sagara Date: Tue Mar 22 04:55:39 2011 New Revision: 1084068 URL: http://svn.apache.org/viewvc?rev=1084068&view=rev Log: Added maven-gae-plugin for appengine samples. Added: incubator/nuvem/trunk/store-appengine-webapp/README incubator/nuvem/trunk/store-catalog-appengine-webapp/README Modified: incubator/nuvem/trunk/pom.xml incubator/nuvem/trunk/store-appengine-webapp/pom.xml incubator/nuvem/trunk/store-catalog-appengine-webapp/pom.xml Modified: incubator/nuvem/trunk/pom.xml URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/pom.xml?rev=1084068&r1=1084067&r2=1084068&view=diff ============================================================================== --- incubator/nuvem/trunk/pom.xml (original) +++ incubator/nuvem/trunk/pom.xml Tue Mar 22 04:55:39 2011 @@ -90,6 +90,9 @@ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <tuscany.version>2.0-M5.1</tuscany.version> + <maven.gae.plugin.version>0.8.2</maven.gae.plugin.version> + <gae.version>1.4.2</gae.version> + <datanucleus.version>1.1.5</datanucleus.version> </properties> Added: incubator/nuvem/trunk/store-appengine-webapp/README URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/store-appengine-webapp/README?rev=1084068&view=auto ============================================================================== --- incubator/nuvem/trunk/store-appengine-webapp/README (added) +++ incubator/nuvem/trunk/store-appengine-webapp/README Tue Mar 22 04:55:39 2011 @@ -0,0 +1,11 @@ +Steps to run with Maven + + 1.) "mvn gae:unpack " to unpack appengine SDK. + + 2.) "mvn gae:run" to run the application locally. You can access application using http://localhost:8080/ url. + + 3.) Change the application name in the "appengine-web.xml" file located in store-appengine-webapp/war/WEB-INF directory. + + e.g - <application>yournamedemo1</application> + + 4.) "mvn gae:update" to upload the application. Modified: incubator/nuvem/trunk/store-appengine-webapp/pom.xml URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/store-appengine-webapp/pom.xml?rev=1084068&r1=1084067&r2=1084068&view=diff ============================================================================== --- incubator/nuvem/trunk/store-appengine-webapp/pom.xml (original) +++ incubator/nuvem/trunk/store-appengine-webapp/pom.xml Tue Mar 22 04:55:39 2011 @@ -217,6 +217,24 @@ <warSourceDirectory>war</warSourceDirectory> </configuration> </plugin> + + <!-- + The maven-gae-plugin. Type "mvn gae:run" to run project, "mvn + gae:deploy" to upload to GAE. + --> + <plugin> + <groupId>net.kindleit</groupId> + <artifactId>maven-gae-plugin</artifactId> + <version>${maven.gae.plugin.version}</version> + <dependencies> + <dependency> + <groupId>net.kindleit</groupId> + <artifactId>gae-runtime</artifactId> + <version>${gae.version}</version> + <type>pom</type> + </dependency> + </dependencies> + </plugin> </plugins> </build> </project> Added: incubator/nuvem/trunk/store-catalog-appengine-webapp/README URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/store-catalog-appengine-webapp/README?rev=1084068&view=auto ============================================================================== --- incubator/nuvem/trunk/store-catalog-appengine-webapp/README (added) +++ incubator/nuvem/trunk/store-catalog-appengine-webapp/README Tue Mar 22 04:55:39 2011 @@ -0,0 +1,11 @@ +Steps to run with Maven + + 1.) "mvn gae:unpack " to unpack appengine SDK. + + 2.) "mvn gae:run" to run the application locally. You can access application using http://localhost:8080/ url. + + 3.) Change the application name in the "appengine-web.xml" file located in store-appengine-webapp/war/WEB-INF directory. + + e.g - <application>yournamedemo1</application> + + 4.) "mvn gae:update" to upload the application. Modified: incubator/nuvem/trunk/store-catalog-appengine-webapp/pom.xml URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/store-catalog-appengine-webapp/pom.xml?rev=1084068&r1=1084067&r2=1084068&view=diff ============================================================================== --- incubator/nuvem/trunk/store-catalog-appengine-webapp/pom.xml (original) +++ incubator/nuvem/trunk/store-catalog-appengine-webapp/pom.xml Tue Mar 22 04:55:39 2011 @@ -153,6 +153,24 @@ <warSourceDirectory>war</warSourceDirectory> </configuration> </plugin> + + <!-- + The maven-gae-plugin. Type "mvn gae:run" to run project, "mvn + gae:deploy" to upload to GAE. + --> + <plugin> + <groupId>net.kindleit</groupId> + <artifactId>maven-gae-plugin</artifactId> + <version>${maven.gae.plugin.version}</version> + <dependencies> + <dependency> + <groupId>net.kindleit</groupId> + <artifactId>gae-runtime</artifactId> + <version>${gae.version}</version> + <type>pom</type> + </dependency> + </dependencies> + </plugin> </plugins> </build> From nuvem-commits-returnmitchellbarry@example.com Tue Mar 22 05:25:23 2011 Return-Path: <nuvem-commits-returnmitchellbarry@example.com> Delivered-To: mitchellbarry@example.com Received: (qmail 56349 invoked from network); 22 Mar 2011 05:25:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 22 Mar 2011 05:25:23 -0000 Received: (qmail 7928 invoked by uid 500); 22 Mar 2011 05:25:23 -0000 Delivered-To: mitchellbarry@example.com Received: (qmail 7889 invoked by uid 500); 22 Mar 2011 05:25:21 -0000 Mailing-List: contact mitchellbarry@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:mitchellbarry@example.com> List-Unsubscribe: <mailto:mitchellbarry@example.com> List-Post: <mailto:mitchellbarry@example.com> List-Id: <nuvem-commits.incubator.apache.org> Reply-To: mitchellbarry@example.com Delivered-To: mailing list mitchellbarry@example.com Received: (qmail 7881 invoked by uid 99); 22 Mar 2011 05:25:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Mar 2011 05:25:20 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Mar 2011 05:25:19 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 1103A2388906; Tue, 22 Mar 2011 05:24:48 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1084069 - in /incubator/nuvem/trunk: nuvem-parallel/pom.xml pom.xml Date: Tue, 22 Mar 2011 05:24:48 -0000 To: mitchellbarry@example.com From: mitchellbarry@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <mitchellbarry@example.com> Author: sagara Date: Tue Mar 22 05:24:47 2011 New Revision: 1084069 URL: http://svn.apache.org/viewvc?rev=1084069&view=rev Log: Added exec-maven-plugin to run Python tests. Added: incubator/nuvem/trunk/nuvem-parallel/pom.xml Modified: incubator/nuvem/trunk/pom.xml Added: incubator/nuvem/trunk/nuvem-parallel/pom.xml URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-parallel/pom.xml?rev=1084069&view=auto ============================================================================== --- incubator/nuvem/trunk/nuvem-parallel/pom.xml (added) +++ incubator/nuvem/trunk/nuvem-parallel/pom.xml Tue Mar 22 05:24:47 2011 @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.apache.nuvem</groupId> + <artifactId>nuvem</artifactId> + <version>1.0-incubating-SNAPSHOT</version> + <relativePath>../pom.xml</relativePath> + </parent> + <artifactId>nuvem-parallel</artifactId> + <version>1.0-incubating-SNAPSHOT</version> + <name>Apache Nuvem Cloud Parallel Components</name> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-eclipse-plugin</artifactId> + <configuration> + <excludes> + <exclude>com.google.appengine:appengine-tools</exclude> + <exclude>com.google.appengine:appengine-api</exclude> + <exclude>com.google.appengine:appengine-local-runtime-shared</exclude> + </excludes> + <classpathContainers> + <classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER</classpathContainer> + <classpathContainer>com.google.appengine.eclipse.core.GAE_CONTAINER</classpathContainer> + </classpathContainers> + </configuration> + </plugin> + + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>exec-maven-plugin</artifactId> + <executions> + <execution> + <configuration> + <executable>python</executable> + <workingDirectory>.</workingDirectory> + <arguments> + <argument>test.py</argument> + </arguments> + <environmentVariables> + <!--<PYTHONPATH></PYTHONPATH> --> + </environmentVariables> + </configuration> + <id>python-test</id> + <phase>test</phase> + <goals> + <goal>exec</goal> + </goals> + </execution> + </executions> + </plugin> + + </plugins> + </build> + +</project> + Modified: incubator/nuvem/trunk/pom.xml URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/pom.xml?rev=1084069&r1=1084068&r2=1084069&view=diff ============================================================================== --- incubator/nuvem/trunk/pom.xml (original) +++ incubator/nuvem/trunk/pom.xml Tue Mar 22 05:24:47 2011 @@ -194,6 +194,7 @@ <module>nuvem-google</module> <module>nuvem-google-appengine-sdk</module> <module>nuvem-standalone</module> + <module>nuvem-parallel</module> <!-- Store Scenario --> <module>store-assets</module> <module>store-appengine-webapp</module> From nuvem-commits-returnmitchellbarry@example.com Sun Mar 27 00:02:55 2011 Return-Path: <nuvem-commits-returnmitchellbarry@example.com> Delivered-To: mitchellbarry@example.com Received: (qmail 43899 invoked from network); 27 Mar 2011 00:02:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 27 Mar 2011 00:02:55 -0000 Received: (qmail 97774 invoked by uid 500); 27 Mar 2011 00:02:55 -0000 Delivered-To: mitchellbarry@example.com Received: (qmail 97747 invoked by uid 500); 27 Mar 2011 00:02:55 -0000 Mailing-List: contact mitchellbarry@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:mitchellbarry@example.com> List-Unsubscribe: <mailto:mitchellbarry@example.com> List-Post: <mailto:mitchellbarry@example.com> List-Id: <nuvem-commits.incubator.apache.org> Reply-To: mitchellbarry@example.com Delivered-To: mailing list mitchellbarry@example.com Received: (qmail 97740 invoked by uid 99); 27 Mar 2011 00:02:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 27 Mar 2011 00:02:55 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 27 Mar 2011 00:02:52 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 2F0D623888FD; Sun, 27 Mar 2011 00:02:31 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1085834 - /incubator/nuvem/trunk/nuvem-parallel/nuvem/path.py Date: Sun, 27 Mar 2011 00:02:31 -0000 To: mitchellbarry@example.com From: mitchellbarry@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <mitchellbarry@example.com> X-Virus-Checked: Checked by ClamAV on apache.org Author: jsdelfino Date: Sun Mar 27 00:02:30 2011 New Revision: 1085834 URL: http://svn.apache.org/viewvc?rev=1085834&view=rev Log: Exclude /components/comp-name prefix from path returned by the path component. Modified: incubator/nuvem/trunk/nuvem-parallel/nuvem/path.py Modified: incubator/nuvem/trunk/nuvem-parallel/nuvem/path.py URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-parallel/nuvem/path.py?rev=1085834&r1=1085833&r2=1085834&view=diff ============================================================================== --- incubator/nuvem/trunk/nuvem-parallel/nuvem/path.py (original) +++ incubator/nuvem/trunk/nuvem-parallel/nuvem/path.py Sun Mar 27 00:02:30 2011 @@ -16,5 +16,6 @@ # under the License. def get(r, prop): - return prop.eval() + p = prop.eval() + return p[2:] if p[0:1] == ('components',) else p From nuvem-commits-returnmitchellbarry@example.com Sun Mar 27 00:03:00 2011 Return-Path: <nuvem-commits-returnmitchellbarry@example.com> Delivered-To: mitchellbarry@example.com Received: (qmail 44745 invoked from network); 27 Mar 2011 00:03:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 27 Mar 2011 00:03:00 -0000 Received: (qmail 97837 invoked by uid 500); 27 Mar 2011 00:03:00 -0000 Delivered-To: mitchellbarry@example.com Received: (qmail 97805 invoked by uid 500); 27 Mar 2011 00:03:00 -0000 Mailing-List: contact mitchellbarry@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:mitchellbarry@example.com> List-Unsubscribe: <mailto:mitchellbarry@example.com> List-Post: <mailto:mitchellbarry@example.com> List-Id: <nuvem-commits.incubator.apache.org> Reply-To: mitchellbarry@example.com Delivered-To: mailing list mitchellbarry@example.com Received: (qmail 97797 invoked by uid 99); 27 Mar 2011 00:03:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 27 Mar 2011 00:03:00 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 27 Mar 2011 00:02:57 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id F05A723889B9; Sun, 27 Mar 2011 00:02:34 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1085835 - in /incubator/nuvem/trunk/nuvem-parallel/nuvem: fbalbums.py fbfriends.py fbgroups.py twfollowers.py twfriends.py twtimeline.py Date: Sun, 27 Mar 2011 00:02:34 -0000 To: mitchellbarry@example.com From: mitchellbarry@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <mitchellbarry@example.com> X-Virus-Checked: Checked by ClamAV on apache.org Author: jsdelfino Date: Sun Mar 27 00:02:34 2011 New Revision: 1085835 URL: http://svn.apache.org/viewvc?rev=1085835&view=rev Log: Add a few components to help work with social APIs. Added: incubator/nuvem/trunk/nuvem-parallel/nuvem/fbalbums.py incubator/nuvem/trunk/nuvem-parallel/nuvem/fbfriends.py incubator/nuvem/trunk/nuvem-parallel/nuvem/fbgroups.py incubator/nuvem/trunk/nuvem-parallel/nuvem/twfollowers.py incubator/nuvem/trunk/nuvem-parallel/nuvem/twfriends.py incubator/nuvem/trunk/nuvem-parallel/nuvem/twtimeline.py Added: incubator/nuvem/trunk/nuvem-parallel/nuvem/fbalbums.py URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-parallel/nuvem/fbalbums.py?rev=1085835&view=auto ============================================================================== --- incubator/nuvem/trunk/nuvem-parallel/nuvem/fbalbums.py (added) +++ incubator/nuvem/trunk/nuvem-parallel/nuvem/fbalbums.py Sun Mar 27 00:02:34 2011 @@ -0,0 +1,21 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +def get(r, fbid, fb): + fid = fbid.get(r) + return fb.get((fid, 'albums')) + Added: incubator/nuvem/trunk/nuvem-parallel/nuvem/fbfriends.py URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-parallel/nuvem/fbfriends.py?rev=1085835&view=auto ============================================================================== --- incubator/nuvem/trunk/nuvem-parallel/nuvem/fbfriends.py (added) +++ incubator/nuvem/trunk/nuvem-parallel/nuvem/fbfriends.py Sun Mar 27 00:02:34 2011 @@ -0,0 +1,21 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +def get(r, fbid, fb): + fid = fbid.get(r) + return fb.get((fid, 'friends')) + Added: incubator/nuvem/trunk/nuvem-parallel/nuvem/fbgroups.py URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-parallel/nuvem/fbgroups.py?rev=1085835&view=auto ============================================================================== --- incubator/nuvem/trunk/nuvem-parallel/nuvem/fbgroups.py (added) +++ incubator/nuvem/trunk/nuvem-parallel/nuvem/fbgroups.py Sun Mar 27 00:02:34 2011 @@ -0,0 +1,21 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +def get(r, fbid, fb): + fid = fbid.get(r) + return fb.get((fid, 'groups')) + Added: incubator/nuvem/trunk/nuvem-parallel/nuvem/twfollowers.py URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-parallel/nuvem/twfollowers.py?rev=1085835&view=auto ============================================================================== --- incubator/nuvem/trunk/nuvem-parallel/nuvem/twfollowers.py (added) +++ incubator/nuvem/trunk/nuvem-parallel/nuvem/twfollowers.py Sun Mar 27 00:02:34 2011 @@ -0,0 +1,21 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +def get(r, twid, tw): + tid = twid.get(r) + return tw.get((("'screen_name", tid),)) + Added: incubator/nuvem/trunk/nuvem-parallel/nuvem/twfriends.py URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-parallel/nuvem/twfriends.py?rev=1085835&view=auto ============================================================================== --- incubator/nuvem/trunk/nuvem-parallel/nuvem/twfriends.py (added) +++ incubator/nuvem/trunk/nuvem-parallel/nuvem/twfriends.py Sun Mar 27 00:02:34 2011 @@ -0,0 +1,21 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +def get(r, twid, tw): + tid = twid.get(r) + return tw.get((("'screen_name", tid),)) + Added: incubator/nuvem/trunk/nuvem-parallel/nuvem/twtimeline.py URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-parallel/nuvem/twtimeline.py?rev=1085835&view=auto ============================================================================== --- incubator/nuvem/trunk/nuvem-parallel/nuvem/twtimeline.py (added) +++ incubator/nuvem/trunk/nuvem-parallel/nuvem/twtimeline.py Sun Mar 27 00:02:34 2011 @@ -0,0 +1,21 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +def get(r, twid, tw): + tid = twid.get(r) + return tw.get((("'screen_name", tid),)) + From nuvem-commits-returnmitchellbarry@example.com Sun Mar 27 00:03:03 2011 Return-Path: <nuvem-commits-returnmitchellbarry@example.com> Delivered-To: mitchellbarry@example.com Received: (qmail 45083 invoked from network); 27 Mar 2011 00:03:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 27 Mar 2011 00:03:02 -0000 Received: (qmail 97893 invoked by uid 500); 27 Mar 2011 00:03:02 -0000 Delivered-To: mitchellbarry@example.com Received: (qmail 97860 invoked by uid 500); 27 Mar 2011 00:03:02 -0000 Mailing-List: contact mitchellbarry@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:mitchellbarry@example.com> List-Unsubscribe: <mailto:mitchellbarry@example.com> List-Post: <mailto:mitchellbarry@example.com> List-Id: <nuvem-commits.incubator.apache.org> Reply-To: mitchellbarry@example.com Delivered-To: mailing list mitchellbarry@example.com Received: (qmail 97853 invoked by uid 99); 27 Mar 2011 00:03:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 27 Mar 2011 00:03:02 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 27 Mar 2011 00:03:00 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 0DF912388A36; Sun, 27 Mar 2011 00:02:38 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1085836 - in /incubator/nuvem/trunk/nuvem-parallel/nuvem: button.py every.py location.py Date: Sun, 27 Mar 2011 00:02:38 -0000 To: mitchellbarry@example.com From: mitchellbarry@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <mitchellbarry@example.com> X-Virus-Checked: Checked by ClamAV on apache.org Author: jsdelfino Date: Sun Mar 27 00:02:37 2011 New Revision: 1085836 URL: http://svn.apache.org/viewvc?rev=1085836&view=rev Log: Add components to help apps handle user interactions, timer and location change events. Added: incubator/nuvem/trunk/nuvem-parallel/nuvem/button.py incubator/nuvem/trunk/nuvem-parallel/nuvem/every.py incubator/nuvem/trunk/nuvem-parallel/nuvem/location.py Added: incubator/nuvem/trunk/nuvem-parallel/nuvem/button.py URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-parallel/nuvem/button.py?rev=1085836&view=auto ============================================================================== --- incubator/nuvem/trunk/nuvem-parallel/nuvem/button.py (added) +++ incubator/nuvem/trunk/nuvem-parallel/nuvem/button.py Sun Mar 27 00:02:37 2011 @@ -0,0 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +def get(r, content): + return content.get(r) + Added: incubator/nuvem/trunk/nuvem-parallel/nuvem/every.py URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-parallel/nuvem/every.py?rev=1085836&view=auto ============================================================================== --- incubator/nuvem/trunk/nuvem-parallel/nuvem/every.py (added) +++ incubator/nuvem/trunk/nuvem-parallel/nuvem/every.py Sun Mar 27 00:02:37 2011 @@ -0,0 +1,26 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +def get(r, sec, content): + if r[0:1] == ('setup',): + s = sec.get(r) + if s is None or s == 0: + return '' + return 'setupIntervalHandler(' + str(int(s)) + ');' + + return content.get(r) + Added: incubator/nuvem/trunk/nuvem-parallel/nuvem/location.py URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-parallel/nuvem/location.py?rev=1085836&view=auto ============================================================================== --- incubator/nuvem/trunk/nuvem-parallel/nuvem/location.py (added) +++ incubator/nuvem/trunk/nuvem-parallel/nuvem/location.py Sun Mar 27 00:02:37 2011 @@ -0,0 +1,23 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +def get(r, content): + if r[0:1] == ('setup',): + return 'setupLocationHandler();' + + return content.get(r) + From nuvem-commits-returnmitchellbarry@example.com Mon Mar 28 20:36:06 2011 Return-Path: <nuvem-commits-returnmitchellbarry@example.com> Delivered-To: mitchellbarry@example.com Received: (qmail 46674 invoked from network); 28 Mar 2011 20:36:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 28 Mar 2011 20:36:05 -0000 Received: (qmail 51242 invoked by uid 500); 28 Mar 2011 20:36:05 -0000 Delivered-To: mitchellbarry@example.com Received: (qmail 51208 invoked by uid 500); 28 Mar 2011 20:36:05 -0000 Mailing-List: contact mitchellbarry@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:mitchellbarry@example.com> List-Unsubscribe: <mailto:mitchellbarry@example.com> List-Post: <mailto:mitchellbarry@example.com> List-Id: <nuvem-commits.incubator.apache.org> Reply-To: mitchellbarry@example.com Delivered-To: mailing list mitchellbarry@example.com Received: (qmail 51201 invoked by uid 99); 28 Mar 2011 20:36:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Mar 2011 20:36:05 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Mar 2011 20:36:02 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id B6ECD23889B2; Mon, 28 Mar 2011 20:35:42 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1086391 - in /incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp: api/ common/ Date: Mon, 28 Mar 2011 20:35:42 -0000 To: mitchellbarry@example.com From: mitchellbarry@example.com X-Mailer: svnmailer-1.0.8 Message-Id: <mitchellbarry@example.com> Author: johnp Date: Mon Mar 28 20:35:42 2011 New Revision: 1086391 URL: http://svn.apache.org/viewvc?rev=1086391&view=rev Log: Added necessary javadocs and refactored the code to provide a XMPPConnector implementation to the XMPPEndPoint which will abstract the process of establishing connection to the XMPPServer so that there could be different strategies later. Added: incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/api/XMPPConnectException.java incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/api/XMPPConnector.java incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/api/XMPPServer.java Modified: incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/api/JID.java incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/api/MessageListener.java incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/api/PayLoad.java incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/api/Status.java incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/api/XMPPEndPoint.java incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/common/AbstractXMPPEndPoint.java Modified: incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/api/JID.java URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/api/JID.java?rev=1086391&r1=1086390&r2=1086391&view=diff ============================================================================== --- incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/api/JID.java (original) +++ incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/api/JID.java Mon Mar 28 20:35:42 2011 @@ -129,7 +129,7 @@ public final class JID implements Serial } /** - * . + * returns true if the passed JID is same as this JID. */ public boolean equals(Object o) { if (this == o) Modified: incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/api/MessageListener.java URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/api/MessageListener.java?rev=1086391&r1=1086390&r2=1086391&view=diff ============================================================================== --- incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/api/MessageListener.java (original) +++ incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/api/MessageListener.java Mon Mar 28 20:35:42 2011 @@ -23,19 +23,27 @@ import org.apache.nuvem.cloud.xmpp.commo /** * Listens to XMPP messages of a specific type. + * <p> + * In order to receive messages from a particular JID, an implementation of + * <code>MessageListener</code> should be registered with the + * {@link XMPPEndPoint} using the API + * {@link XMPPEndPoint#registerListner(JID, MessageListener)}. + * </p> */ public interface MessageListener { - /** - * To be used as default one. - */ - public static final MessageListener LOGGING_LISTENER = new LoggingMessageListener(); + /** + * To be used as default one. + */ + public static final MessageListener LOGGING_LISTENER = new LoggingMessageListener(); - /** - * Listens for messages. - * - * @param message - */ - void listen(Message message); + /** + * This method will be called when a message is received by the XMPP + * endpoint for a specific {@link JID} this listener is registred for. + * + * @param message + * @see org.apache.nuvem.cloud.xmpp.XMPPEndPoint + */ + void listen(Message message); } Modified: incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/api/PayLoad.java URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/api/PayLoad.java?rev=1086391&r1=1086390&r2=1086391&view=diff ============================================================================== --- incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/api/PayLoad.java (original) +++ incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/api/PayLoad.java Mon Mar 28 20:35:42 2011 @@ -23,13 +23,12 @@ package org.apache.nuvem.cloud.xmpp.api; import java.util.Locale; /** - * The actual payload (can be considered to represent XMPP Stream) that will be - * carried through the XMPP channel. + * The Container to hold the actual data and all related attributes about the data which are required for XMPP Protocol. */ public final class PayLoad { /** - * usage instead of null. + * To be used instead of null. */ public static final PayLoad EMPTY = new PayLoad("Empty Content"); Modified: incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/api/Status.java URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/api/Status.java?rev=1086391&r1=1086390&r2=1086391&view=diff ============================================================================== --- incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/api/Status.java (original) +++ incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/api/Status.java Mon Mar 28 20:35:42 2011 @@ -24,11 +24,14 @@ import java.util.ArrayList; import java.util.List; /** - * The status of sending a message to indicate whether was message was sent to - * the recipient successfully or was there any error. + * The status to indicate whether the message was sent to + * the recipient successfully or was there any error during the process. */ public final class Status { + /** + * List of errors that occurred during the XMPP interaction with the server.. + */ private List<Error> errors = new ArrayList<Error>(); public Status(List<Error> errors) { @@ -49,6 +52,10 @@ public final class Status { this.errors.add(error); } + /** + * Returns true if the status implies that there was an internal error during message transmission. + * @return + */ public boolean hasErrors() { return errors != null && errors.size() > 0; } Added: incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/api/XMPPConnectException.java URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/api/XMPPConnectException.java?rev=1086391&view=auto ============================================================================== --- incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/api/XMPPConnectException.java (added) +++ incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/api/XMPPConnectException.java Mon Mar 28 20:35:42 2011 @@ -0,0 +1,53 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.nuvem.cloud.xmpp.api; + +/** + * Signals an error during an attempt to connect to an XMPP Server. + * + */ +public class XMPPConnectException extends RuntimeException { + + /** + * serial id. + */ + private static final long serialVersionUID = 4874219100692016046L; + + /** + * Default constructor. + */ + public XMPPConnectException() { + + } + + /** + * Constructor with message as argument + * + * @param message + */ + public XMPPConnectException(String message) { + super(message); + } + + public XMPPConnectException(String message, Throwable t) { + super(message, t); + } +} Added: incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/api/XMPPConnector.java URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/api/XMPPConnector.java?rev=1086391&view=auto ============================================================================== --- incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/api/XMPPConnector.java (added) +++ incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/api/XMPPConnector.java Mon Mar 28 20:35:42 2011 @@ -0,0 +1,60 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.nuvem.cloud.xmpp.api; + +import java.util.Map; + +/** + * Represents a connection strategy. Each implementation of this interface will be a specific + * strategy to establish connection to the XMPP Server. + * + * @param <T> - type of the connection this connector uses, will be platform specific. + */ +public interface XMPPConnector<T> { + + /** + * Attempts to connect to the XMPPServer by using the connection properties injected into the implementation class. + * + * + * @throws XMPPConnectException + * if any error during connection setup. + */ + T connect() throws XMPPConnectException; + + /** + * Connects to the XMPPServer by making use of the connection configuration + * values passed as parameters. It is expected that the various + * implementations will have a default connection configuration parameters + * injected as properties which will be used for establishing connections + * with the XMPP server. however, if you would like to override a specific + * set of connection configuration values, then only those properties can be + * passed in a map which will be considered during connection establishment. + * + * @param connectionProperties + */ + T connect(Map<String, String> connectionProperties); + + /** + * Returns the description of the connector. + * @return the description. + */ + String getDescription(); +} Modified: incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/api/XMPPEndPoint.java URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/api/XMPPEndPoint.java?rev=1086391&r1=1086390&r2=1086391&view=diff ============================================================================== --- incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/api/XMPPEndPoint.java (original) +++ incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/api/XMPPEndPoint.java Mon Mar 28 20:35:42 2011 @@ -24,99 +24,110 @@ package org.apache.nuvem.cloud.xmpp.api; * Represents An EndPoint for client to send and receive XMPP messages. * <p> * The implementations of <code>XMPPEndPoint</code> are specific to each cloud - * platform. + * platform like GAE, EC2 etc. * </p> + * Some platforms like GAE doesn't require you to specify connection properties + * for connecting to an XMPP Server but other platforms doesn't provide any + * explicit APIs for XMPP and hence you should ensure that your XMPP server is + * up and running. you should also inject the necessary connection properties to + * the platform specific implementation classes of the interface + * {@link XMPPEndPoint}. + * + * */ public interface XMPPEndPoint { - boolean isConnected(); - - /** - * Returns a unique id of this endpoint. - * - * @return the unique id. - */ - String uniqueID(); - - /** - * Sends the message to a target JID enclosed inside the - * <code>Message</code>. - * - * @param message - the message that needs to be delivered to a target - * JID/Node. - * @return A response object which holds the status of the delivery of - * message. - * @see org.apache.nuvem.cloud.xmpp.api.Message - */ - Status sendMessage(Message message); - - /** - * Sends a text message to a recipient, this is a simplified version for - * sending message compared to {@link #sendMessage(Message)} where you need - * to build the message using the {@link MessageBuilder} - * - * @param content - the text content to be sent to recipient. - * @param recipient - the recipient - * @return status of the message delivery - */ - Status sendMessage(String content, String recipient); - - /** - * Registers a <code>MessageListener</code> to listen to messages sent by a - * particular JID which is also passed as argument to this API. - * <p> - * </p> - * - * @param jid - the JID for which a message listener is bound. - * @param listener - will recieve messages sent by a client/node identified - * by the JID passed as the first argument. - */ - void registerListner(JID jid, MessageListener listener); - - /** - * Clears the listener for the specified JID. - * - * @param jid the JID for which the listener will be removed which means the - * messages from the particular JID will be lost! - * @return true if listener removed, false otherwise. - */ - boolean clearListenersFor(JID jid); - - /** - * Clears all the listeners. - */ - void clearAllListeners(); - - /** - * Finds the presence of a particular recipient. - * - * @param jid - * @return - */ - boolean isPresent(JID jid); - - /** - * Simplified version of {@link #isPresent(JID)} - * - * @param
{'source': 'Apache Software Foundation Public Mail Archives'}