Parent: [ce0ef2] (diff)

Download this file

gestBarragens2sensorDSO.ttl    440 lines (352 with data), 12.7 kB

@prefix map: <http://www.opensourceprojects.eu/p/timbus/context-population/extractors/d2rq/ci/786382cb0ebe0c342d323178f0476125c8c44902/tree/mappings/gestBarragens2sensorDSO.ttl?format=raw#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
@prefix d2r: <http://sites.wiwiss.fu-berlin.de/suhl/bizer/d2r-server/config.rdf#> .
@prefix meta: <http://www4.wiwiss.fu-berlin.de/bizer/d2r-server/metadata#> .
@prefix jdbc: <http://d2rq.org/terms/jdbc/> .

@prefix sensor: <http://timbus.teco.edu/ontologies/DSOs/sensors.owl#> .

<> a d2r:Server;
  d2r:baseURI <http://timbus.teco.edu/sensors>;
  rdfs:label "Gest Barragens SensorDSO Instance";
  d2r:port 2020;
  d2r:vocabularyIncludeInstances true;
  
  d2r:sparqlTimeout 0;
  d2r:pageTimeout 0;

  meta:datasetTitle "WP8 Use Case Instance - Internal Use Only!";
  meta:datasetDescription "SensorDSO instance of LNEC Damn Management System" ;
  meta:datasetSource "Gest Barragens Oracle DB" ;
  
  meta:operatorName "TIMBUS Project" ;
  meta:operatorHomepage  "http://timbusproject.net/";
  .
 

map:database a d2rq:Database;
	d2rq:jdbcDriver "oracle.jdbc.driver.OracleDriver"; # database driver, e.g. jdbc for Oracle
	d2rq:jdbcDSN "jdbc:oracle:thin:@XXX/XXX"; # database host adress and service name
	d2rq:username "XXX"; # username
	d2rq:password "XXX"; # passwort
	jdbc:keepAlive "3600";			# sends noop-query every 3600 seconds
#	jdbc:keepAliveQuery "SELECT 1";		# optional custom noop-query
	.
 
 
# Table EXTRESISTENCIA
map:Sensor a d2rq:ClassMap;
	d2rq:dataStorage map:database;
	d2rq:uriPattern "Sensor/@@EXTRESISTENCIA.ID@@";
	d2rq:class sensor:Sensor;
	.
	
	
map:Sensor_ID a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Sensor;
	d2rq:property sensor:hasIdentifier;
	d2rq:column "EXTRESISTENCIA.ID";
	.	
	
	
map:Sensor_AcquisitionRatePerYear a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Sensor;
	d2rq:property sensor:hasAcquisitionRatePerYear;
	d2rq:column "EXTRESISTENCIA.FREQLEITURA";
	.

	
map:Sensor_Dam a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Sensor;
	d2rq:property sensor:hasLocation;
	d2rq:refersToClassMap map:Dam;
	d2rq:join "EXTRESISTENCIA.GRUPOID => EXTRESISTENCIAGRUPO.ID";
	d2rq:join "OBRA.ID <= EXTRESISTENCIAGRUPO.OBRA";
	.	

	
map:Sensor_GeoLocation a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Sensor;
	d2rq:property sensor:hasLocation;
	d2rq:refersToClassMap map:GeoLocation;
	d2rq:join "EXTRESISTENCIA.GRUPOID = EXTRESISTENCIAGRUPO.ID";
	.	


#map:Sensor_SensorType a d2rq:PropertyBridge;
#	d2rq:belongsToClassMap map:Sensor;
#	d2rq:property sensor:hasType;
#	d2rq:refersToClassMap map:SensorType;
#	d2rq:join "EXTRESISTENCIA => EXTRESISTENCIALEIT.INTRUMENTO";
#	d2rq:join "INSTRMETADATAEN.INTRUMENTO <= EXTRESISTENCIALEIT.INSTRFIXO";
#	.	


#todo: look for a way to create an inverse property for this
map:Sensor_Reading a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Sensor;
	d2rq:property sensor:hasReading;
	d2rq:refersToClassMap map:Readings;
	d2rq:join "EXTRESISTENCIALEIT.INSTRFIXO = EXTRESISTENCIA.ID";
	.
	

