Skip to content

Commit

Permalink
KAA-391: Add 'City guide' android demo application for configuration …
Browse files Browse the repository at this point in the history
…system API
  • Loading branch information
ikulikov committed Feb 26, 2015
1 parent 7156062 commit 9d26cc3
Show file tree
Hide file tree
Showing 962 changed files with 9,216 additions and 2,957 deletions.
32 changes: 32 additions & 0 deletions examples/cityguide/assembly/resources.xml
@@ -0,0 +1,32 @@
<!--
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.
-->

<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>cityguide-android-resources</id>
<formats>
<format>tar.gz</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>${project.basedir}/schemas</directory>
<useDefaultExcludes>true</useDefaultExcludes>
<outputDirectory></outputDirectory>
</fileSet>
</fileSets>
</assembly>
47 changes: 47 additions & 0 deletions examples/cityguide/assembly/src.xml
@@ -0,0 +1,47 @@
<!--
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.
-->

<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>cityguide-android-src</id>
<formats>
<format>tar.gz</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>${project.basedir}/../thirdparty/android/appcompat_v7</directory>
<useDefaultExcludes>true</useDefaultExcludes>
<outputDirectory>cityguide_demo/appcompat_v7</outputDirectory>
</fileSet>
<fileSet>
<directory>${project.basedir}/../thirdparty/android/viewpagerindicator</directory>
<useDefaultExcludes>true</useDefaultExcludes>
<outputDirectory>cityguide_demo/viewpagerindicator</outputDirectory>
</fileSet>
<fileSet>
<directory>${project.basedir}/../thirdparty/android/eventbus</directory>
<useDefaultExcludes>true</useDefaultExcludes>
<outputDirectory>cityguide_demo/CityGuide/libs</outputDirectory>
</fileSet>
<fileSet>
<directory>${project.basedir}/source</directory>
<useDefaultExcludes>true</useDefaultExcludes>
<outputDirectory>cityguide_demo/CityGuide</outputDirectory>
</fileSet>
</fileSets>
</assembly>
58 changes: 58 additions & 0 deletions examples/cityguide/pom.xml
@@ -0,0 +1,58 @@
<!--
Copyright 2014 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.
-->

<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.kaaproject.kaa</groupId>
<version>0.7.0-SNAPSHOT</version>
<artifactId>examples</artifactId>
</parent>
<groupId>org.kaaproject.kaa.examples</groupId>
<artifactId>cityguide</artifactId>
<packaging>pom</packaging>

<name>City guide demo application</name>
<url>http://kaaproject.org</url>

<properties>
<main.dir>${basedir}/../..</main.dir>
</properties>

<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>${project.basedir}/assembly/src.xml</descriptor>
<descriptor>${project.basedir}/assembly/resources.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
128 changes: 128 additions & 0 deletions 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"
}
13 changes: 13 additions & 0 deletions 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
}

0 comments on commit 9d26cc3

Please sign in to comment.