Commit e9931d64 authored by akucera's avatar akucera
Browse files

just cleanup of the git staging window

parent 1bda97c2
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
[CmdletBinding()]
Param([String]$Csv="rooms.csv")
. ((split-path -parent $MyInvocation.MyCommand.Definition) + "\Namespaces.ps1")

import-csv -Delimiter ";" $Csv | Select-Object site, building -Unique | ForEach-Object {
  ($pref["sbmsd"] + $_.building + "> " + $pref["rdf"] + "type" + "> " + $pref["sbim"] + "Building" + "> .")
  #($pref["sbmsd"] + $_.building + "> " + $pref["rdf"]+ "type" + "> " + $pref["owl"] + "NamedIndividual" + "> .")
  ($pref["sbmsd"] + $_.building + "> " + $pref["sbim"]+ "hasBIMId" + "> " + "`"" + $_.building + "`"" + " .")
  ($pref["sbmsd"] + $_.building + "> " + $pref["sbim"] + "isBuildingOf" + "> " + $pref["sbmsd"] + $_.site + "> .")
  ($pref["sbmsd"] + $_.site + "> " + $pref["sbim"] + "hasBuilding" + "> " + $pref["sbmsd"] + $_.building + "> .")    
}
+0 −30
Original line number Diff line number Diff line
[CmdletBinding()]
Param([String]$Csv="datapoints.csv")
. ((split-path -parent $MyInvocation.MyCommand.Definition) + "\Namespaces.ps1")

import-csv -Delimiter ";" $Csv | ForEach-Object {
  $dpId=  $dpId= "DataPoint" + $_.dpId.Replace("/","-").Replace(".","-").Replace(":","-")
  $obsId =  $dpId + "Obs"
  ($pref["sbmsd"] + $dpId + "> " + $pref["rdf"] + "type" + "> " + $pref["sbms"] + $_.dpType + "> .")
  ($pref["sbmsd"] + $obsId + "> " + $pref["rdf"] + "type" + "> " + $pref["sbms"] + "Observation> .")
  ($pref["sbmsd"] + $dpId + "> " + $pref["sbms"]+ "hasBMSId" + "> " + "`"" + $_.dpId + "`"" + " .")
  ($pref["sbmsd"] + $dpId + "> " + $pref["sbms"]+ "expressesObservation" + "> " + $pref["sbmsd"] + $obsId + "> .")
  ($pref["sbmsd"] + $dpId + "> " + $pref["sbms"]+ "publishedByDevice" + "> " + $pref["sbmsd"] + $_.publisher + "> .")
   $opId =  $_.scope + $_.propDomain + $_.propQuality + "ObsProp"
  ($pref["sbmsd"] + $opId + "> " + $pref["rdf"] + "type" + "> " + $pref["sbms"] + "ObservedProperty> .")
  ($pref["sbmsd"] + $opId + "> " + $pref["sbms"]+ "hasPhysicalQuality" + "> " + $pref["ucum"] + $_.propQuality + "> .")
  ($pref["sbmsd"] + $opId + "> " + $pref["sbms"]+ "hasPropertyDomain" + "> " + $pref["sbms"] + $_.propDomain + "> .")
  ($pref["sbmsd"] + $opId + "> " + $pref["sbms"]+ "isPropertyOf" + "> " + $pref["sbmsd"] + $_.scope + "> .")
  
  ($pref["sbmsd"] + $obsId + "> " + $pref["sbms"]+ "observedProperty" + "> " + $pref["sbmsd"] + $opId + "> .")
  ($pref["sbmsd"] + $obsId + "> " + $pref["sbms"]+ "observedBy" + "> " + $pref["sbmsd"] + $_.source + "> .")
  ($pref["sbmsd"] + $obsId + "> " + $pref["sbms"]+ "featureOfInterest" + "> " + $pref["sbmsd"] + $_.scope + "> .")
   $sensingId =  $dpId + "Sensing"
   ($pref["sbmsd"] + $sensingId + "> " + $pref["rdf"] + "type" + "> " + $pref["sbms"] + $_.sensingType + "> .")
   if($_.sensingWindow -ne "") {
    ($pref["sbmsd"] + $sensingId + "> " + $pref["sbms"]+ "hasAggregationTimeWindow" + "> " + $pref["sbmsd"] + $_.sensingWindow + "> .")
   }
  ($pref["sbmsd"] + $obsId + "> " + $pref["sbms"]+ "sensingMethodUsed" + "> " + $pref["sbmsd"] + $sensingId + "> .")
  
  ($pref["sbmsd"] + $dpId + "> " + $pref["rdfs"] + "label" + "> " + "`"" + [System.Security.SecurityElement]::Escape($_.name) + "`"" + " .")    
}
+0 −11
Original line number Diff line number Diff line
[CmdletBinding()]
Param([String]$Csv="devices.csv")
. ((split-path -parent $MyInvocation.MyCommand.Definition) + "\Namespaces.ps1")

import-csv -Delimiter ";" $Csv | ForEach-Object {
  ($pref["sbmsd"] + $_.bimId + "> " + $pref["rdf"] + "type" + "> " + $pref["sbim"] + $_.devType + "> .")
  ($pref["sbmsd"] + $_.bimId + "> " + $pref["sbim"]+ "hasBIMId" + "> " + "`"" + $_.bimId + "`"" + " .")
  ($pref["sbmsd"] + $_.bimId + "> " + $pref["sbim"] + "hasInstallationInRoom" + "> " + $pref["sbmsd"] + $_.room + "> .")
  ($pref["sbmsd"] + $_.room + "> " + $pref["sbim"] + "isInstallationLocationOfDevice" + "> " + $pref["sbmsd"] + $_.bimId + "> .")
  ($pref["sbmsd"] + $_.bimId + "> " + $pref["rdfs"] + "label" + "> " + "`"" + [System.Security.SecurityElement]::Escape($_.name) + "`"" + " .")    
}
+0 −11
Original line number Diff line number Diff line
[CmdletBinding()]
Param([String]$Csv="rooms.csv")
. ((split-path -parent $MyInvocation.MyCommand.Definition) + "\Namespaces.ps1")

import-csv -Delimiter ";" $Csv | Select-Object building, floor -Unique | ForEach-Object {
  ($pref["sbmsd"] + $_.floor + "> " + $pref["rdf"] + "type" + "> " + $pref["sbim"] + "Floor" + "> .")
  #($pref["sbmsd"] + $_.floor + "> " + $pref["rdf"]+ "type" + "> " + $pref["owl"] + "NamedIndividual" + "> .")
  ($pref["sbmsd"] + $_.floor + "> " + $pref["sbim"]+ "hasBIMId" + "> " + "`"" + $_.floor + "`"" + " .")
  ($pref["sbmsd"] + $_.floor + "> " + $pref["sbim"] + "isFloorOf" + "> " + $pref["sbmsd"] + $_.building + "> .")
  ($pref["sbmsd"] + $_.building + "> " + $pref["sbim"] + "hasFloor" + "> " + $pref["sbmsd"] + $_.floor + "> .")    
}
+0 −11
Original line number Diff line number Diff line
[CmdletBinding()]
Param([String]$Csv="rooms.csv")
. ((split-path -parent $MyInvocation.MyCommand.Definition) + "\Namespaces.ps1")

import-csv -Delimiter ";" $Csv | ForEach-Object {
  ($pref["sbmsd"] + $_.room + "> " + $pref["rdf"] + "type" + "> " + $pref["sbim"] + "Room" + "> .")
  #($pref["sbmsd"] + $_.room + "> " + $pref["rdf"]+ "type" + "> " + $pref["owl"] + "NamedIndividual" + "> .")
  ($pref["sbmsd"] + $_.room + "> " + $pref["sbim"]+ "hasBIMId" + "> " + "`"" + $_.room + "`"" + " .")
  ($pref["sbmsd"] + $_.room + "> " + $pref["sbim"] + "isRoomOf" + "> " + $pref["sbmsd"] + $_.floor + "> .")
  ($pref["sbmsd"] + $_.floor + "> " + $pref["sbim"] + "hasRoom" + "> " + $pref["sbmsd"] + $_.room + "> .")    
}
Loading