map:GeoLocation a d2rq:ClassMap;
	d2rq:dataStorage map:database;
	d2rq:uriPattern "GeoLocation/@@EXTRESISTENCIAGRUPO.ID@@/";
	d2rq:class sensor:GeoLocation;
	.

map:GeoLocation_Z a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:GeoLocation;
	d2rq:property sensor:hasZCoordinate;
	d2rq:column "EXTRESISTENCIAGRUPO.Z";	
	.
	
map:GeoLocation_Y a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:GeoLocation;
	d2rq:property sensor:hasYCoordinate;
	d2rq:column "EXTRESISTENCIAGRUPO.Y";	
	.
	
map:GeoLocation_X a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:GeoLocation;
	d2rq:property sensor:hasXCoordinate;
	d2rq:column "EXTRESISTENCIAGRUPO.X";	
	.
	
	

#Table INSTRMETADATAEN
#map:SensorType a d2rq:ClassMap;
#	d2rq:dataStorage map:database;
#	d2rq:uriPattern "SensorType/@@INSTRMETADATAEN.ID@@";
#	d2rq:class sensor:SensorType;
#	.

#map:SensorType_Name a d2rq:PropertyBridge;
#	d2rq:belongsToClassMap map:SensorType;
#	d2rq:property sensor:hasName;
#	d2rq:column "INSTRMETADATAEN.INSTRUMENTO";
#	.	
	

# Table "Quantity" ???

# QuantityType
map:QuantityType a d2rq:ClassMap;
	d2rq:dataStorage map:database;
	d2rq:uriPattern "QuantityType";
	d2rq:class sensor:QuantityType;
	.
	
# Unit
map:Unit a d2rq:ClassMap;
	d2rq:dataStorage map:database;
	d2rq:uriPattern "Unit";
	d2rq:class sensor:Unit;
	.
	
	
# Table LEITURA
map:Readings a d2rq:ClassMap;
	d2rq:dataStorage map:database;
	d2rq:uriPattern "Readings/@@EXTRESISTENCIALEIT.ID@@";
	d2rq:class sensor:Reading;
	.
	
map:Readings_ID a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Readings;
	d2rq:property sensor:hasIdentifier;
	d2rq:column "EXTRESISTENCIALEIT.ID";
	.
	
#map:Readings_Sensor a d2rq:PropertyBridge;
#	d2rq:belongsToClassMap map:Readings;
#	d2rq:property sensor:isReadingOf;
#	d2rq:refersToClassMap map:Sensor;
#	d2rq:join "EXTRESISTENCIALEIT.INSTRFIXO = EXTRESISTENCIA.ID";
#	.
	
map:Readings_Campaign a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Readings;
	d2rq:property sensor:hasCampaign;
	d2rq:refersToClassMap map:Campaign;
	d2rq:join "EXTRESISTENCIALEIT.CAMPANHA = CAMPANHAOBSERVACOES.ID";
	.
	
	
map:Readings_Date a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Readings;
	d2rq:property sensor:hasDate;
	d2rq:column "EXTRESISTENCIALEIT.DATALEIT";
	.

	
# RawReading	
map:RawReading a d2rq:ClassMap;
	d2rq:dataStorage map:database;
	d2rq:uriPattern "Readings/@@EXTRESISTENCIALEIT.ID@@/RawReading/";
	d2rq:class sensor:Quantity;
	.	

map:Reading_RawReading a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Readings;
	d2rq:property sensor:hasRawReading;
	d2rq:refersToClassMap map:RawReading;
	. 


# TotalResistance
map:TotalResistance a d2rq:ClassMap;
	d2rq:dataStorage map:database;
	d2rq:uriPattern "Readings/@@EXTRESISTENCIALEIT.ID@@/RawReading/TotalResistance";
	d2rq:class sensor:Quantity;
	.

map:RawReading_TotalResistance a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:RawReading;
	d2rq:property sensor:hasQuantity;
	d2rq:refersToClassMap map:TotalResistance;
	.	

  #assign a value to the TotalResistance
