I'm trying to write a Jena rule whose antecedent matches a location where the network's bandwith is 450^^xsd:float. I've tried the following two rules. The first gives me no results. The second matches for the networks labeled Gate 23 and Gate 15, but only Gate 15 should match.
[AdaptedModel:
(?d2 rdf:type perSys:NetworkCharacteristics),
(?d2 perSys:Bandwidth '450'^^xsd:float)
(?d2 perSys:SpecificLocation ?a)
->
(?d2 perSys:AdaptedSpecificLocation ?a)]
[AdaptedModel:
(?d2 rdf:type perSys:NetworkCharacteristics),
(?d2 perSys:Bandwidth '450'^^xsd:float)
(?d3 perSys:SpecificLocation ?a)
->
(?d3 perSys:AdaptedSpecificLocation ?a)]
This is my RDF data:
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:perSys="http://localhost:8080/NetworkContextWS/onto/NetworkContextDescription#">
<perSys:PervasiveContext>
<perSys:HasNetworkContext>
<perSys:NetworkContext rdf:about="file:///home/taylorj/n1111">
<perSys:Rules>
<perSys:NetworkSecurity>
<perSys:NetworkSecurityState rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Open Network</perSys:NetworkSecurityState>
<perSys:NetworkKey rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>No Key</perSys:NetworkKey>
</perSys:NetworkSecurity>
</perSys:Rules>
<perSys:Network>
<perSys:NetworkCharacteristics>
<perSys:SubNetworkType rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>HSDPA</perSys:SubNetworkType>
<perSys:NetworkState rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>CONNECTED</perSys:NetworkState>
<perSys:Bandwidth rdf:datatype="http://www.w3.org/2001/XMLSchema#float"
>450</perSys:Bandwidth>
<perSys:LinkSpeed rdf:datatype="http://www.w3.org/2001/XMLSchema#float"
>65</perSys:LinkSpeed>
<perSys:NetworkAvailability rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Available</perSys:NetworkAvailability>
<perSys:NetworkName rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>AF23_WI-FI_9F1B</perSys:NetworkName>
</perSys:NetworkCharacteristics>
</perSys:Network>
<perSys:Network>
<perSys:NetworkTraficStats>
<perSys:NumberBytesReceived rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>15599522</perSys:NumberBytesReceived>
<perSys:NumberPacketsReceived rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>24922</perSys:NumberPacketsReceived>
<perSys:NumberBytesTransmited rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>4111415</perSys:NumberBytesTransmited>
<perSys:NumberPacketsTransmited rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>26455</perSys:NumberPacketsTransmited>
<perSys:NetworkUpload rdf:datatype="http://www.w3.org/2001/XMLSchema#float"
>0</perSys:NetworkUpload>
<perSys:NetworkType rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Connected</perSys:NetworkType>
<perSys:NetworkDownload rdf:datatype="http://www.w3.org/2001/XMLSchema#float"
>1</perSys:NetworkDownload>
<perSys:TotalData rdf:datatype="http://www.w3.org/2001/XMLSchema#float"
>1</perSys:TotalData>
</perSys:NetworkTraficStats>
</perSys:Network>
<perSys:Time>
<perSys:TimeCharacteristics>
<perSys:ConnexionTime rdf:datatype="http://www.w3.org/2001/XMLSchema#time"
>15:00:00</perSys:ConnexionTime>
<perSys:ConnexionDate rdf:datatype="http://www.w3.org/2001/XMLSchema#date"
>2015-02-06</perSys:ConnexionDate>
</perSys:TimeCharacteristics>
</perSys:Time>
<perSys:Preferences>
<perSys:PreferencesCharacteristics>
<perSys:PreferencesName rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>preferencesName</perSys:PreferencesName>
<perSys:PreferencesType rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>preferencesValue</perSys:PreferencesType>
</perSys:PreferencesCharacteristics>
</perSys:Preferences>
<perSys:Device>
<perSys:DeviceCharacteristics>
<perSys:DeviceName rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Bekri-Laptop</perSys:DeviceName>
<perSys:DeviceType rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Laptop</perSys:DeviceType>
</perSys:DeviceCharacteristics>
</perSys:Device>
<perSys:Location>
<perSys:LocationCharacteristics>
<perSys:SpecificLocation rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Gate 23</perSys:SpecificLocation>
<perSys:FeatureName rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Pittsburgh International Airport</perSys:FeatureName>
</perSys:LocationCharacteristics>
</perSys:Location>
</perSys:NetworkContext>
</perSys:HasNetworkContext>
<perSys:HasNetworkContext>
<perSys:NetworkContext rdf:about="file:///home/taylorj/lm333">
<perSys:Rules>
<perSys:NetworkSecurity>
<perSys:NetworkSecurityState rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Open Network</perSys:NetworkSecurityState>
<perSys:NetworkKey rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>No Key</perSys:NetworkKey>
</perSys:NetworkSecurity>
</perSys:Rules>
<perSys:Network>
<perSys:NetworkCharacteristics>
<perSys:SubNetworkType rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>HSDPA</perSys:SubNetworkType>
<perSys:NetworkState rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>CONNECTED</perSys:NetworkState>
<perSys:Bandwidth rdf:datatype="http://www.w3.org/2001/XMLSchema#float"
>256</perSys:Bandwidth>
<perSys:LinkSpeed rdf:datatype="http://www.w3.org/2001/XMLSchema#float"
>65</perSys:LinkSpeed>
<perSys:NetworkAvailability rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Available</perSys:NetworkAvailability>
<perSys:NetworkName rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>AF23_WI-FI_9F1B</perSys:NetworkName>
</perSys:NetworkCharacteristics>
</perSys:Network>
<perSys:Network>
<perSys:NetworkTraficStats>
<perSys:NumberBytesReceived rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>15599522</perSys:NumberBytesReceived>
<perSys:NumberPacketsReceived rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>24922</perSys:NumberPacketsReceived>
<perSys:NumberBytesTransmited rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>4111415</perSys:NumberBytesTransmited>
<perSys:NumberPacketsTransmited rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>26455</perSys:NumberPacketsTransmited>
<perSys:NetworkUpload rdf:datatype="http://www.w3.org/2001/XMLSchema#float"
>0</perSys:NetworkUpload>
<perSys:NetworkType rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Connected</perSys:NetworkType>
<perSys:NetworkDownload rdf:datatype="http://www.w3.org/2001/XMLSchema#float"
>1</perSys:NetworkDownload>
<perSys:TotalData rdf:datatype="http://www.w3.org/2001/XMLSchema#float"
>1</perSys:TotalData>
</perSys:NetworkTraficStats>
</perSys:Network>
<perSys:Time>
<perSys:TimeCharacteristics>
<perSys:ConnexionTime rdf:datatype="http://www.w3.org/2001/XMLSchema#time"
>15:00:00</perSys:ConnexionTime>
<perSys:ConnexionDate rdf:datatype="http://www.w3.org/2001/XMLSchema#date"
>2015-02-06</perSys:ConnexionDate>
</perSys:TimeCharacteristics>
</perSys:Time>
<perSys:Preferences>
<perSys:PreferencesCharacteristics>
<perSys:PreferencesName rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>preferencesName</perSys:PreferencesName>
<perSys:PreferencesType rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>preferencesValue</perSys:PreferencesType>
</perSys:PreferencesCharacteristics>
</perSys:Preferences>
<perSys:Device>
<perSys:DeviceCharacteristics>
<perSys:DeviceName rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Bekri-Laptop</perSys:DeviceName>
<perSys:DeviceType rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Laptop</perSys:DeviceType>
</perSys:DeviceCharacteristics>
</perSys:Device>
<perSys:Location>
<perSys:LocationCharacteristics>
<perSys:SpecificLocation rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Gate 15</perSys:SpecificLocation>
<perSys:FeatureName rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Pittsburgh International Airport</perSys:FeatureName>
</perSys:LocationCharacteristics>
</perSys:Location>
</perSys:NetworkContext>
</perSys:HasNetworkContext>
</perSys:PervasiveContext>
</rdf:RDF>