You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by fm...@apache.org on 2011/07/27 17:45:24 UTC

svn commit: r1151507 - in /tuscany/sca-java-2.x/trunk/samples/learning-more: binding-comet/autocomplete-webapp/src/main/java/org/apache/tuscany/sca/sample/comet/ binding-comet/autocomplete-webapp/src/main/resources/ binding-websocket/autocomplete-webap...

Author: fmoga
Date: Wed Jul 27 15:45:24 2011
New Revision: 1151507

URL: http://svn.apache.org/viewvc?rev=1151507&view=rev
Log:
Add license info in plain text files and update sample logic not to process comments.

Modified:
    tuscany/sca-java-2.x/trunk/samples/learning-more/binding-comet/autocomplete-webapp/src/main/java/org/apache/tuscany/sca/sample/comet/CountryRepositoryImpl.java
    tuscany/sca-java-2.x/trunk/samples/learning-more/binding-comet/autocomplete-webapp/src/main/resources/countries.txt
    tuscany/sca-java-2.x/trunk/samples/learning-more/binding-websocket/autocomplete-webapp/src/main/java/sample/CountryRepositoryImpl.java
    tuscany/sca-java-2.x/trunk/samples/learning-more/binding-websocket/autocomplete-webapp/src/main/resources/countries.txt

Modified: tuscany/sca-java-2.x/trunk/samples/learning-more/binding-comet/autocomplete-webapp/src/main/java/org/apache/tuscany/sca/sample/comet/CountryRepositoryImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/learning-more/binding-comet/autocomplete-webapp/src/main/java/org/apache/tuscany/sca/sample/comet/CountryRepositoryImpl.java?rev=1151507&r1=1151506&r2=1151507&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/samples/learning-more/binding-comet/autocomplete-webapp/src/main/java/org/apache/tuscany/sca/sample/comet/CountryRepositoryImpl.java (original)
+++ tuscany/sca-java-2.x/trunk/samples/learning-more/binding-comet/autocomplete-webapp/src/main/java/org/apache/tuscany/sca/sample/comet/CountryRepositoryImpl.java Wed Jul 27 15:45:24 2011
@@ -53,9 +53,11 @@ public class CountryRepositoryImpl imple
                     .getResourceAsStream(fileName)));
             String line;
             while ((line = reader.readLine()) != null) {
-                Country c = new Country();
-                c.setName(line);
-                countries.add(c);
+                if (!line.startsWith("#")) {
+                    Country c = new Country();
+                    c.setName(line);
+                    countries.add(c);
+                }
             }
         } catch (FileNotFoundException e) {
             e.printStackTrace();

Modified: tuscany/sca-java-2.x/trunk/samples/learning-more/binding-comet/autocomplete-webapp/src/main/resources/countries.txt
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/learning-more/binding-comet/autocomplete-webapp/src/main/resources/countries.txt?rev=1151507&r1=1151506&r2=1151507&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/samples/learning-more/binding-comet/autocomplete-webapp/src/main/resources/countries.txt (original)
+++ tuscany/sca-java-2.x/trunk/samples/learning-more/binding-comet/autocomplete-webapp/src/main/resources/countries.txt Wed Jul 27 15:45:24 2011
@@ -1,3 +1,19 @@
+# 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.
 Afghanistan
 Albania
 Algeria

Modified: tuscany/sca-java-2.x/trunk/samples/learning-more/binding-websocket/autocomplete-webapp/src/main/java/sample/CountryRepositoryImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/learning-more/binding-websocket/autocomplete-webapp/src/main/java/sample/CountryRepositoryImpl.java?rev=1151507&r1=1151506&r2=1151507&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/samples/learning-more/binding-websocket/autocomplete-webapp/src/main/java/sample/CountryRepositoryImpl.java (original)
+++ tuscany/sca-java-2.x/trunk/samples/learning-more/binding-websocket/autocomplete-webapp/src/main/java/sample/CountryRepositoryImpl.java Wed Jul 27 15:45:24 2011
@@ -53,9 +53,11 @@ public class CountryRepositoryImpl imple
                     .getResourceAsStream(fileName)));
             String line;
             while ((line = reader.readLine()) != null) {
-                Country c = new Country();
-                c.setName(line);
-                countries.add(c);
+                if (!line.startsWith("#")) {
+                    Country c = new Country();
+                    c.setName(line);
+                    countries.add(c);
+                }
             }
         } catch (FileNotFoundException e) {
             e.printStackTrace();

Modified: tuscany/sca-java-2.x/trunk/samples/learning-more/binding-websocket/autocomplete-webapp/src/main/resources/countries.txt
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/learning-more/binding-websocket/autocomplete-webapp/src/main/resources/countries.txt?rev=1151507&r1=1151506&r2=1151507&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/samples/learning-more/binding-websocket/autocomplete-webapp/src/main/resources/countries.txt (original)
+++ tuscany/sca-java-2.x/trunk/samples/learning-more/binding-websocket/autocomplete-webapp/src/main/resources/countries.txt Wed Jul 27 15:45:24 2011
@@ -1,3 +1,19 @@
+# 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.
 Afghanistan
 Albania
 Algeria