map:TotalResistance_Value a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:TotalResistance;
	d2rq:property sensor:hasValue;
	d2rq:column "EXTRESISTENCIALEIT.RESTOTAL";
	.

  #assign a QuantityType to the TotalResistance
map:TotalResistance_QuantityType a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:TotalResistance;
	d2rq:property sensor:hasQuantityType;
	d2rq:refersToClassMap map:TotalResistance_QuantityType_TotalResistance;
	.
	
	#assign TotalResistance_Quantity Type a real QuantityType
map:TotalResistance_QuantityType_TotalResistance a d2rq:ClassMap;
    d2rq:dataStorage map:database;
	d2rq:uriPattern "QuantityType/TotalResistance";
	d2rq:class sensor:QuantityType;
    d2rq:additionalProperty map:QuantityType_TotalResistance
	.

map:QuantityType_TotalResistance a d2rq:AdditionalProperty;
    d2rq:propertyName sensor:hasType;
    d2rq:propertyValue "TotalResistance"
	.
	
	
# RelativeResistence
map:RelativeResistence a d2rq:ClassMap;
	d2rq:dataStorage map:database;
	d2rq:uriPattern "Readings/@@EXTRESISTENCIALEIT.ID@@/RawReading/RelativeResistence";
	d2rq:class sensor:Quantity;
	.

map:RawReading_RelativeResistence a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:RawReading;
	d2rq:property sensor:hasQuantity;
	d2rq:refersToClassMap map:RelativeResistence;
	.	

  #assign a value to the RelativeResistence
map:RelativeResistence_Value a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:RelativeResistence;
	d2rq:property sensor:hasValue;
	d2rq:column "EXTRESISTENCIALEIT.RELRES";
	.

  #assign a QuantityType to the RelativeResistence
map:RelativeResistance_QuantityType a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:RelativeResistence;
	d2rq:property sensor:hasQuantityType;
	d2rq:refersToClassMap map:QuantityType;
	.
	
	
  #assign RelativeResistance_Quantity Type a real QuantityType
map:RelativeResistance_QuantityType_RelativeResistance a d2rq:ClassMap;
    d2rq:dataStorage map:database;
	d2rq:uriPattern "QuantityType/RelativeResistance";
	d2rq:class sensor:QuantityType;
    d2rq:additionalProperty map:QuantityType_RelativeResistance
	.

map:QuantityType_RelativeResistance a d2rq:AdditionalProperty;
    d2rq:propertyName sensor:hasType;
    d2rq:propertyValue "RelativeResistance"
	.
	

#Result	
map:Result a d2rq:ClassMap;
	d2rq:dataStorage map:database;
	d2rq:uriPattern "Readings/@@EXTRESISTENCIALEIT.ID@@/Result/";
	d2rq:class sensor:Quantity;
	.	

map:Readings_Result a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Readings;
	d2rq:property sensor:hasResult;
	d2rq:refersToClassMap map:Result;
	d2rq:join "EXTRESISTENCIALEIT.ID = EXTRESISTENCIARES.LEITURA";
	.

# Temperature
map:Temperature a d2rq:ClassMap;
	d2rq:dataStorage map:database;
	d2rq:uriPattern "Readings/@@EXTRESISTENCIALEIT.ID@@/Result/Temperature";
	d2rq:class sensor:Quantity;
	.

map:Result_Temperature a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Result;
	d2rq:property sensor:hasQuantity;
	d2rq:refersToClassMap map:Temperature;
	.	

  #assign a value to the Temperature
map:Temperature_Value a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Temperature;
	d2rq:property sensor:hasValue;
	d2rq:column "EXTRESISTENCIARES.TEMPERATURA";
	.
	
map:Temperature_Value a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Temperature;
	d2rq:property sensor:hasValue;
	d2rq:join "EXTRESISTENCIALEIT.ID = EXTRESISTENCIARES.LEITURA";
	d2rq:column "EXTRESISTENCIARES.TEMPERATURA";	
	.	
	

  #assign a QuantityType to the Temperature
