Permalink
Browse files

Code refactoring: for categoryless devices (a.k.a. 'href parents')

Test modification

changed iotsys-common/src/at/ac/tuwien/auto/iotsys/commons/ObjectBroker.java
changed iotsys-gateway/src/at/ac/tuwien/auto/iotsys/gateway/obix/objectbroker/ObjectBrokerImpl.java
changed iotsys-gateway/test/at/ac/tuwien/auto/iotsys/gateway/test/WatchServiceTest.java
  • Loading branch information...
Jomy Chelackal
Jomy Chelackal committed Sep 10, 2014
0 parents commit 1531b7340e2dc3b3ef9f6729561ff44d338d44d9
Showing 2,059 changed files with 532,261 additions and 0 deletions.
@@ -0,0 +1 @@
#Sun Jun 08 16:13:05 EST 2014
Binary file not shown.
@@ -0,0 +1,96 @@
syntax: glob
bin
build
META-INF
.settings
.metadata
.classpath
.project
felix-framework*
felix-cache*
org.apache.felix.main.distribution-4.2.1.zip
obelix/.sass-cache
obelix/build
iotsys-gateway/KNX.txt*
iotsys-gateway/iotsys-log.*
iotsys-enocean-library/target
*.lck
*.1
*.txt
*.orig
*.bin
*.class
**/build.properties
.gradle/1.6/taskArtifacts/cache.properties
.gradle/1.6/taskArtifacts/cache.properties.lock
.DS_Store
.git
iotsys-gateway/knx-config/projects/Suitcase_2013-09-05/knx_master.xml
iotsys-gateway/knx-config/projects/Suitcase_2013-09-05/Suitcase_2013-09-05.xml
iotsys-gateway/knx-config/projects/Suitcase_2013-09-05/P-0341/Project.xml
iotsys-gateway/knx-config/projects/Suitcase_2013-09-05/P-0341/0.xml
iotsys-gateway/knx-config/projects/Suitcase_2013-09-05/P-0341.signature
iotsys-gateway/knx-config/projects/Suitcase_2013-09-05/M-0064/M-0064_A-FF21-11-DDFC-O0048.xml
iotsys-gateway/knx-config/projects/Suitcase_2013-09-05/M-0064/Hardware.xml
iotsys-gateway/knx-config/projects/Suitcase_2013-09-05/M-0064/Catalog.xml
iotsys-gateway/knx-config/projects/Suitcase_2013-09-05/M-0064.signature
iotsys-gateway/knx-config/projects/Suitcase_2013-09-05/M-0001/M-0001_A-9814-01-5F7E.xml
iotsys-gateway/knx-config/projects/Suitcase_2013-09-05/M-0001/M-0001_A-9803-03-3F77.xml
iotsys-gateway/knx-config/projects/Suitcase_2013-09-05/M-0001/M-0001_A-6102-01-A218.xml
iotsys-gateway/knx-config/projects/Suitcase_2013-09-05/M-0001/M-0001_A-540E-03-EE38.xml
iotsys-gateway/knx-config/projects/Suitcase_2013-09-05/M-0001/M-0001_A-2413-01-B14F.xml
iotsys-gateway/knx-config/projects/Suitcase_2013-09-05/M-0001/M-0001_A-2214-01-737F.xml
iotsys-gateway/knx-config/projects/Suitcase_2013-09-05/M-0001/Hardware.xml
iotsys-gateway/knx-config/projects/Suitcase_2013-09-05/M-0001/Catalog.xml
iotsys-gateway/knx-config/projects/Suitcase_2013-09-05/M-0001.signature
iotsys-gateway/knx-config/projects/Suitcase_2013_10_16/knx_master.xml
iotsys-gateway/knx-config/projects/Suitcase_2013_10_16/Suitcase_2013_10_16.xml
iotsys-gateway/knx-config/projects/Suitcase_2013_10_16/P-0341/Project.xml
iotsys-gateway/knx-config/projects/Suitcase_2013_10_16/P-0341/0.xml
iotsys-gateway/knx-config/projects/Suitcase_2013_10_16/P-0341.signature
iotsys-gateway/knx-config/projects/Suitcase_2013_10_16/M-0064/M-0064_A-FF21-11-DDFC-O0048.xml
iotsys-gateway/knx-config/projects/Suitcase_2013_10_16/M-0064/Hardware.xml
iotsys-gateway/knx-config/projects/Suitcase_2013_10_16/M-0064/Catalog.xml
iotsys-gateway/knx-config/projects/Suitcase_2013_10_16/M-0064.signature
iotsys-gateway/knx-config/projects/Suitcase_2013_10_16/M-0001/M-0001_A-9814-01-5F7E.xml
iotsys-gateway/knx-config/projects/Suitcase_2013_10_16/M-0001/M-0001_A-9803-03-3F77.xml
iotsys-gateway/knx-config/projects/Suitcase_2013_10_16/M-0001/M-0001_A-6102-01-A218.xml
iotsys-gateway/knx-config/projects/Suitcase_2013_10_16/M-0001/M-0001_A-540E-03-EE38.xml
iotsys-gateway/knx-config/projects/Suitcase_2013_10_16/M-0001/M-0001_A-2413-01-B14F.xml
iotsys-gateway/knx-config/projects/Suitcase_2013_10_16/M-0001/M-0001_A-2214-01-737F.xml
iotsys-gateway/knx-config/projects/Suitcase_2013_10_16/M-0001/Hardware.xml
iotsys-gateway/knx-config/projects/Suitcase_2013_10_16/M-0001/Catalog.xml
iotsys-gateway/knx-config/projects/Suitcase_2013_10_16/M-0001.signature
iotsys-gateway/knx-config/projects/E183-1/knx_master.xml
iotsys-gateway/knx-config/projects/E183-1/P-013F/Project.xml
iotsys-gateway/knx-config/projects/E183-1/P-013F/BinaryData/7436e24d-bf2b-4f1a-9723-bada550518fe.dat
iotsys-gateway/knx-config/projects/E183-1/P-013F/0.xml
iotsys-gateway/knx-config/projects/E183-1/P-013F.signature
iotsys-gateway/knx-config/projects/E183-1/M-0050/M-0050_A-0001-11-DC72.xml
iotsys-gateway/knx-config/projects/E183-1/M-0050/Hardware.xml
iotsys-gateway/knx-config/projects/E183-1/M-0050.signature
iotsys-gateway/knx-config/projects/E183-1/M-0048/M-0048_A-731A-10-B078.xml
iotsys-gateway/knx-config/projects/E183-1/M-0048/Hardware.xml
iotsys-gateway/knx-config/projects/E183-1/M-0048.signature
iotsys-gateway/knx-config/projects/E183-1/M-0002/M-0002_A-6198-13-A260-O0007.xml
iotsys-gateway/knx-config/projects/E183-1/M-0002/Hardware.xml
iotsys-gateway/knx-config/projects/E183-1/M-0002.signature
iotsys-gateway/knx-config/projects/E183-1/M-0001/M-0001_A-980B-02-5CB6.xml
iotsys-gateway/knx-config/projects/E183-1/M-0001/M-0001_A-9803-04-5747.xml
iotsys-gateway/knx-config/projects/E183-1/M-0001/M-0001_A-9102-01-C46E-O00EF.xml
iotsys-gateway/knx-config/projects/E183-1/M-0001/M-0001_A-9076-02-9E24.xml
iotsys-gateway/knx-config/projects/E183-1/M-0001/M-0001_A-9064-01-60D9.xml
iotsys-gateway/knx-config/projects/E183-1/M-0001/M-0001_A-9009-02-5C1C.xml
iotsys-gateway/knx-config/projects/E183-1/M-0001/M-0001_A-9005-01-8D0D.xml
iotsys-gateway/knx-config/projects/E183-1/M-0001/M-0001_A-8042-12-94A8-O00E8.xml
iotsys-gateway/knx-config/projects/E183-1/M-0001/M-0001_A-8025-01-C29E.xml
iotsys-gateway/knx-config/projects/E183-1/M-0001/M-0001_A-2405-05-341B.xml
iotsys-gateway/knx-config/projects/E183-1/M-0001/M-0001_A-211D-01-0A52-O0006.xml
iotsys-gateway/knx-config/projects/E183-1/M-0001/M-0001_A-0010-02-34B8.xml
iotsys-gateway/knx-config/projects/E183-1/M-0001/Hardware.xml
iotsys-gateway/knx-config/projects/E183-1/M-0001/Catalog.xml
iotsys-gateway/knx-config/projects/E183-1/M-0001/Baggages/UP140/013_Mk_Plugin.dll
iotsys-gateway/knx-config/projects/E183-1/M-0001/Baggages/UP140/013_Mk_PlugIn_0407.rlg
iotsys-gateway/knx-config/projects/E183-1/M-0001/Baggages.xml
iotsys-gateway/knx-config/projects/E183-1/M-0001.signature
iotsys-gateway/knx-config/projects/E183-1/E183-1.xml
@@ -0,0 +1,195 @@
allprojects {
apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'maven'
group = 'at.ac.tuwien.auto.iotsys'
version = '0.1'
repositories(){
mavenCentral()
mavenRepo url: 'https://repository.jboss.org/nexus/content/repositories/releases/', name: 'JBoss Releases'
mavenRepo url: 'https://repository.jboss.org/nexus/content/groups/public/', name: 'JBoss Public'
flatDir { dirs "../lib/californium", "../lib/ektorp"}
}
}
ext{
configDir = file('iotsys-gateway/config')
resDir = file('iotsys-gateway/res')
knxConfigDir = file('iotsys-gateway/knx-config')
californiumProperties = file('iotsys-gateway/Californium.properties')
distLib = file('dist')
distLibRunFile = file('dist/rungateway.bat')
distLibRunFileSh = file('dist/rungateway.sh')
String felixDir = "felix-framework-4.2.1"
felix = file(felixDir)
felixConfFile = file(felixDir + '/conf/config.properties')
felixBundle = file(felixDir + '/bundle')
felixCache = file(felixDir + '/felix-cache')
}
subprojects{
apply plugin: 'eclipse'
sourceSets {
main {
java {
srcDir 'src'
}
}
}
task deploy(dependsOn: jar) << {
println "copying $jar.archivePath to $distLib"
ant.copy(file:jar.archivePath, todir:distLib)
}
task deployOsgi(dependsOn: jar) << {
println "copying $jar.archivePath to $felixBundle"
ant.copy(file:jar.archivePath, todir:felixBundle)
}
task clearOsgiCache(dependsOn: jar) << {
ant.delete (includeemptydirs:"true") {
fileset (dir:felixCache, includes:"**/*")
}
}
}
description = 'IoTSyS - Integration middleware for the Internet of Things'
task deploy << {
ant.echo(message:'java -cp "iotsys-coap-0.1.jar;iotsys-rfid-0.1.jar;iotsys-bacnet-0.1.jar;iotsys-bacnet4j-0.1.jar;iotsys-calimero-0.1.jar;iotsys-common-0.1.jar;iotsys-control-0.1.jar;iotsys-encoding-json-0.1.jar;iotsys-gateway-0.1.jar;iotsys-knx-0.1.jar;iotsys-obix-0.1.jar;iotsys-virtual-0.1.jar;iotsys-wmbus-0.1.jar;iotsys-enocean-0.1.jar;iotsys-enocean-library-0.1.jar;iotsys-xacml-0.1.jar;res;iotsys-demoapp-0.1.jar;iotsys-xbee-0.1.jar;iotsys-mdnssd-0.1.jar" at.ac.tuwien.auto.iotsys.gateway.IoTSySGateway', file:distLibRunFile)
ant.echo(message:'IOTSYS_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )${file.separator}"${line.separator}', file:distLibRunFileSh)
ant.echo(message:'cd $IOTSYS_PATH${line.separator}', file:distLibRunFileSh, append:true)
ant.echo(message:'sudo java -cp "${IOTSYS_PATH}iotsys-coap-0.1.jar:${IOTSYS_PATH}iotsys-rfid-0.1.jar:${IOTSYS_PATH}iotsys-bacnet-0.1.jar:${IOTSYS_PATH}iotsys-bacnet4j-0.1.jar:${IOTSYS_PATH}iotsys-calimero-0.1.jar:${IOTSYS_PATH}iotsys-common-0.1.jar:${IOTSYS_PATH}iotsys-control-0.1.jar:${IOTSYS_PATH}iotsys-encoding-json-0.1.jar:${IOTSYS_PATH}iotsys-gateway-0.1.jar:${IOTSYS_PATH}iotsys-knx-0.1.jar:${IOTSYS_PATH}iotsys-obix-0.1.jar:${IOTSYS_PATH}iotsys-virtual-0.1.jar:${IOTSYS_PATH}iotsys-wmbus-0.1.jar:${IOTSYS_PATH}iotsys-enocean-0.1.jar:${IOTSYS_PATH}iotsys-enocean-library-0.1.jar:${IOTSYS_PATH}iotsys-xacml-0.1.jar:${IOTSYS_PATH}res:${IOTSYS_PATH}iotsys-demoapp-0.1.jar:${IOTSYS_PATH}iotsys-xbee-0.1.jar;${IOTSYS_PATH}iotsys-mdnssd-0.1.jar" at.ac.tuwien.auto.iotsys.gateway.IoTSySGateway', file:distLibRunFileSh, append:true)
File deployResDir = new File(distLib.absolutePath + '/res')
File deployConfDir = new File(distLib.absolutePath + '/config')
File deployKnxConfDir = new File(distLib.absolutePath + '/knx-config')
File deployCaliforniumProperties = new File(distLib.absolutePath + '/Californium.properties')
ant.copy(todir:deployConfDir){
fileset(dir:configDir)
}
ant.copy(todir:deployResDir){
fileset(dir:resDir)
}
ant.copy(todir:deployKnxConfDir){
fileset(dir:knxConfigDir)
}
if(californiumProperties.exists()){
ant.copy(file:californiumProperties, tofile:deployCaliforniumProperties)
}
else{
println "Californium properties does not exist."
}
}
task deployOsgi << {
File dstConfigDir = new File(felix.absolutePath + '/config')
File dstKnxConfigDir = new File(felix.absolutePath + '/knx-config')
File dstResDir = new File(felix.absolutePath + '/res')
if(felixCache.exists()){
ant.delete (includeemptydirs:"true") {
fileset (dir:felixCache, includes:"**/*")
}
}
if(dstConfigDir.exists()){
println "Copying configuration from " + configDir.absolutePath + " to " + dstConfigDir.absolutePath
ant.copy(todir:dstConfigDir){
fileset(dir:configDir)
}
}
if(dstKnxConfigDir.exists()){
println "Copying configuration from " + knxConfigDir.absolutePath + " to " + dstKnxConfigDir.absolutePath
ant.copy(todir:dstKnxConfigDir){
fileset(dir:knxConfigDir)
}
}
if(dstResDir.exists()){
println "Resource directory already available at " + dstResDir.absolutePath
println "Copying configuration from " + resDir.absolutePath + " to " + dstResDir.absolutePath
ant.copy(todir:dstResDir){
fileset(dir:resDir)
}
}
}
task setupFelix << {
println "Setting up the Felix 4.2 OSGI container at " + felix.absolutePath
println "This task copies the IoTSyS gateway configuration and resource files."
println "It overrides also the OSGI configuration to make required system libraries available!\n\n"
File dstConfigDir = new File(felix.absolutePath + '/config')
File dstResDir = new File(felix.absolutePath + '/res')
File dstKnxConfigDir = new File(felix.absolutePath + '/knx-config')
if(!felix.exists()){
println "Need to download felix 4.2.1 distribution"
ant.get(src:"http://www.auto.tuwien.ac.at/~mjung/org.apache.felix.main.distribution-4.2.1.zip", dest:"org.apache.felix.main.distribution-4.2.1.zip", verbose:true)
ant.unzip(src:"org.apache.felix.main.distribution-4.2.1.zip", dest:file('.').absolutePath)
}
if(dstConfigDir.exists()){
println "Configuration already available at " + dstConfigDir.absolutePath
}
else{
println "Copying configuration from " + configDir.absolutePath + " to " + dstConfigDir.absolutePath
ant.copy(todir:dstConfigDir){
fileset(dir:configDir)
}
}
if(dstKnxConfigDir.exists()){
println "KNX Configuration already available at " + dstKnxConfigDir.absolutePath
}
else{
println "Copying configuration from " + knxConfigDir.absolutePath + " to " + dstKnxConfigDir.absolutePath
ant.copy(todir:dstKnxConfigDir){
fileset(dir:knxConfigDir)
}
}
if(dstResDir.exists()){
println "Resource directory already available at " + dstResDir.absolutePath
}
else{
println "Copying configuration from " + resDir.absolutePath + " to " + dstResDir.absolutePath
ant.copy(todir:dstResDir){
fileset(dir:resDir)
}
}
println "Updating felix config.properties file. Setting org.osgi.framework.system.packages.extra property"
ant.propertyfile(file: felixConfFile.absolutePath){
entry( key: 'org.osgi.framework.system.packages.extra',
value: "javax.crypto, javax.crypto.interfaces, javax.crypto.spec, javax.naming, javax.naming.directory,"+
"javax.naming.spi, javax.management, javax.management.loading, javax.management.modelmbean, javax.net," +
"javax.net.ssl, javax.crypto, javax.crypto.interfaces, javax.crypto.spec, javax.security.auth," +
"javax.security.auth.spi, javax.security.auth.callback, javax.security.auth.login," +
"javax.security.cert, javax.xml.parsers, javax.xml.xpath, javax.xml.transform.sax," + "javax.xml.transform.dom, javax.xml.namespace, javax.xml.transform, javax.xml.transform.stream," +
"javax.xml.validation, javax.xml.datatype, org.xml.sax, org.xml.sax.helpers, org.xml.sax.ext," + "org.apache.xalan, org.apache.xalan.res," + "com.sun.org.apache.xml.internal.utils, com.sun.org.apache.xpath.internal," + "com.sun.org.apache.xpath.internal.jaxp, com.sun.org.apache.xpath.internal.objects," + "com.sun.org.apache.xml.internal, org.w3c.dom, org.w3c.dom.traversal, org.w3c.dom.ls, javax.sql," + "javax.transaction, sun.misc, com.sun.org.apache.xerces.internal.jaxp.validation, com.sun.org.apache.xerces.internal.jaxp, javax.naming.ldap, javax.naming, javax.xml.ws, com.sun.xml.internal.ws.api.message")}
}
Oops, something went wrong.

0 comments on commit 1531b73

Please sign in to comment.