From 00abc80dcd81d642fd5d3473ea0f536f05aa53d9 Mon Sep 17 00:00:00 2001 From: fmoga Date: Wed, 27 Jul 2011 15:45:24 +0000 Subject: Add license info in plain text files and update sample logic not to process comments. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1151507 13f79535-47bb-0310-9956-ffa450edef68 --- .../tuscany/sca/sample/comet/CountryRepositoryImpl.java | 8 +++++--- .../autocomplete-webapp/src/main/resources/countries.txt | 16 ++++++++++++++++ .../src/main/java/sample/CountryRepositoryImpl.java | 8 +++++--- .../autocomplete-webapp/src/main/resources/countries.txt | 16 ++++++++++++++++ 4 files changed, 42 insertions(+), 6 deletions(-) (limited to 'sca-java-2.x/trunk/samples') diff --git a/sca-java-2.x/trunk/samples/learning-more/binding-comet/autocomplete-webapp/src/main/java/org/apache/tuscany/sca/sample/comet/CountryRepositoryImpl.java b/sca-java-2.x/trunk/samples/learning-more/binding-comet/autocomplete-webapp/src/main/java/org/apache/tuscany/sca/sample/comet/CountryRepositoryImpl.java index 8be65c9147..57e2d3e214 100644 --- a/sca-java-2.x/trunk/samples/learning-more/binding-comet/autocomplete-webapp/src/main/java/org/apache/tuscany/sca/sample/comet/CountryRepositoryImpl.java +++ b/sca-java-2.x/trunk/samples/learning-more/binding-comet/autocomplete-webapp/src/main/java/org/apache/tuscany/sca/sample/comet/CountryRepositoryImpl.java @@ -53,9 +53,11 @@ public class CountryRepositoryImpl implements CountryRepository { .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(); diff --git a/sca-java-2.x/trunk/samples/learning-more/binding-comet/autocomplete-webapp/src/main/resources/countries.txt b/sca-java-2.x/trunk/samples/learning-more/binding-comet/autocomplete-webapp/src/main/resources/countries.txt index 271bbd5dd1..0ce76f8167 100644 --- a/sca-java-2.x/trunk/samples/learning-more/binding-comet/autocomplete-webapp/src/main/resources/countries.txt +++ b/sca-java-2.x/trunk/samples/learning-more/binding-comet/autocomplete-webapp/src/main/resources/countries.txt @@ -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 diff --git a/sca-java-2.x/trunk/samples/learning-more/binding-websocket/autocomplete-webapp/src/main/java/sample/CountryRepositoryImpl.java b/sca-java-2.x/trunk/samples/learning-more/binding-websocket/autocomplete-webapp/src/main/java/sample/CountryRepositoryImpl.java index 5878f0bf38..17ce39a10e 100644 --- a/sca-java-2.x/trunk/samples/learning-more/binding-websocket/autocomplete-webapp/src/main/java/sample/CountryRepositoryImpl.java +++ b/sca-java-2.x/trunk/samples/learning-more/binding-websocket/autocomplete-webapp/src/main/java/sample/CountryRepositoryImpl.java @@ -53,9 +53,11 @@ public class CountryRepositoryImpl implements CountryRepository { .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(); diff --git a/sca-java-2.x/trunk/samples/learning-more/binding-websocket/autocomplete-webapp/src/main/resources/countries.txt b/sca-java-2.x/trunk/samples/learning-more/binding-websocket/autocomplete-webapp/src/main/resources/countries.txt index 271bbd5dd1..0ce76f8167 100644 --- a/sca-java-2.x/trunk/samples/learning-more/binding-websocket/autocomplete-webapp/src/main/resources/countries.txt +++ b/sca-java-2.x/trunk/samples/learning-more/binding-websocket/autocomplete-webapp/src/main/resources/countries.txt @@ -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 -- cgit v1.2.3