map:Temperature_QuantityType a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Temperature;
	d2rq:property sensor:hasQuantityType;
	d2rq:refersToClassMap map:Temperature_QuantityType_Temperature;
	.

  #assign Temperature_Quantity Type a real QuantityType
map:Temperature_QuantityType_Temperature a d2rq:ClassMap;
    d2rq:dataStorage map:database;
	d2rq:uriPattern "QuantityType/Temperature";
	d2rq:class sensor:QuantityType;
    d2rq:additionalProperty map:QuantityType_Temperature 
	.

map:QuantityType_Temperature a d2rq:AdditionalProperty;
    d2rq:propertyName sensor:hasType;
    d2rq:propertyValue "Temperature"
	.
	
	
# Extension
map:Extension a d2rq:ClassMap;
	d2rq:dataStorage map:database;
	d2rq:uriPattern "Readings/@@EXTRESISTENCIALEIT.ID@@/Result/Extension";
	d2rq:class sensor:Quantity;
	.

map:Result_Extension a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Result;
	d2rq:property sensor:hasQuantity;
	d2rq:refersToClassMap map:Extension;
	.	

  #assign a value to the Extension
map:Extension_Value a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Extension;
	d2rq:property sensor:hasValue;
	d2rq:join "EXTRESISTENCIALEIT.ID = EXTRESISTENCIARES.LEITURA";
	d2rq:column "EXTRESISTENCIARES.EXTREAL";
	.

  #assign a QuantityType to the Extension
map:Extension_QuantityType a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Extension;
	d2rq:property sensor:hasQuantityType;
	d2rq:refersToClassMap map:Extension_QuantityType_Extension;
	.

  #assign Extension_Quantity Type a real QuantityType
map:Extension_QuantityType_Extension a d2rq:ClassMap;
    d2rq:dataStorage map:database;
	d2rq:uriPattern "QuantityType/Extension";
	d2rq:class sensor:QuantityType;
    d2rq:additionalProperty map:QuantityType_Extension 
	.

map:QuantityType_Extension a d2rq:AdditionalProperty;
    d2rq:propertyName sensor:hasType;
    d2rq:propertyValue "Extension"
	.

# Table OBRA
map:Dam a d2rq:ClassMap;
	d2rq:dataStorage map:database;
	d2rq:uriPattern "Dam/@@OBRA.ID@@";
	d2rq:class sensor:StructuralLocation;
	.

map:Dam_ID a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Dam;
	d2rq:property sensor:hasIdentifier;
	d2rq:column "OBRA.ID";
	.

map:Dam_Name a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Dam;
	d2rq:property sensor:hasName;
	d2rq:column "OBRA.NOME";
	.

	
	
# Table CAMPANHA
map:Campaign a d2rq:ClassMap;
	d2rq:dataStorage map:database;
	d2rq:uriPattern "Campaign/@@CAMPANHAOBSERVACOES.ID@@";
	d2rq:class sensor:Campaign;
	.
	
map:Campaign_ID a d2rq:PropertyBridge;
	d2rq:belongsToClassMap map:Campaign;
	d2rq:property sensor:hasIdentifier;
	d2rq:column "CAMPANHAOBSERVACOES.ID";
	.
	
#map:Campaign_Dam a d2rq:PropertyBridge;
#	d2rq:belongsToClassMap map:Campaign;
#	d2rq:property sensor:isPartOfStructure;
#	d2rq:refersToClassMap map:Dam;
#	d2rq:join "CAMPANHAOBSERVACOES.IDOBRA = OBRA.ID";
#	.
	
#map:Campaign_StartDate a d2rq:PropertyBridge;
#	d2rq:belongsToClassMap map:Campaign;
#	d2rq:property sensor:hasDate;
#	d2rq:column "CAMPANHAOBSERVACOES.DATAINICIO";
#	.
	
#map:Campaign_EndDate a d2rq:PropertyBridge;
#	d2rq:belongsToClassMap map:Campaign;
#	d2rq:property sensor:hasDate;
#	d2rq:column "CAMPANHAOBSERVACOES.DATAFIM";
#	.