diff --git a/examples/cityguide/assembly/resources.xml b/examples/cityguide/assembly/resources.xml new file mode 100755 index 0000000000..311f69deb0 --- /dev/null +++ b/examples/cityguide/assembly/resources.xml @@ -0,0 +1,32 @@ + + + + cityguide-android-resources + + tar.gz + + false + + + ${project.basedir}/schemas + true + + + + diff --git a/examples/cityguide/assembly/src.xml b/examples/cityguide/assembly/src.xml new file mode 100755 index 0000000000..6008f8847f --- /dev/null +++ b/examples/cityguide/assembly/src.xml @@ -0,0 +1,47 @@ + + + + cityguide-android-src + + tar.gz + + false + + + ${project.basedir}/../thirdparty/android/appcompat_v7 + true + cityguide_demo/appcompat_v7 + + + ${project.basedir}/../thirdparty/android/viewpagerindicator + true + cityguide_demo/viewpagerindicator + + + ${project.basedir}/../thirdparty/android/eventbus + true + cityguide_demo/CityGuide/libs + + + ${project.basedir}/source + true + cityguide_demo/CityGuide + + + diff --git a/examples/cityguide/pom.xml b/examples/cityguide/pom.xml new file mode 100755 index 0000000000..892cfa3079 --- /dev/null +++ b/examples/cityguide/pom.xml @@ -0,0 +1,58 @@ + + + + 4.0.0 + + org.kaaproject.kaa + 0.7.0-SNAPSHOT + examples + + org.kaaproject.kaa.examples + cityguide + pom + + City guide demo application + http://kaaproject.org + + + ${basedir}/../.. + + + + + + maven-assembly-plugin + + + ${project.basedir}/assembly/src.xml + ${project.basedir}/assembly/resources.xml + + + + + make-assembly + package + + single + + + + + + + diff --git a/examples/cityguide/schemas/city_guide.avsc b/examples/cityguide/schemas/city_guide.avsc new file mode 100755 index 0000000000..2e3bfdad61 --- /dev/null +++ b/examples/cityguide/schemas/city_guide.avsc @@ -0,0 +1,128 @@ +{ + "type" : "record", + "name" : "CityGuideConfig", + "namespace" : "org.kaaproject.kaa.demo.cityguide", + "fields" : [ { + "name" : "availableAreas", + "type" : { + "type" : "array", + "items" : { + "type" : "record", + "name" : "AvailableArea", + "fields" : [ { + "name" : "name", + "type" : "string", + "displayName" : "Area name", + "displayPrompt" : "Enter area name" + }, { + "name" : "availableCities", + "type" : { + "type" : "array", + "items" : "string" + }, + "displayName" : "Available cities" + } ], + "displayName" : "Available area" + } + }, + "displayName" : "Available areas" + }, { + "name" : "areas", + "type" : { + "type" : "array", + "items" : { + "type" : "record", + "name" : "Area", + "fields" : [ { + "name" : "name", + "type" : "string", + "displayName" : "Area name", + "displayPrompt" : "Enter area name", + "inputType" : "plain" + }, { + "name" : "cities", + "type" : { + "type" : "array", + "items" : { + "type" : "record", + "name" : "City", + "fields" : [ { + "name" : "name", + "type" : "string", + "displayName" : "City name", + "displayPrompt" : "Enter city name" + }, { + "name" : "places", + "type" : { + "type" : "array", + "items" : { + "type" : "record", + "name" : "Place", + "fields" : [ { + "name" : "category", + "type" : { + "type" : "enum", + "name" : "Category", + "symbols" : [ "HOTEL", "SHOP", "MUSEUM", "RESTAURANT" ] + }, + "displayName" : "Category", + "displayPrompt" : "Select place category", + "weight" : 0.30000001192092896, + "keyIndex" : 1, + "displayNames" : [ "Hotel", "Shop", "Museum", "Restaurant" ] + }, { + "name" : "title", + "type" : "string", + "displayName" : "Title", + "displayPrompt" : "Enter place title", + "weight" : 0.699999988079071, + "keyIndex" : 2, + "inputType" : "plain" + }, { + "name" : "photoUrl", + "type" : "string", + "displayName" : "Photo URL", + "displayPrompt" : "Enter place photo url", + "inputType" : "plain" + }, { + "name" : "description", + "type" : "string", + "displayName" : "Description", + "displayPrompt" : "Enter place description", + "inputType" : "plain" + }, { + "name" : "location", + "type" : { + "type" : "record", + "name" : "Location", + "fields" : [ { + "name" : "latitude", + "type" : "double", + "displayName" : "Latitude", + "displayPrompt" : "Enter latitude" + }, { + "name" : "longitude", + "type" : "double", + "displayName" : "Longitude", + "displayPrompt" : "Enter longitude" + } ], + "displayName" : "Location" + }, + "displayName" : "Location" + } ], + "displayName" : "City place" + } + }, + "displayName" : "Places" + } ] + } + }, + "displayName" : "Cities" + } ] + } + }, + "displayName" : "Areas", + "overrideStrategy":"append" + } ], + "displayName" : "City guide config" +} \ No newline at end of file diff --git a/examples/cityguide/schemas/city_guide_data_all.json b/examples/cityguide/schemas/city_guide_data_all.json new file mode 100755 index 0000000000..a482927295 --- /dev/null +++ b/examples/cityguide/schemas/city_guide_data_all.json @@ -0,0 +1,13 @@ +{ + "availableAreas" : [ { + "name" : "North America", + "availableCities" : [ "Atlanta" ], + "__uuid": null + }, { + "name" : "Europe", + "availableCities" : [ "Amsterdam" ], + "__uuid": null + } ], + "areas" : [ ], + "__uuid": null +} \ No newline at end of file diff --git a/examples/cityguide/schemas/city_guide_data_amsterdam.json b/examples/cityguide/schemas/city_guide_data_amsterdam.json new file mode 100755 index 0000000000..afb3c222fd --- /dev/null +++ b/examples/cityguide/schemas/city_guide_data_amsterdam.json @@ -0,0 +1,342 @@ +{ + "availableAreas":{ + "org.kaaproject.configuration.unchangedT":"unchanged" + }, + "areas":{ + "array":[ + { + "name":{ + "string":"Europe" + }, + "cities":{ + "array":[ + { + "name":{ + "string":"Amsterdam" + }, + "places":{ + "array":[ + { + "category":{ + "org.kaaproject.kaa.demo.cityguide.Category":"HOTEL" + }, + "title":{ + "string":"Marriott Amsterdam" + }, + "photoUrl":{ + "string":"http://media-cdn.tripadvisor.com/media/photo-f/06/fd/e7/c4/deluxe-guest-room.jpg" + }, + "description":{ + "string":"Known for its colourful tulips and peaceful canals, Netherland's capital charms every visitor. In the midst of this beautiful city, Amsterdam Marriott Hotel welcomes guests with exceptional service. Just across from Leidseplein, the city centre hotel is ideally located for dining and entertainment as well as fashionable shopping." + }, + "location":{ + "org.kaaproject.kaa.demo.cityguide.Location":{ + "latitude":{ + "double":52.363291 + }, + "longitude":{ + "double":4.880761 + }, + "__uuid": null + } + }, + "__uuid": null + }, + { + "category":{ + "org.kaaproject.kaa.demo.cityguide.Category":"HOTEL" + }, + "title":{ + "string":"Renaissance Amsterdam Hotel" + }, + "photoUrl":{ + "string":"http://media-cdn.tripadvisor.com/media/photo-f/06/fe/03/b6/king-guest-room.jpg" + }, + "description":{ + "string":"Just a short walk from Central Station and situated in the historic city centre of charming Amsterdam, the Renaissance Amsterdam Hotel is the top spot to be after a top-to-bottom redesign. Our contemporary hotel in Amsterdam offers a warm and welcoming lobby, renovated guest accommodations featuring Renaissance Bedding, broadband internet access and HDTV." + }, + "location":{ + "org.kaaproject.kaa.demo.cityguide.Location":{ + "latitude":{ + "double":52.378064 + }, + "longitude":{ + "double":4.894593 + }, + "__uuid": null + } + }, + "__uuid": null + }, + { + "category":{ + "org.kaaproject.kaa.demo.cityguide.Category":"HOTEL" + }, + "title":{ + "string":"Crowne Plaza Amsterdam City Centre" + }, + "photoUrl":{ + "string":"http://media-cdn.tripadvisor.com/media/photo-f/06/66/df/f2/crowne-plaza-amsterdam.jpg" + }, + "description":{ + "string":"Book a Club Room or Suite at the Crowne Plaza Amsterdam City Centre hotel and gain access to the exclusive club lounge. Club guests enjoy browsing complimentary newspapers over breakfast, and return to use complimentary high-speed Internet and evening snacks and drinks." + }, + "location":{ + "org.kaaproject.kaa.demo.cityguide.Location":{ + "latitude":{ + "double":52.377476 + }, + "longitude":{ + "double":4.895767 + }, + "__uuid": null + } + }, + "__uuid": null + }, + { + "category":{ + "org.kaaproject.kaa.demo.cityguide.Category":"SHOP" + }, + "title":{ + "string":"Van Stapele Koekmakerij" + }, + "photoUrl":{ + "string":"http://media-cdn.tripadvisor.com/media/photo-s/05/9a/c0/d5/van-stapele-koekmakerij.jpg" + }, + "description":{ + "string":"The cosy, warm atmosphere of our shop will briefly take you back to the Amsterdam of olden days. The aroma of freshly baked cookies slowly drifts towards you as soft piano music fills the air, and light reflected through crystal chandeliers sparkles down on rows of delicious cookies." + }, + "location":{ + "org.kaaproject.kaa.demo.cityguide.Location":{ + "latitude":{ + "double":52.368953 + }, + "longitude":{ + "double":4.888423 + }, + "__uuid": null + } + }, + "__uuid": null + }, + { + "category":{ + "org.kaaproject.kaa.demo.cityguide.Category":"SHOP" + }, + "title":{ + "string":"Bonebakker Jeweler Amsterdam" + }, + "photoUrl":{ + "string":"http://media-cdn.tripadvisor.com/media/photo-s/06/63/b6/82/bonebakker-jeweler-amsterdam.jpg" + }, + "description":{ + "string":"Bonebakker\u2019s Jewellery store is situated in the monumental Van Baerle Shopping Gallery in the charming Museum Quarter in Amsterdam. Bonebakker has created an attractive, sophisticated venue for connoisseurs and lovers of jewellery within the luxurious atmosphere of the Conservatorium Hotel. Blending the delicate ornaments of the 19th century Art-Nouveau palace with state-of-the art interior features, Bonebakker Jeweller evokes an elegant atmosphere in an intimate setting." + }, + "location":{ + "org.kaaproject.kaa.demo.cityguide.Location":{ + "latitude":{ + "double":52.358783 + }, + "longitude":{ + "double":4.878607 + }, + "__uuid": null + } + }, + "__uuid": null + }, + { + "category":{ + "org.kaaproject.kaa.demo.cityguide.Category":"SHOP" + }, + "title":{ + "string":"Chocolatl" + }, + "photoUrl":{ + "string":"http://media-cdn.tripadvisor.com/media/photo-s/02/5d/42/55/chocolatl-store.jpg" + }, + "description":{ + "string":"Chocolatl is a specialty retail chocolate shop located in Amsterdam, Netherlands. Opened in December 2010, we like to think of the shop as a kind of \u201cchocolate gallery\u201d through which we seek to promote and make available high quality chocolate from around the world." + }, + "location":{ + "org.kaaproject.kaa.demo.cityguide.Location":{ + "latitude":{ + "double":52.370568 + }, + "longitude":{ + "double":4.880011 + }, + "__uuid": null + } + }, + "__uuid": null + }, + { + "category":{ + "org.kaaproject.kaa.demo.cityguide.Category":"MUSEUM" + }, + "title":{ + "string":"The Rijksmuseum (National Museum)" + }, + "photoUrl":{ + "string":"http://media-cdn.tripadvisor.com/media/photo-s/00/1c/d3/57/view-from-museumplein.jpg" + }, + "description":{ + "string":"The Rijksmuseum is the museum of the Netherlands. The completely renovated Rijksmuseum tells the story of the Netherlands from the Middle Ages to the 20th century. Including works by Rembrandt, Vermeer, Frans Hals, and more! Most famous is Rembrandt's masterpiece the Night Watch. A new display of the collection, a renewed building, new public facilities, a revamped garden and a new Asian Pavilion. Open daily from 9 am to 5 pm." + }, + "location":{ + "org.kaaproject.kaa.demo.cityguide.Location":{ + "latitude":{ + "double":52.360517 + }, + "longitude":{ + "double":4.881597 + }, + "__uuid": null + } + }, + "__uuid": null + }, + { + "category":{ + "org.kaaproject.kaa.demo.cityguide.Category":"MUSEUM" + }, + "title":{ + "string":"Anne Frank House (Anne Frankhuis)" + }, + "photoUrl":{ + "string":"http://media-cdn.tripadvisor.com/media/photo-s/01/58/c2/a4/caption.jpg" + }, + "description":{ + "string":"A Museum with a Story. Visit the hiding place where Anne Frank wrote her diary during the Second World War. For more than two years, Anne Frank lived secretively with the other people in hiding in the back part of her father\u2019s office building at # 263 Prinsengracht. " + }, + "location":{ + "org.kaaproject.kaa.demo.cityguide.Location":{ + "latitude":{ + "double":52.375208 + }, + "longitude":{ + "double":4.883997 + }, + "__uuid": null + } + }, + "__uuid": null + }, + { + "category":{ + "org.kaaproject.kaa.demo.cityguide.Category":"MUSEUM" + }, + "title":{ + "string":"Van Gogh Museum" + }, + "photoUrl":{ + "string":"http://media-cdn.tripadvisor.com/media/photo-s/01/8b/bf/c1/museum.jpg" + }, + "description":{ + "string":"The world's largest collection from the Dutch painter Vincent van Gogh (1853-1890) features more than 200 paintings and 600 drawings. " + }, + "location":{ + "org.kaaproject.kaa.demo.cityguide.Location":{ + "latitude":{ + "double":52.358419 + }, + "longitude":{ + "double":4.881055 + }, + "__uuid": null + } + }, + "__uuid": null + }, + { + "category":{ + "org.kaaproject.kaa.demo.cityguide.Category":"RESTAURANT" + }, + "title":{ + "string":"Restaurant Johannes" + }, + "photoUrl":{ + "string":"http://media-cdn.tripadvisor.com/media/photo-l/06/2d/9f/ad/restaurant-johannes.jpg" + }, + "description":{ + "string":"Chef Tommy den Hartog, restaurant manager Aline Mannes and their team are looking forward to welcoming you at Johannes were they found the perfect place to share their enthusiasm." + }, + "location":{ + "org.kaaproject.kaa.demo.cityguide.Location":{ + "latitude":{ + "double":52.3676 + }, + "longitude":{ + "double":4.887301 + }, + "__uuid": null + } + }, + "__uuid": null + }, + { + "category":{ + "org.kaaproject.kaa.demo.cityguide.Category":"RESTAURANT" + }, + "title":{ + "string":"Lombardo's" + }, + "photoUrl":{ + "string":"http://media-cdn.tripadvisor.com/media/photo-s/05/af/d1/b9/lombardo-s.jpg" + }, + "description":{ + "string":"It's all about taste!! Thats our motto... The Best Burgers, sandwiches, salads, freshly made juices...And damn good coffee! Served with a smile and a whole lot of love! We are located near the Rijksmuseum in the vibrant Spiegel quarter. We are near the corner of Kerkstraat and N. Spiegelstraat, careful you might miss it!! It's cozy at Lombardo's...So seating is always first come first served. Come in for the 4 years uncontested BEST burgers in Amsterdam!!" + }, + "location":{ + "org.kaaproject.kaa.demo.cityguide.Location":{ + "latitude":{ + "double":52.363524 + }, + "longitude":{ + "double":4.888665 + }, + "__uuid": null + } + }, + "__uuid": null + }, + { + "category":{ + "org.kaaproject.kaa.demo.cityguide.Category":"RESTAURANT" + }, + "title":{ + "string":"Bord'Eau" + }, + "photoUrl":{ + "string":"http://media-cdn.tripadvisor.com/media/photo-s/04/4f/4b/af/bord-eau.jpg" + }, + "description":{ + "string":"Recently Michelin star awarded Bord'Eau offers a culinary adventure directed by Executive Chef Richard van Oostenbrugge and Sous Chef Thomas Groot. Exceptional ingredients are blended to create symphonies of flavour, all complemented by the finest wines from around the globe. The intimacy of the salon-like setting, the classical simplicity of the decor and the grace and attentiveness of the service suggest high style and privilege overlooking the Amstel River." + }, + "location":{ + "org.kaaproject.kaa.demo.cityguide.Location":{ + "latitude":{ + "double":52.3676 + }, + "longitude":{ + "double":4.894391 + }, + "__uuid": null + } + }, + "__uuid": null + } + ] + }, + "__uuid": null + } + ] + }, + "__uuid": null + } + ] + }, + "__uuid": null +} \ No newline at end of file diff --git a/examples/cityguide/schemas/city_guide_data_atlanta.json b/examples/cityguide/schemas/city_guide_data_atlanta.json new file mode 100755 index 0000000000..e6ce78e61f --- /dev/null +++ b/examples/cityguide/schemas/city_guide_data_atlanta.json @@ -0,0 +1,342 @@ +{ + "availableAreas":{ + "org.kaaproject.configuration.unchangedT":"unchanged" + }, + "areas":{ + "array":[ + { + "name":{ + "string":"North America" + }, + "cities":{ + "array":[ + { + "name":{ + "string":"Atlanta" + }, + "places":{ + "array":[ + { + "category":{ + "org.kaaproject.kaa.demo.cityguide.Category":"HOTEL" + }, + "title":{ + "string":"Omni Atlanta Hotel at CNN Center" + }, + "photoUrl":{ + "string":"http://media-cdn.tripadvisor.com/media/photo-f/06/fd/ef/93/double-queen-guest-room.jpg" + }, + "description":{ + "string":"Near Georgia Aquarium, Popular upscale hotel in Atlanta, Upscale" + }, + "location":{ + "org.kaaproject.kaa.demo.cityguide.Location":{ + "latitude":{ + "double":33.759376 + }, + "longitude":{ + "double":-84.394991 + }, + "__uuid": null + } + }, + "__uuid": null + }, + { + "category":{ + "org.kaaproject.kaa.demo.cityguide.Category":"HOTEL" + }, + "title":{ + "string":"InterContinental Buckhead Atlanta" + }, + "photoUrl":{ + "string":"http://media-cdn.tripadvisor.com/media/photo-f/06/2b/14/6e/hotel-exterior-of-intercontine.jpg" + }, + "description":{ + "string":"Popular luxury hotel in Atlanta, Top-tier hotel, Other travelers love this hotel" + }, + "location":{ + "org.kaaproject.kaa.demo.cityguide.Location":{ + "latitude":{ + "double":33.845817 + }, + "longitude":{ + "double":-84.36787 + }, + "__uuid": null + } + }, + "__uuid": null + }, + { + "category":{ + "org.kaaproject.kaa.demo.cityguide.Category":"HOTEL" + }, + "title":{ + "string":"Loews Atlanta Hotel" + }, + "photoUrl":{ + "string":"http://media-cdn.tripadvisor.com/media/photo-f/06/2d/7c/28/grand-king-room.jpg" + }, + "description":{ + "string":"Good choice for travelers who love local culture, Offers free wifi, Popular elegant hotel in Atlanta" + }, + "location":{ + "org.kaaproject.kaa.demo.cityguide.Location":{ + "latitude":{ + "double":33.782991 + }, + "longitude":{ + "double":-84.38332 + }, + "__uuid": null + } + }, + "__uuid": null + }, + { + "category":{ + "org.kaaproject.kaa.demo.cityguide.Category":"SHOP" + }, + "title":{ + "string":"Atlantic Station" + }, + "photoUrl":{ + "string":"http://images.atlanta.net/WebImage.ashx?mode=logo&accountnum=00128166" + }, + "description":{ + "string":"The Atlantic Station neighborhood in Atlanta is the national model for smart growth and sustainable development. Picture a community with unsurpassed architectural quality, a fusion of functionality and finesse that combines an attractive mix of affordable, middle-income and up-scale housing with world-class restaurants, theaters and retailers. " + }, + "location":{ + "org.kaaproject.kaa.demo.cityguide.Location":{ + "latitude":{ + "double":33.792771 + }, + "longitude":{ + "double":-84.396187 + }, + "__uuid": null + } + }, + "__uuid": null + }, + { + "category":{ + "org.kaaproject.kaa.demo.cityguide.Category":"SHOP" + }, + "title":{ + "string":"Buckhead Atlanta" + }, + "photoUrl":{ + "string":"http://images.atlanta.net/WebImage.ashx?mode=logo&accountnum=00095518" + }, + "description":{ + "string":"Buckhead Atlanta is a luxury shopping/dining entertainment, office, and residential district spanning six blocks in the heart of Buckhead Atlanta." + }, + "location":{ + "org.kaaproject.kaa.demo.cityguide.Location":{ + "latitude":{ + "double":33.839611 + }, + "longitude":{ + "double":-84.381425 + }, + "__uuid": null + } + }, + "__uuid": null + }, + { + "category":{ + "org.kaaproject.kaa.demo.cityguide.Category":"SHOP" + }, + "title":{ + "string":"City of East Point" + }, + "photoUrl":{ + "string":"http://images.atlanta.net/WebImage.ashx?mode=logo&accountnum=015858" + }, + "description":{ + "string":"East Point is one of Georgia's fastest growing cities. Accessibility is one of the many advantages that the City of East Point offers. Its location provides easy access to public transportation, major highways, Atlanta's Hartsfield-Jackson Airport and the world-renowned attractions, dining and shopping of Atlanta." + }, + "location":{ + "org.kaaproject.kaa.demo.cityguide.Location":{ + "latitude":{ + "double":33.68088 + }, + "longitude":{ + "double":-84.442149 + }, + "__uuid": null + } + }, + "__uuid": null + }, + { + "category":{ + "org.kaaproject.kaa.demo.cityguide.Category":"MUSEUM" + }, + "title":{ + "string":"Atlanta Contemporary Art Center" + }, + "photoUrl":{ + "string":"http://upload.wikimedia.org/wikipedia/commons/0/0e/Atlanta_Contemporary_Art_Center.jpg" + }, + "description":{ + "string":"Local, national, and international contemporary art; education geared toward working artists and collectors of art" + }, + "location":{ + "org.kaaproject.kaa.demo.cityguide.Location":{ + "latitude":{ + "double":33.762106 + }, + "longitude":{ + "double":-84.391468 + }, + "__uuid": null + } + }, + "__uuid": null + }, + { + "category":{ + "org.kaaproject.kaa.demo.cityguide.Category":"MUSEUM" + }, + "title":{ + "string":"Atlanta Cyclorama & Civil War Museum" + }, + "photoUrl":{ + "string":"http://upload.wikimedia.org/wikipedia/commons/6/6f/Atlanta_Cyclorama.jpg" + }, + "description":{ + "string":"Displays pictures and artifacts from the Civil War and houses a massive cylindrical panoramic painting of the Battle of Atlanta." + }, + "location":{ + "org.kaaproject.kaa.demo.cityguide.Location":{ + "latitude":{ + "double":33.734158 + }, + "longitude":{ + "double":-84.371064 + }, + "__uuid": null + } + }, + "__uuid": null + }, + { + "category":{ + "org.kaaproject.kaa.demo.cityguide.Category":"MUSEUM" + }, + "title":{ + "string":"Atlanta History Center" + }, + "photoUrl":{ + "string":"http://upload.wikimedia.org/wikipedia/commons/8/8a/Swan_Coach_House.jpg" + }, + "description":{ + "string":"History of Atlanta and Georgia; includes the Centennial Olympic Games Museum and one of the nation's most complete Civil War exhibitions." + }, + "location":{ + "org.kaaproject.kaa.demo.cityguide.Location":{ + "latitude":{ + "double":33.84282 + }, + "longitude":{ + "double":-84.38573 + }, + "__uuid": null + } + }, + "__uuid": null + }, + { + "category":{ + "org.kaaproject.kaa.demo.cityguide.Category":"RESTAURANT" + }, + "title":{ + "string":"Fandangles" + }, + "photoUrl":{ + "string":"http://media-cdn.tripadvisor.com/media/photo-l/04/2d/46/fa/fandangles.jpg" + }, + "description":{ + "string":"Located inside the Sheraton Atlanta Hotel, Fandangles promotes health-conscious Southern evolution food. The menu includes Southern Comforts like the 24-oz Bone-in Rib-eye and The Roasted Corn and Chicken Chowder to items that are a bit lighter fare like our locally sourced House Smoked Trout or our Quinoa Kale salad. We offer an uniquely..." + }, + "location":{ + "org.kaaproject.kaa.demo.cityguide.Location":{ + "latitude":{ + "double":33.759269 + }, + "longitude":{ + "double":-84.383103 + }, + "__uuid": null + } + }, + "__uuid": null + }, + { + "category":{ + "org.kaaproject.kaa.demo.cityguide.Category":"RESTAURANT" + }, + "title":{ + "string":"Canoe" + }, + "photoUrl":{ + "string":"http://media-cdn.tripadvisor.com/media/photo-l/01/fa/1f/43/canoe.jpg" + }, + "description":{ + "string":"Canoe is located in Atlanta's historic Vinings area on the Chattahoochee River where Buckhead meets Vinings. Canoe's beautiful historic riverside setting makes it the perfect spot for weddings, receptions and private celebrations. Its original cuisine and distinctive design have already been featured in Bon Appetit, Food And Wine, Gourmet, The Wine Spectator and The New York Times." + }, + "location":{ + "org.kaaproject.kaa.demo.cityguide.Location":{ + "latitude":{ + "double":33.860061 + }, + "longitude":{ + "double":-84.455461 + }, + "__uuid": null + } + }, + "__uuid": null + }, + { + "category":{ + "org.kaaproject.kaa.demo.cityguide.Category":"RESTAURANT" + }, + "title":{ + "string":"Bone's Restaurant" + }, + "photoUrl":{ + "string":"http://media-cdn.tripadvisor.com/media/photo-l/01/23/67/77/bones.jpg" + }, + "description":{ + "string":"Bone\u2019s opened its doors in 1979 with a mission to provide only the finest service, steaks and seafood. Since that time, we're proud to have been recognized as the best steakhouse in Atlanta -- and by many, as the best steakhouse in America. Prime beef, fresh seafood, and Maine lobster are served along with regional specialties from our Southern roots. Known for business lunches and business dinners, Bone\u2019s provides private party rooms and personalized menus to accommodate fine dining experiences and special occasions." + }, + "location":{ + "org.kaaproject.kaa.demo.cityguide.Location":{ + "latitude":{ + "double":33.842361 + }, + "longitude":{ + "double":-84.371015 + }, + "__uuid": null + } + }, + "__uuid": null + } + ] + }, + "__uuid": null + } + ] + }, + "__uuid": null + } + ] + }, + "__uuid": null + } \ No newline at end of file diff --git a/examples/cityguide/schemas/city_guide_filter_amsterdam.json b/examples/cityguide/schemas/city_guide_filter_amsterdam.json new file mode 100755 index 0000000000..fe94e9b2ec --- /dev/null +++ b/examples/cityguide/schemas/city_guide_filter_amsterdam.json @@ -0,0 +1 @@ +(area == null or area.equals("Europe")) and (city == null or city.equals("Amsterdam")) \ No newline at end of file diff --git a/examples/cityguide/schemas/city_guide_filter_atlanta.json b/examples/cityguide/schemas/city_guide_filter_atlanta.json new file mode 100755 index 0000000000..5f22d81c00 --- /dev/null +++ b/examples/cityguide/schemas/city_guide_filter_atlanta.json @@ -0,0 +1 @@ +(area == null or area.equals("North America")) and (city == null or city.equals("Atlanta")) \ No newline at end of file diff --git a/examples/cityguide/schemas/city_guide_profile.avsc b/examples/cityguide/schemas/city_guide_profile.avsc new file mode 100755 index 0000000000..4bb7570ae2 --- /dev/null +++ b/examples/cityguide/schemas/city_guide_profile.avsc @@ -0,0 +1,18 @@ +{ + "type" : "record", + "name" : "CityGuideProfile", + "namespace" : "org.kaaproject.kaa.demo.cityguide.profile", + "fields" : [ { + "name" : "area", + "type" : [ { + "type" : "string", + "avro.java.string" : "String" + }, "null" ] + }, { + "name" : "city", + "type" : [ { + "type" : "string", + "avro.java.string" : "String" + }, "null" ] + } ] +} \ No newline at end of file diff --git a/examples/cityguide/source/AndroidManifest.xml b/examples/cityguide/source/AndroidManifest.xml new file mode 100755 index 0000000000..eb08171234 --- /dev/null +++ b/examples/cityguide/source/AndroidManifest.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/cityguide/source/build.xml b/examples/cityguide/source/build.xml new file mode 100755 index 0000000000..a99a62c074 --- /dev/null +++ b/examples/cityguide/source/build.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/cityguide/source/lint.xml b/examples/cityguide/source/lint.xml new file mode 100755 index 0000000000..9ed062d458 --- /dev/null +++ b/examples/cityguide/source/lint.xml @@ -0,0 +1,23 @@ + + + + + + + + + \ No newline at end of file diff --git a/examples/cityguide/source/proguard-project.txt b/examples/cityguide/source/proguard-project.txt new file mode 100755 index 0000000000..c44fdd94f3 --- /dev/null +++ b/examples/cityguide/source/proguard-project.txt @@ -0,0 +1,37 @@ +# +# Copyright 2014-2015 CyberVision, Inc. +# +# Licensed 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. +# + + +# To enable ProGuard in your project, edit project.properties +# to define the proguard.config property as described in that file. +# +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in ${sdk.dir}/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the ProGuard +# include property in project.properties. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} diff --git a/examples/cityguide/source/project.properties b/examples/cityguide/source/project.properties new file mode 100755 index 0000000000..c0d1e0de54 --- /dev/null +++ b/examples/cityguide/source/project.properties @@ -0,0 +1,17 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system edit +# "ant.properties", and override values to adapt the script to your +# project structure. +# +# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): +#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt + +# Project target. + +target=android-21 +android.library.reference.1=../appcompat_v7 +android.library.reference.2=../viewpagerindicator diff --git a/examples/smarthousedemo/thirdparty/compatibility-v7-appcompat/res/drawable-hdpi/abc_list_divider_holo_light.9.png b/examples/cityguide/source/res/drawable-hdpi/custom_tab_indicator_divider.9.png old mode 100644 new mode 100755 similarity index 100% rename from examples/smarthousedemo/thirdparty/compatibility-v7-appcompat/res/drawable-hdpi/abc_list_divider_holo_light.9.png rename to examples/cityguide/source/res/drawable-hdpi/custom_tab_indicator_divider.9.png diff --git a/examples/smarthousedemo/thirdparty/qrcode-lib/res/drawable-hdpi/ic_launcher.png b/examples/cityguide/source/res/drawable-hdpi/ic_launcher.png old mode 100644 new mode 100755 similarity index 100% rename from examples/smarthousedemo/thirdparty/qrcode-lib/res/drawable-hdpi/ic_launcher.png rename to examples/cityguide/source/res/drawable-hdpi/ic_launcher.png diff --git a/examples/smarthousedemo/thirdparty/qrcode-lib/res/drawable-mdpi/ic_launcher.png b/examples/cityguide/source/res/drawable-mdpi/ic_launcher.png old mode 100644 new mode 100755 similarity index 100% rename from examples/smarthousedemo/thirdparty/qrcode-lib/res/drawable-mdpi/ic_launcher.png rename to examples/cityguide/source/res/drawable-mdpi/ic_launcher.png diff --git a/examples/smarthousedemo/thirdparty/qrcode-lib/res/drawable-xhdpi/ic_launcher.png b/examples/cityguide/source/res/drawable-xhdpi/ic_launcher.png old mode 100644 new mode 100755 similarity index 100% rename from examples/smarthousedemo/thirdparty/qrcode-lib/res/drawable-xhdpi/ic_launcher.png rename to examples/cityguide/source/res/drawable-xhdpi/ic_launcher.png diff --git a/examples/cityguide/source/res/layout/activity_city_guide.xml b/examples/cityguide/source/res/layout/activity_city_guide.xml new file mode 100755 index 0000000000..f95be70815 --- /dev/null +++ b/examples/cityguide/source/res/layout/activity_city_guide.xml @@ -0,0 +1,24 @@ + + + + diff --git a/examples/cityguide/source/res/layout/area_list_item.xml b/examples/cityguide/source/res/layout/area_list_item.xml new file mode 100755 index 0000000000..8148e57242 --- /dev/null +++ b/examples/cityguide/source/res/layout/area_list_item.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/examples/cityguide/source/res/layout/city_list_item.xml b/examples/cityguide/source/res/layout/city_list_item.xml new file mode 100755 index 0000000000..0f551ed430 --- /dev/null +++ b/examples/cityguide/source/res/layout/city_list_item.xml @@ -0,0 +1,28 @@ + + + + + + \ No newline at end of file diff --git a/examples/cityguide/source/res/layout/dialog_set_location.xml b/examples/cityguide/source/res/layout/dialog_set_location.xml new file mode 100755 index 0000000000..adf55407d1 --- /dev/null +++ b/examples/cityguide/source/res/layout/dialog_set_location.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + +