Initial commit

This commit is contained in:
Nicolas Seydoux 2018-11-23 16:25:53 +01:00
parent 8b54bf08ea
commit da754ffdd1
21 changed files with 6370 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
target/*

3450
ontologies/DUL.owl Normal file

File diff suppressed because it is too large Load diff

1090
ontologies/ssn.owl Normal file

File diff suppressed because it is too large Load diff

58
pom.xml Normal file
View file

@ -0,0 +1,58 @@
<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>
<groupId>fr.insa.iss</groupId>
<artifactId>semantic</artifactId>
<version>0.0.1-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>jena-tdb</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>jena-core</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>jena-base</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>jena-arq</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.json</artifactId>
<version>1.0.4</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>fr.irit.melodi.semantic-web</groupId>
<artifactId>sparql-lib</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
</project>

View file

@ -0,0 +1,73 @@
package semantic.controler;
import java.io.IOException;
import java.util.List;
import semantic.model.DoItYourselfModel;
import semantic.model.IModelFunctions;
import semantic.model.ObservationEntity;
import semantic.model.SemanticModel;
import semantic.view.JSONEndpoint;
public class Controler
{
private SemanticModel model;
private IModelFunctions customModel;
private IControlFunctions customControl;
public Controler()
{
// TODO : Change the path to the one to your own ontology
this.model = new SemanticModel("tp-iss.ttl");
this.customModel = new DoItYourselfModel(this.model);
this.customControl = new DoItYourselfControl(this.model, this.customModel);
this.initializeContext();
}
private void initializeContext()
{
this.customModel.createPlace("Aarhus");
}
public void exportModel(String path)
{
this.model.exportModel(path);
}
public SemanticModel getModel()
{
return this.model;
}
public IModelFunctions getCustomModel()
{
return this.customModel;
}
public IControlFunctions getCustomControl()
{
return this.customControl;
}
public static void main(String[] args)
{
Controler c = new Controler();
try
{
// TODO : Change the path to the one of the file you downloaded
List<ObservationEntity> obsList = JSONEndpoint.parseObservations("tempm.txt");
String tempURI = c.model.getEntityURI("Température").get(0);
c.getCustomControl().instantiateObservations(obsList, tempURI);
// TODO : Same thing, for humidity
obsList = JSONEndpoint.parseObservations("tempm.txt");
String humidityURI = c.model.getEntityURI("Température").get(0);
c.getCustomControl().instantiateObservations(obsList, humidityURI);
// TODO : Change the path so that it points where you want the export to be done
c.exportModel("export.ttl");
}
catch (IOException e)
{
e.printStackTrace();
}
}
}

View file

@ -0,0 +1,25 @@
package semantic.controler;
import java.util.List;
import semantic.model.IConvenienceInterface;
import semantic.model.IModelFunctions;
import semantic.model.ObservationEntity;
public class DoItYourselfControl implements IControlFunctions
{
private IConvenienceInterface model;
private IModelFunctions cusotmModel;
public DoItYourselfControl(IConvenienceInterface model, IModelFunctions customModel)
{
this.model = model;
this.cusotmModel = customModel;
}
@Override
public void instantiateObservations(List<ObservationEntity> obsList,
String paramURI) {
// TODO Auto-generated method stub
}
}

View file

@ -0,0 +1,16 @@
package semantic.controler;
import java.util.List;
import semantic.model.ObservationEntity;
public interface IControlFunctions
{
/**
* This function parses the list of observations extracted from the dataset,
* and instanciates them in the knowledge base.
* @param obsList
* @param phenomenonURI
*/
public void instantiateObservations(List<ObservationEntity> obsList, String phenomenonURI);
}

View file

@ -0,0 +1,41 @@
package semantic.model;
public class DoItYourselfModel implements IModelFunctions
{
IConvenienceInterface model;
public DoItYourselfModel(IConvenienceInterface m) {
this.model = m;
}
@Override
public String createPlace(String name) {
// TODO Auto-generated method stub
return null;
}
@Override
public String createInstant(TimestampEntity instant) {
// TODO Auto-generated method stub
return null;
}
@Override
public String getInstantURI(TimestampEntity instant) {
// TODO Auto-generated method stub
return null;
}
@Override
public String getInstantTimestamp(String instantURI)
{
// TODO Auto-generated method stub
return null;
}
@Override
public String createObs(String value, String paramURI, String instantURI) {
// TODO Auto-generated method stub
return null;
}
}

View file

@ -0,0 +1,106 @@
package semantic.model;
import java.util.List;
/**
* Provides all the functions you should need in the scope of this lab
*/
public interface IConvenienceInterface
{
/**
* There are multiple temperature sensors on the platform. This method indicates
* which one performed a measure based on its timestamp.
* @param obs, useful to get the timestamp
* @param paramURI, the URI of the observed parameter
* @return the URI of the sensor having performed the measure.
*/
public String whichSensorDidIt(String timestamp, String paramURI);
/**
* Specify, for a given observation, that it came from the provided sensor.
* @param obsURI
* @param sensorURI
*/
public void addObservationToSensor(String obsURI, String sensorURI);
/**
* @param obsURI
* @param sensorURI
* @return true if the observation is linked to the sensor. Useful for test purpose mainly.
*/
public boolean hasSensorDoneIt(String obsURI, String sensorURI);
/**
* @param label
* @return all the URIs of instances of the class of concepts associated to this label.
*/
public List<String> getInstancesURI(String classURI);
/**
* @param label
* @return the URI of the classes associated to this label
*/
public List<String> getEntityURI(String label);
/**
* Tests whether the provided instance is a subclass (recursively) of the provided type.
* It means that this function will always return true if the type is owl:Thing.
* @param instanceURI
* @param typeURI
* @return
*/
public boolean isOfType(String instanceURI, String typeURI);
/**
* Creates an instance of the provided type, with the provided label.
* @param label
* @param the URI of the type
* @return the URI of the created individual
*/
public String createInstance(String label, String type);
/**
* Adds a triple in the knowledge base <subject, property, object>
* @param subjectURI
* @param propertyURI
* @param objectURI
*/
public void addObjectPropertyToIndividual(String subjectURI, String propertyURI, String objectURI);
/**
* Adds a triple in the knowledge base <subject, property, data>
* @param subjectURI
* @param propertyURI
* @param data
*/
public void addDataPropertyToIndividual(String subjectURI, String propertyURI, String data);
/**
* Generates a .ttl file containing a serialization of the model.
* @param path
*/
public void exportModel(String path);
/**
* @param subjectURI
* @param dataPropertyURI
* @param dataValue
* @return if provided subject has a certain value for provided property
*/
public boolean hasDataPropertyValue(String subjectURI, String dataPropertyURI, String dataValue);
/**
* @param subjectURI
* @param propertyURI
* @param objectURI
* @return if provided subject has a certain relationship with another entity
*/
public boolean hasObjectProperty(String subjectURI, String propertyURI, String objectURI);
/**
* @param entityURI
* @return a list of the labels of the entity
*/
public List<String> listLabels(String entityURI);
/**
* @param entityURI
* @return A list of couples <property, object>
*/
public List<List<String>> listProperties(String entityURI);
}

View file

@ -0,0 +1,47 @@
package semantic.model;
/**
* This is the list of functions you have to implement.
*/
public interface IModelFunctions
{
/**
* Creates an instance of the class "Lieu" of your ontology
* @param name
* @return the URI of the instance
*/
public String createPlace(String name);
/**
* Creates an instance of the "Instant" class of your ontology. You'll have to link it to
* a data property that represents the timestamp, serialized as it is in the original data file.
* Only one instance should be created for each actual timestamp.
* @param instant
* @return the URI of the created instant, null if it already existed
*/
public String createInstant(TimestampEntity instant);
/**
* Returns the instant with the provided timestamp if it exists.
* @param instant
* @return the URI of the representation of the instant, null otherwise.
*/
public String getInstantURI(TimestampEntity instant);
/**
* @param instantURI
* @return the value of the timestamp associated to the instant individual, null if the individual doesn't exist
*/
public String getInstantTimestamp(String instantURI);
/**
* Creates an Observation of the provided value for the provided parameter
* at the provided time. It uses both object and data properties from the ontology
* to link the observation to its value, instant, and parameter.
* @param value
* @param param
* @param instantURI
* @return the URI of the created observation
*/
public String createObs(String value, String paramURI, String instantURI);
}

View file

@ -0,0 +1,37 @@
package semantic.model;
public class ObservationEntity
{
private Float value;
private TimestampEntity timestamp;
public ObservationEntity(Float value, TimestampEntity timestamp)
{
this.value = value;
this.timestamp = timestamp;
}
public Float getValue()
{
return value;
}
public void setValue(Float value)
{
this.value = value;
}
public TimestampEntity getTimestamp()
{
return timestamp;
}
public void setTimestamp(TimestampEntity timestamp)
{
this.timestamp = timestamp;
}
public String toString()
{
return "Observation entity : "+value+" at "+timestamp.getTimeStamp();
}
}

View file

@ -0,0 +1,557 @@
package semantic.model;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.AbstractMap;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.Set;
import java.util.Map.Entry;
import org.apache.jena.query.Dataset;
import org.apache.jena.query.DatasetFactory;
import org.apache.jena.query.Query;
import org.apache.jena.query.QueryExecution;
import org.apache.jena.query.QueryExecutionFactory;
import org.apache.jena.query.QueryFactory;
import org.apache.jena.query.QuerySolution;
import org.apache.jena.query.ReadWrite;
import org.apache.jena.query.ResultSet;
import org.apache.jena.rdf.model.Model;
import org.apache.jena.rdf.model.ModelFactory;
import org.apache.jena.rdf.model.RDFNode;
import org.apache.jena.rdf.model.Statement;
import org.apache.jena.rdf.model.StmtIterator;
import org.apache.jena.sparql.core.DatasetGraph;
import org.apache.jena.sparql.core.DatasetGraphFactory;
import org.apache.jena.update.UpdateAction;
import fr.irit.melodi.sparql.query.ask.SparqlAsk;
import fr.irit.melodi.sparql.query.dataquery.insert.SparqlInsertData;
import fr.irit.melodi.sparql.query.dataquery.insert.SparqlInsertWhere;
import fr.irit.melodi.sparql.query.select.SparqlSelect;
public class SemanticModel implements IConvenienceInterface
{
public final static String SSN = "http://purl.oclc.org/NET/ssnx/ssn#";
public final static String SAREF = "http://ontology.tno.nl/saref#";
public final static String SAN = "http://www.irit.fr/recherches/MELODI/ontologies/SAN.owl#";
public final static String IOT_O = "http://www.irit.fr/recherches/MELODI/ontologies/IoT-O.owl#";
public final static String ADREAM = "http://pelican/adreamdata#";
public final static String BASE = "http://tp.5iss.fr#";
// Separating prefixes into several lists lightens requests
public static Set<Entry<String, String>> IOT_PREFIXES;
public static Set<Entry<String, String>> SERVICES_PREFIXES;
public static Set<Entry<String, String>> ALL_PREFIXES;
public static Map<String, String> FEATURES;
static
{
Set<Entry<String, String>> tmp1 = new HashSet<Map.Entry<String,String>>();
tmp1.add(new AbstractMap.SimpleEntry<String, String>( "iot-o","<"+IOT_O+">"));
tmp1.add(new AbstractMap.SimpleEntry<String, String>("ssn","<"+SSN+">"));
tmp1.add(new AbstractMap.SimpleEntry<String, String>("DUL",
"<http://www.loa-cnr.it/ontologies/DUL.owl#>"));
tmp1.add(new AbstractMap.SimpleEntry<String, String>("san",
"<http://www.irit.fr/recherches/MELODI/ontologies/SAN.owl#>"));
tmp1.add(new AbstractMap.SimpleEntry<String, String>("lifecycle",
"<http://purl.org/vocab/lifecycle/schema#>"));
tmp1.add(new AbstractMap.SimpleEntry<String, String>("adream", "<"+ADREAM+">"));
IOT_PREFIXES = Collections.unmodifiableSet(tmp1);
Set<Entry<String, String>> tmp2 = new HashSet<Map.Entry<String,String>>();
tmp2.add(new AbstractMap.SimpleEntry<String, String>("wsmo-lite",
"<http://www.wsmo.org/ns/wsmo-lite#>"));
tmp2.add(new AbstractMap.SimpleEntry<String, String>("msm",
"<http://iserve.kmi.open.ac.uk/ns/msm#>"));
tmp2.add(new AbstractMap.SimpleEntry<String, String>("hrests",
"<http://www.wsmo.org/ns/hrests#>"));
SERVICES_PREFIXES = Collections.unmodifiableSet(tmp2);
Set<Entry<String, String>> tmp3 = new HashSet<Map.Entry<String,String>>();
tmp3.addAll(tmp1);
tmp3.addAll(tmp2);
ALL_PREFIXES = Collections.unmodifiableSet(tmp3);
Map<String, String> tmp4 = new HashMap<String, String>();
tmp4.put("Temperature","http://qudt.org/vocab/quantity#ThermodynamicTemperature");
tmp4.put("Light","http://qudt.org/vocab/quantity#LuminousIntensity");
FEATURES = Collections.unmodifiableMap(tmp4);
}
private Model model;
private Dataset dataset;
private DatasetGraph dsg;
private String temperatureSensor1URI;
private String temperatureSensor2URI;
private String temperatureSensor3URI;
private String humiditySensor1URI;
private String temperatureURI;
private String humidityURI;
/**
* Creates an empty model (for test purpose mainly)
*/
public SemanticModel()
{
this.dsg = DatasetGraphFactory.create();
this.dataset = DatasetFactory.wrap(dsg);
this.model = this.dataset.getDefaultModel();
}
/**
* Creates a model already loaded with triples issued from
* the provided ontology, as well as another knowledge base
* describing sensors and their ranges.
* @param ontologyPath
*/
public SemanticModel(String ontologyPath)
{
this.dsg = DatasetGraphFactory.create();
this.dataset = DatasetFactory.wrap(dsg);
this.model = this.dataset.getDefaultModel();
this.loadFromFile("./tp2_sensors.rdf", "", "RDF/XML", true);
this.loadFromFile(ontologyPath, "", "TURTLE", true);
// Computation of URI that will be needed often, to limit frequent requests
this.temperatureSensor1URI = this.getEntityURI("TemperatureSensor_1").get(0);
this.temperatureSensor2URI = this.getEntityURI("TemperatureSensor_2").get(0);
this.temperatureSensor3URI = this.getEntityURI("TemperatureSensor_3").get(0);
this.temperatureURI = this.getEntityURI("Température").get(0);
this.humidityURI = this.getEntityURI("Hygrométrie").get(0);
}
public void beginWriteTransaction()
{
this.dataset.begin(ReadWrite.WRITE);
}
public void endTransaction()
{
this.dataset.end();
this.dataset.begin(ReadWrite.READ);
this.model = this.dataset.getDefaultModel();
this.dataset.end();
}
void updateDataset(String queryString)
{
UpdateAction.parseExecute(queryString, this.dsg);
}
public void commitDataset()
{
this.dataset.commit();
}
public void updateModel()
{
this.dataset.begin(ReadWrite.READ);
this.model = this.dataset.getDefaultModel();
this.dataset.end();
}
public Model getModel()
{
return this.model;
}
public static String formatURIForSparql(String uri)
{
if(uri.startsWith("http"))
{
return "<"+uri+">";
}
return uri;
}
public static List<Map<String, String>> queryModel(String queryString, Model m)
{
List<Map<String, String>> resultList = new ArrayList<Map<String, String>>();
Query query = QueryFactory.create(queryString) ;
try (QueryExecution qexec = QueryExecutionFactory.create(query, m))
{
ResultSet results = qexec.execSelect();
while (results.hasNext())
{
QuerySolution soln = results.next();
resultList.add(new HashMap<String, String>());
List<String> varNameTestList = new ArrayList<String>();
Iterator<String> querySolutionVariables = soln.varNames();
while(querySolutionVariables.hasNext())
{
varNameTestList.add(querySolutionVariables.next());
}
// On va ajouter pour chaque résultat une map contenant les noms de variables et leurs valeurs
for(String varName : varNameTestList)
{
RDFNode x = soln.get(varName); // Get a result variable by name.
resultList.get(resultList.size()-1).put(varName, x.toString());
}
}
return resultList;
}
catch (Exception e)
{
e.printStackTrace();
return null;
}
}
public List<Map<String, String>> processReadQuery(String queryString)
{
return queryModel(queryString, this.model);
}
public boolean processWriteQuery(String query)
{
try
{
// this.beginWriteTransaction();
this.updateDataset(query);
// this.commitDataset();
// this.endTransaction();
return true;
}
catch(Exception e)
{
e.printStackTrace();
// this.endTransaction();
return false;
}
}
public boolean askDataset(String queryString)
{
Query query = QueryFactory.create(queryString) ;
QueryExecution qexec = QueryExecutionFactory.create(query, model) ;
boolean result = qexec.execAsk() ;
qexec.close() ;
return result;
}
private String createSparqlDataFromStatement(Statement s, boolean acceptObjectProperties)
{
String subject = null;
String predicate = null;
String object = null;
if(s.getSubject().toString().startsWith("http"))
{
subject = "<"+s.getSubject().toString()+">";
}
if(s.getPredicate().toString().startsWith("http"))
{
predicate = "<"+s.getPredicate().toString()+">";
}
if((s.getObject().toString().startsWith("http") && !s.getObject().toString().contains("skos")))
{
object = "<"+s.getObject().toString()+">";
}
// FIXME find why object properties mess it up -> temporary fix, can be activated for safe files
else if (acceptObjectProperties)
{
// In this case, object is a data and not a resource
object = "\""+s.getObject().toString()+"\"";
}
if(subject != null && predicate != null && object != null)
{
return subject+" "+predicate+" "+object+".\n";
}
else
{
return null;
}
}
void writeFromModel(Model m, boolean acceptObjectProperties)
{
StmtIterator i = m.listStatements();
String data = "";
while(i.hasNext())
{
Statement s = i.next();
String dataInstance = this.createSparqlDataFromStatement(s, acceptObjectProperties);
if(dataInstance != null)
{
data+=dataInstance;
}
}
// No need for prefixes, they are resolved in the model
SparqlInsertData s = new SparqlInsertData(null, data);
if(!this.processWriteQuery(s.toString()))
{
System.out.println("writeFomModel failed for model "+m);
}
}
void loadFromFile(String path, String base, String lang, boolean supportObjectProperties)
{
Model tmpModel = ModelFactory.createDefaultModel();
FileReader f = null;
try
{
f = new FileReader(new File(path));
}
catch (FileNotFoundException e)
{
e.printStackTrace();
}
tmpModel.read(f, base, lang);
this.writeFromModel(tmpModel, supportObjectProperties);
}
@Override
public String whichSensorDidIt(String timestamp, String paramURI)
{
TimestampEntity t = new TimestampEntity(timestamp);
if(paramURI.equals(this.temperatureURI))
{
// Pour une raison qui leur est propre, les capteurs de température de
// la station font les 3*8. Le taylorisme est passé par .
if(t.getHour()>=5 && t.getHour()<13)
{
return this.temperatureSensor1URI;
}
else if(t.getHour()>=13 && t.getHour()<21)
{
return this.temperatureSensor2URI;
}
else
{
return this.temperatureSensor3URI;
}
}
else if(paramURI.equals(this.humidityURI))
{
return this.humiditySensor1URI;
}
else
{
return null;
}
}
public boolean URIExists(String URI)
{
URI = SemanticModel.formatURIForSparql(URI);
SparqlAsk q = new SparqlAsk(SemanticModel.IOT_PREFIXES, URI+" ?p ?o");
return this.askDataset(q.toString());
}
@Override
public void addObservationToSensor(String obsURI, String sensorURI)
{
obsURI = SemanticModel.formatURIForSparql(obsURI);
sensorURI = SemanticModel.formatURIForSparql(sensorURI);
String insert = "?output ssn:hasValue "+obsURI;
String where = "?output ssn:isProducedBy "+sensorURI;
SparqlInsertWhere q = new SparqlInsertWhere(SemanticModel.IOT_PREFIXES, insert, where);
this.processWriteQuery(q.toString());
}
@Override
public List<String> getInstancesURI(String classURI)
{
classURI = SemanticModel.formatURIForSparql(classURI);
List<String> instances = new ArrayList<String>();
String select = "?s";
String where = "?s rdf:type/rdfs:subClassOf* "+classURI+".";
SparqlSelect q = new SparqlSelect(select, where);
List<Map<String, String>> qResult = this.processReadQuery(q.toString());
if(qResult.size() == 0)
{
System.out.println("Aucun élément de l'ontologie n'instancie la classe "+classURI);
}
for(Map<String, String> answer : qResult)
{
instances.add(answer.get("s"));
}
return instances;
}
@Override
public boolean isOfType(String conceptURI, String typeURI)
{
String formattedConceptURI = formatURIForSparql(conceptURI);
String formattedTypeURI = formatURIForSparql(typeURI);
SparqlAsk sa = new SparqlAsk(IOT_PREFIXES, formattedConceptURI+" rdf:type/(rdfs:subClassOf|owl:sameAs)* "+formattedTypeURI+".");
return this.askDataset(sa.toString());
}
@Override
public String createInstance(String label, String type) {
long id = new Random().nextLong();
while(this.URIExists(BASE+id))
{
id = new Random().nextLong();
}
String individualURI = SemanticModel.formatURIForSparql(BASE+id);
String typeURI = SemanticModel.formatURIForSparql(type);
String insert =
individualURI+" rdf:type "+typeURI+"; "
+ "rdfs:label \""+label+"\".";
SparqlInsertData q = new SparqlInsertData(IOT_PREFIXES, insert);
this.processWriteQuery(q.toString());
return BASE+id;
}
@Override
public void addObjectPropertyToIndividual(String subjectURI,
String propertyURI, String objectURI) {
SparqlInsertData q = new SparqlInsertData(IOT_PREFIXES,
SemanticModel.formatURIForSparql(subjectURI)+
" "+SemanticModel.formatURIForSparql(propertyURI)+
" "+SemanticModel.formatURIForSparql(objectURI)+".");
this.processWriteQuery(q.toString());
}
@Override
public void addDataPropertyToIndividual(String subjectURI,
String propertyURI, String data) {
SparqlInsertData q = new SparqlInsertData(IOT_PREFIXES,
SemanticModel.formatURIForSparql(subjectURI)+
" "+SemanticModel.formatURIForSparql(propertyURI)+
" \""+data+"\".");
this.processWriteQuery(q.toString());
}
@Override
public void exportModel(String path)
{
FileWriter out = null;
try
{
out = new FileWriter(path);
this.model.write(out, "TURTLE");
}
catch (IOException e)
{
e.printStackTrace();
}
}
@Override
public boolean hasDataPropertyValue(String subjectURI,
String dataPropertyURI, String dataValue)
{
subjectURI = SemanticModel.formatURIForSparql(subjectURI);
dataPropertyURI = SemanticModel.formatURIForSparql(dataPropertyURI);
String ask = subjectURI+" "+dataPropertyURI+" \""+dataValue+"\".";
SparqlAsk q = new SparqlAsk(IOT_PREFIXES, ask);
return this.askDataset(q.toString());
}
public List<String> testLanguageTag(String label, String tag)
{
List<String> instances = new ArrayList<String>();
String select = "?s ?l";
String where;
// if(tag != null && tag.length() > 0)
// {
// where = "?s rdfs:label \""+label+"@"+tag+"\".";
// }
// else
{
// where = "?s rdfs:label \""+label+"\".";
// where = "?s rdfs:label ?l. FILTER (str(?l) = \""+label+"\")";
where = "?s rdfs:label ?l.";
}
SparqlSelect q = new SparqlSelect(select, where);
String query = ""
+ "SELECT ?s"
+ "WHERE {?s <http://www.w3.org/2000/01/rdf-schema#label> ?l. FILTER regex(?l, \""+label+"\")}";
List<Map<String, String>> qResult = this.processReadQuery(query);
for(Map<String, String> answer : qResult)
{
instances.add(answer.get("s"));
}
return instances;
}
@Override
public List<String> getEntityURI(String label)
{
List<String> instances = new ArrayList<String>();
String query = ""
+ "SELECT ?s "
+ "WHERE {?s <http://www.w3.org/2000/01/rdf-schema#label> ?l. FILTER regex(?l, \""+label+"\")}";
List<Map<String, String>> qResult = this.processReadQuery(query);
for(Map<String, String> answer : qResult)
{
instances.add(answer.get("s"));
}
if(instances.size() == 0)
System.out.println("Il n'y a pas d'entité portant le label "+label);
return instances;
}
@Override
public List<String> listLabels(String entityURI)
{
entityURI = SemanticModel.formatURIForSparql(entityURI);
List<String> instances = new ArrayList<String>();
String query = ""
+ "SELECT ?l "
+ "WHERE {"+entityURI+" <http://www.w3.org/2000/01/rdf-schema#label> ?l.}";
List<Map<String, String>> qResult = this.processReadQuery(query);
for(Map<String, String> answer : qResult)
{
// Labels contain language tags, in our case we won't consider them.
instances.add(answer.get("l").split("@")[0]);
}
if(instances.size() == 0)
System.out.println("Aucune entité n'est associée à l'entité "+entityURI);
return instances;
}
@Override
public List<List<String>> listProperties(String entityURI)
{
entityURI = SemanticModel.formatURIForSparql(entityURI);
List<List<String>> instances = new ArrayList<List<String>>();
String query = ""
+ "SELECT ?p ?o "
+ "WHERE {"+entityURI+" ?p ?o.}";
List<Map<String, String>> qResult = this.processReadQuery(query);
for(Map<String, String> answer : qResult)
{
ArrayList<String> l = new ArrayList<String>();
l.add(answer.get("p"));
l.add(answer.get("o"));
instances.add(l);
}
return instances;
}
@Override
public boolean hasObjectProperty(String subjectURI, String propertyURI,
String objectURI)
{
subjectURI = SemanticModel.formatURIForSparql(subjectURI);
propertyURI = SemanticModel.formatURIForSparql(propertyURI);
objectURI = SemanticModel.formatURIForSparql(objectURI);
String ask = subjectURI+" "+propertyURI+" "+objectURI+".";
SparqlAsk q = new SparqlAsk(IOT_PREFIXES, ask);
return this.askDataset(q.toString());
}
@Override
public boolean hasSensorDoneIt(String obsURI, String sensorURI)
{
obsURI = SemanticModel.formatURIForSparql(obsURI);
sensorURI = SemanticModel.formatURIForSparql(sensorURI);
String ask = "?output ssn:isProducedBy "+sensorURI+";"
+ "ssn:hasValue "+obsURI+".";
SparqlAsk q = new SparqlAsk(SemanticModel.IOT_PREFIXES, ask);
return this.askDataset(q.toString());
}
}

View file

@ -0,0 +1,56 @@
package semantic.model;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
public class TimestampEntity
{
public String timestamp;
public Date date;
public String time;
public TimestampEntity(String timestamp)
{
this.timestamp = timestamp;
DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
try
{
this.date = df.parse(timestamp);
}
catch (ParseException e)
{
e.printStackTrace();
}
}
public Date getDate()
{
return this.date;
}
public String getDay()
{
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
return formatter.format(this.date);
}
public String getTime()
{
SimpleDateFormat formatter = new SimpleDateFormat("HH:mm:ss");
return formatter.format(this.date);
}
public int getHour()
{
SimpleDateFormat formatter = new SimpleDateFormat("HH");
return Integer.valueOf(formatter.format(this.date));
}
public String getTimeStamp()
{
return this.timestamp;
}
}

View file

@ -0,0 +1,55 @@
package semantic.view;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.StringReader;
import java.util.ArrayList;
import java.util.List;
import javax.json.Json;
import javax.json.stream.JsonParser;
import javax.json.stream.JsonParser.Event;
import semantic.model.ObservationEntity;
import semantic.model.TimestampEntity;
public class JSONEndpoint
{
public static List<ObservationEntity> parseObservations(String path) throws IOException
{
BufferedReader in = new BufferedReader(new FileReader(path));
String line;
line = in.readLine();
// Read observation entities, sorted by day
List<ObservationEntity> obsList = new ArrayList<ObservationEntity>();
while (line != null)
{
JsonParser parser = Json.createParser(new StringReader(line));
// At this point, event vaut START_OBJECT
Event e = parser.next();
String timestamp = null;
Float value = null;
// Each line exactly contains one json object
while(e != Event.END_OBJECT)
{
if(e == Event.KEY_NAME)
{
timestamp = parser.getString();
}
else if(e == Event.VALUE_STRING)
{
if(parser.getString().length() > 0)
{
value = Float.valueOf(parser.getString());
obsList.add(new ObservationEntity(value, new TimestampEntity(timestamp)));
}
}
e = parser.next();
}
line = in.readLine();
}
in.close();
return obsList;
}
}

View file

@ -0,0 +1,6 @@
package semantic.view;
public class TTLEndpoint
{
}

View file

@ -0,0 +1,29 @@
package semantic;
import java.io.IOException;
import java.util.List;
import org.junit.Assert;
import org.junit.Test;
import semantic.model.ObservationEntity;
import semantic.view.JSONEndpoint;
public class TestJSONParsing
{
@Test
public void testParseTemperature()
{
List<ObservationEntity> obslist = null;
try
{
obslist = JSONEndpoint.parseObservations("./src/test/temperature.txt");
}
catch (IOException e)
{
e.printStackTrace();
}
Assert.assertNotNull(obslist);
Assert.assertNotEquals(0, obslist.size());
}
}

View file

@ -0,0 +1,73 @@
package semantic;
import org.junit.Assert;
import org.junit.Test;
import semantic.controler.Controler;
import semantic.model.TimestampEntity;
public class TestModelFunctions
{
@Test
public void testPlaceCreation()
{
Controler c = new Controler();
String jurassicParkURI = c.getCustomModel().createPlace("Jurassic park");
String placeClassURI = c.getModel().getEntityURI("Lieu").get(0);
Assert.assertTrue("L'entité créée n'est pas de classe Lieu", c.getModel().isOfType(jurassicParkURI, placeClassURI));
Assert.assertTrue("Le lieu créé n'a pas de label pour indiquer son nom", c.getModel().listLabels(jurassicParkURI).contains("Jurassic park"));
}
@Test
public void testInstantCreation()
{
Controler c = new Controler();
TimestampEntity t = new TimestampEntity("2014-02-13T06:20:00");
String instantURI = c.getCustomModel().createInstant(t);
String instantClassURI = c.getModel().getEntityURI("Instant").get(0);
String propertyURI = c.getModel().getEntityURI("a pour timestamp").get(0);
Assert.assertTrue("L'entité créée n'est pas de la classe Instant", c.getModel().isOfType(instantURI, instantClassURI));
Assert.assertTrue("L'instant créé n'a pas le bon timestamp", c.getModel().hasDataPropertyValue(
instantURI, propertyURI, "2014-02-13T06:20:00"));
}
@Test
public void testInstantRetrieval()
{
Controler c = new Controler();
TimestampEntity t = new TimestampEntity("2014-02-13T06:20:00");
TimestampEntity t2 = new TimestampEntity("2015-02-13T06:20:00");
String instantURI = c.getCustomModel().createInstant(t);
Assert.assertTrue("La recherche d'un instant par timestamp ne retourne rien pour un instant sensé exister", c.getCustomModel().getInstantURI(t).equals(instantURI));
Assert.assertNull("La recherche d'un instant par timestamp inexistant ne retourne pas un résultat null", c.getCustomModel().getInstantURI(t2));
}
@Test
public void testTimestampRetrieval()
{
Controler c = new Controler();
TimestampEntity t = new TimestampEntity("2014-02-13T06:20:00");
String instantURI = c.getCustomModel().createInstant(t);
Assert.assertTrue("Le timestamp ne correspond pas", c.getCustomModel().getInstantTimestamp(instantURI).equals("2014-02-13T06:20:00"));
}
@Test
public void testObservationCreation()
{
Controler c = new Controler();
TimestampEntity t = new TimestampEntity("2014-02-13T06:20:00");
String instantURI = c.getCustomModel().createInstant(t);
String paramURI = c.getModel().getEntityURI("Température").get(0);
String value = "25.0";
String obsURI = c.getCustomModel().createObs(value, paramURI, instantURI);
// Entities relevant to the test
String obsClassURI = c.getModel().getEntityURI("Observation").get(0);
String hasDataValueURI = c.getModel().getEntityURI("a pour valeur").get(0);
String datePropertyURI = c.getModel().getEntityURI("a pour date").get(0);
String sensorURI = c.getModel().whichSensorDidIt("2014-02-13T06:20:00", paramURI);
Assert.assertTrue("L'observation n'est pas une instance de la bonne classe", c.getModel().isOfType(obsURI, obsClassURI));
Assert.assertTrue("L'observation n'a pas la bonne valeur",c.getModel().hasDataPropertyValue(obsURI, hasDataValueURI, value));
Assert.assertTrue("L'observation n'a pas la bonne date",c.getModel().hasObjectProperty(obsURI, datePropertyURI, instantURI));
Assert.assertTrue("L'observation n'est pas rattachée au bon capteur", c.getModel().hasSensorDoneIt(obsURI, sensorURI));
}
}

View file

@ -0,0 +1,18 @@
package semantic;
import org.junit.Assert;
import org.junit.Test;
import semantic.model.SemanticModel;
public class TestOntologyInteraction {
@Test
public void createSemanticModel()
{
SemanticModel sm = new SemanticModel();
Assert.assertNotNull(sm);
}
}

5
src/test/temperature.txt Normal file
View file

@ -0,0 +1,5 @@
{"2014-02-13T06:20:00": "3.0", "2014-02-13T13:50:00": "7.0", "2014-02-13T06:00:00": "2", "2014-02-13T03:00:00": "3", "2014-02-13T13:00:00": "6", "2014-02-13T18:50:00": "4.0", "2014-02-13T13:20:00": "6.0", "2014-02-13T15:00:00": "6", "2014-02-13T08:50:00": "4.0", "2014-02-13T21:50:00": "4.0", "2014-02-13T08:00:00": "3", "2014-02-13T07:50:00": "3.0", "2014-02-13T08:20:00": "4.0", "2014-02-13T21:20:00": "3.0", "2014-02-13T11:50:00": "6.0", "2014-02-13T11:20:00": "6.0", "2014-02-13T17:50:00": "5.0", "2014-02-13T11:00:00": "6", "2014-02-13T05:50:00": "2.0", "2014-02-13T20:50:00": "3.0", "2014-02-13T20:20:00": "4.0", "2014-02-13T16:00:00": "6", "2014-02-13T23:50:00": "2.0", "2014-02-13T21:00:00": "3", "2014-02-13T07:20:00": "3.0", "2014-02-13T03:20:00": "3.0", "2014-02-13T07:00:00": "3", "2014-02-13T15:50:00": "6.0", "2014-02-13T03:50:00": "2.0", "2014-02-13T04:00:00": "2", "2014-02-13T12:00:00": "6", "2014-02-13T04:20:00": "2.0", "2014-02-13T12:20:00": "6.0", "2014-02-13T12:50:00": "6.0", "2014-02-13T22:50:00": "3.0", "2014-02-13T09:00:00": "4", "2014-02-13T09:20:00": "4.0", "2014-02-13T09:50:00": "4.0", "2014-02-13T18:00:00": "5", "2014-02-13T05:20:00": "2.0", "2014-02-13T15:20:00": "6.0", "2014-02-13T00:50:00": "4.0", "2014-02-13T14:50:00": "7.0", "2014-02-13T00:00:00": "4", "2014-02-13T00:20:00": "4.0", "2014-02-13T06:50:00": "3.0", "2014-02-13T22:00:00": "4", "2014-02-13T18:20:00": "5.0", "2014-02-13T02:50:00": "3.0", "2014-02-13T02:20:00": "3.0", "2014-02-13T04:50:00": "2.0", "2014-02-13T02:00:00": "3", "2014-02-13T23:00:00": "3", "2014-02-13T16:50:00": "5.0", "2014-02-13T19:50:00": "4.0", "2014-02-13T19:20:00": "4.0", "2014-02-13T05:00:00": "2", "2014-02-13T19:00:00": "4", "2014-02-13T23:20:00": "3.0", "2014-02-13T14:20:00": "7.0", "2014-02-13T10:20:00": "5.0", "2014-02-13T10:00:00": "4", "2014-02-13T10:50:00": "5.0", "2014-02-13T17:00:00": "5", "2014-02-13T01:00:00": "4", "2014-02-13T17:20:00": "5.0", "2014-02-13T01:20:00": "4.0", "2014-02-13T01:50:00": "4.0", "2014-02-13T22:20:00": "3.0", "2014-02-13T16:20:00": "6.0"}
{"2014-02-14T04:50:00": "1.0", "2014-02-14T09:50:00": "4.0", "2014-02-14T12:20:00": "6.0", "2014-02-14T09:00:00": "3", "2014-02-14T16:20:00": "6.0", "2014-02-14T09:20:00": "3.0", "2014-02-14T19:00:00": "4", "2014-02-14T07:20:00": "2.0", "2014-02-14T06:50:00": "2.0", "2014-02-14T13:20:00": "5.0", "2014-02-14T10:00:00": "4", "2014-02-14T21:50:00": "4.0", "2014-02-14T07:50:00": "2.0", "2014-02-14T19:20:00": "3.0", "2014-02-14T14:50:00": "6.0", "2014-02-14T14:20:00": "6.0", "2014-02-14T04:00:00": "1", "2014-02-14T14:00:00": "6", "2014-02-14T23:00:00": "3", "2014-02-14T22:20:00": "4.0", "2014-02-14T13:00:00": "6", "2014-02-14T06:00:00": "2", "2014-02-14T19:50:00": "4.0", "2014-02-14T08:00:00": "2", "2014-02-14T08:20:00": "2.0", "2014-02-14T08:50:00": "3.0", "2014-02-14T11:20:00": "5.0", "2014-02-14T20:50:00": "3.0", "2014-02-14T05:00:00": "1", "2014-02-14T15:20:00": "6.0", "2014-02-14T05:20:00": "1.0", "2014-02-14T15:00:00": "6", "2014-02-14T07:00:00": "2", "2014-02-14T15:50:00": "6.0", "2014-02-14T21:20:00": "3.0", "2014-02-14T17:00:00": "5", "2014-02-14T22:50:00": "3.0", "2014-02-14T17:20:00": "5.0", "2014-02-14T17:50:00": "5.0", "2014-02-14T04:20:00": "1.0", "2014-02-14T01:50:00": "1.0", "2014-02-14T22:00:00": "4", "2014-02-14T01:00:00": "2", "2014-02-14T06:20:00": "2.0", "2014-02-14T01:20:00": "1.0", "2014-02-14T20:20:00": "4.0", "2014-02-14T02:20:00": "1.0", "2014-02-14T02:00:00": "1", "2014-02-14T16:00:00": "6", "2014-02-14T02:50:00": "1.0", "2014-02-14T10:50:00": "5.0", "2014-02-14T18:20:00": "4.0", "2014-02-14T18:00:00": "4", "2014-02-14T03:50:00": "1.0", "2014-02-14T03:20:00": "1.0", "2014-02-14T23:20:00": "3.0", "2014-02-14T03:00:00": "1", "2014-02-14T12:50:00": "6.0", "2014-02-14T16:50:00": "5.0", "2014-02-14T13:50:00": "6.0", "2014-02-14T11:50:00": "5.0", "2014-02-14T23:50:00": "3.0", "2014-02-14T12:00:00": "6", "2014-02-14T20:00:00": "4", "2014-02-14T00:00:00": "2", "2014-02-14T00:20:00": "2.0", "2014-02-14T00:50:00": "1.0", "2014-02-14T05:50:00": "2.0", "2014-02-14T18:50:00": "4.0"}
{"2014-02-15T06:50:00": "4.0", "2014-02-15T10:20:00": "6.0", "2014-02-15T06:00:00": "4", "2014-02-15T06:20:00": "4.0", "2014-02-15T01:00:00": "3", "2014-02-15T08:20:00": "4.0", "2014-02-15T08:00:00": "4", "2014-02-15T13:50:00": "7.0", "2014-02-15T13:20:00": "7.0", "2014-02-15T01:50:00": "4.0", "2014-02-15T13:00:00": "7", "2014-02-15T04:50:00": "4.0", "2014-02-15T04:20:00": "4.0", "2014-02-15T02:50:00": "4.0", "2014-02-15T04:00:00": "4", "2014-02-15T14:00:00": "7", "2014-02-15T09:00:00": "4", "2014-02-15T03:00:00": "4", "2014-02-15T16:00:00": "9", "2014-02-15T14:50:00": "9.0", "2014-02-15T12:50:00": "7.0", "2014-02-15T23:00:00": "7", "2014-02-15T12:20:00": "7.0", "2014-02-15T10:00:00": "6", "2014-02-15T20:20:00": "8.0", "2014-02-15T00:50:00": "3.0", "2014-02-15T10:50:00": "6.0", "2014-02-15T15:50:00": "9.0", "2014-02-15T08:50:00": "4.0", "2014-02-15T21:50:00": "8.0", "2014-02-15T07:00:00": "4", "2014-02-15T23:50:00": "7.0", "2014-02-15T07:20:00": "4.0", "2014-02-15T07:50:00": "4.0", "2014-02-15T14:20:00": "8.0", "2014-02-15T22:20:00": "8.0", "2014-02-15T11:50:00": "7.0", "2014-02-15T22:00:00": "8", "2014-02-15T17:50:00": "8.0", "2014-02-15T11:00:00": "6", "2014-02-15T16:20:00": "9.0", "2014-02-15T11:20:00": "6.0", "2014-02-15T00:20:00": "3.0", "2014-02-15T00:00:00": "3", "2014-02-15T19:00:00": "8", "2014-02-15T21:00:00": "8", "2014-02-15T03:50:00": "4.0", "2014-02-15T17:00:00": "8", "2014-02-15T22:50:00": "7.0", "2014-02-15T18:00:00": "8", "2014-02-15T18:20:00": "8.0", "2014-02-15T18:50:00": "8.0", "2014-02-15T01:20:00": "4.0", "2014-02-15T15:00:00": "9", "2014-02-15T05:20:00": "4.0", "2014-02-15T15:20:00": "9.0", "2014-02-15T05:00:00": "4", "2014-02-15T20:50:00": "8.0", "2014-02-15T05:50:00": "4.0", "2014-02-15T02:00:00": "4", "2014-02-15T02:20:00": "4.0", "2014-02-15T12:00:00": "7", "2014-02-15T21:20:00": "8.0", "2014-02-15T17:20:00": "8.0", "2014-02-15T16:50:00": "9.0", "2014-02-15T23:20:00": "7.0", "2014-02-15T03:20:00": "4.0"}
{"2014-02-16T03:00:00": "5", "2014-02-16T15:00:00": "5", "2014-02-16T03:20:00": "6.0", "2014-02-16T15:20:00": "5.0", "2014-02-16T15:50:00": "5.0", "2014-02-16T21:20:00": "4.0", "2014-02-16T20:00:00": "5", "2014-02-16T18:00:00": "5", "2014-02-16T18:20:00": "5.0", "2014-02-16T01:50:00": "6.0", "2014-02-16T22:20:00": "4.0", "2014-02-16T02:20:00": "6.0", "2014-02-16T01:20:00": "7.0", "2014-02-16T14:50:00": "5.0", "2014-02-16T01:00:00": "7", "2014-02-16T11:00:00": "6", "2014-02-16T14:00:00": "7", "2014-02-16T14:20:00": "7.0", "2014-02-16T12:50:00": "7.0", "2014-02-16T20:50:00": "4.0", "2014-02-16T08:20:00": "5.0", "2014-02-16T22:00:00": "4", "2014-02-16T05:50:00": "5.0", "2014-02-16T05:20:00": "5.0", "2014-02-16T03:50:00": "6.0", "2014-02-16T05:00:00": "5", "2014-02-16T11:50:00": "7.0", "2014-02-16T23:00:00": "4", "2014-02-16T02:00:00": "6", "2014-02-16T22:50:00": "4.0", "2014-02-16T00:20:00": "7.0", "2014-02-16T17:00:00": "4", "2014-02-16T21:00:00": "4", "2014-02-16T04:20:00": "6.0", "2014-02-16T04:00:00": "6", "2014-02-16T13:50:00": "7.0", "2014-02-16T04:50:00": "6.0", "2014-02-16T19:00:00": "5", "2014-02-16T10:00:00": "6", "2014-02-16T06:00:00": "5", "2014-02-16T10:20:00": "6.0", "2014-02-16T06:20:00": "5.0", "2014-02-16T06:50:00": "6.0", "2014-02-16T18:50:00": "5.0", "2014-02-16T11:20:00": "6.0", "2014-02-16T12:20:00": "7.0", "2014-02-16T07:50:00": "5.0", "2014-02-16T12:00:00": "6", "2014-02-16T23:50:00": "3.0", "2014-02-16T07:00:00": "6", "2014-02-16T07:20:00": "6.0", "2014-02-16T00:00:00": "6", "2014-02-16T09:20:00": "6.0", "2014-02-16T23:20:00": "3.0", "2014-02-16T08:50:00": "5.0", "2014-02-16T09:00:00": "5", "2014-02-16T19:50:00": "5.0", "2014-02-16T20:20:00": "4.0", "2014-02-16T16:50:00": "4.0", "2014-02-16T16:20:00": "5.0", "2014-02-16T10:50:00": "6.0", "2014-02-16T16:00:00": "5", "2014-02-16T21:50:00": "4.0", "2014-02-16T02:50:00": "5.0", "2014-02-16T13:00:00": "6", "2014-02-16T00:50:00": "7.0", "2014-02-16T19:20:00": "5.0", "2014-02-16T13:20:00": "7.0", "2014-02-16T17:20:00": "4.0", "2014-02-16T09:50:00": "6.0", "2014-02-16T17:50:00": "5.0", "2014-02-16T08:00:00": "4"}
{"2014-02-17T01:00:00": "4", "2014-02-17T11:50:00": "7.0", "2014-02-17T22:00:00": "2", "2014-02-17T23:50:00": "1.0", "2014-02-17T21:00:00": "2", "2014-02-17T02:50:00": "3.0", "2014-02-17T19:50:00": "3.0", "2014-02-17T00:00:00": "3", "2014-02-17T16:00:00": "8", "2014-02-17T00:20:00": "3.0", "2014-02-17T16:20:00": "7.0", "2014-02-17T16:50:00": "7.0", "2014-02-17T13:50:00": "7.0", "2014-02-17T18:20:00": "4.0", "2014-02-17T12:50:00": "7.0", "2014-02-17T22:20:00": "1.0", "2014-02-17T22:50:00": "1.0", "2014-02-17T01:20:00": "3.0", "2014-02-17T11:20:00": "7.0", "2014-02-17T04:50:00": "3.0", "2014-02-17T10:50:00": "7.0", "2014-02-17T04:00:00": "3", "2014-02-17T03:20:00": "3.0", "2014-02-17T04:20:00": "3.0", "2014-02-17T23:20:00": "1.0", "2014-02-17T20:20:00": "2.0", "2014-02-17T07:20:00": "3.0", "2014-02-17T20:00:00": "3", "2014-02-17T07:00:00": "3", "2014-02-17T07:50:00": "3.0", "2014-02-17T09:50:00": "5.0", "2014-02-17T06:50:00": "3.0", "2014-02-17T06:20:00": "3.0", "2014-02-17T06:00:00": "3", "2014-02-17T19:20:00": "3.0", "2014-02-17T23:00:00": "1", "2014-02-17T12:00:00": "8", "2014-02-17T20:50:00": "2.0", "2014-02-17T19:00:00": "3", "2014-02-17T10:00:00": "6", "2014-02-17T08:00:00": "3", "2014-02-17T08:20:00": "3.0", "2014-02-17T21:20:00": "2.0", "2014-02-17T21:50:00": "2.0", "2014-02-17T13:00:00": "7", "2014-02-17T05:00:00": "3", "2014-02-17T13:20:00": "8.0", "2014-02-17T05:20:00": "3.0", "2014-02-17T05:50:00": "3.0", "2014-02-17T00:50:00": "3.0", "2014-02-17T09:20:00": "5.0", "2014-02-17T01:50:00": "3.0", "2014-02-17T18:50:00": "3.0", "2014-02-17T03:00:00": "3", "2014-02-17T02:20:00": "3.0", "2014-02-17T14:50:00": "8.0", "2014-02-17T02:00:00": "3", "2014-02-17T18:00:00": "4", "2014-02-17T17:00:00": "6", "2014-02-17T10:20:00": "6.0", "2014-02-17T17:20:00": "6.0", "2014-02-17T09:00:00": "4", "2014-02-17T14:20:00": "7.0", "2014-02-17T11:00:00": "7", "2014-02-17T08:50:00": "4.0", "2014-02-17T14:00:00": "7", "2014-02-17T17:50:00": "5.0", "2014-02-17T15:50:00": "8.0", "2014-02-17T15:20:00": "8.0", "2014-02-17T03:50:00": "3.0", "2014-02-17T15:00:00": "8"}

426
tp-iss.ttl Normal file
View file

@ -0,0 +1,426 @@
@prefix : <http://www.w3.org/2002/07/owl#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix ssn: <http://purl.oclc.org/NET/ssnx/ssn#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix tp-iss: <http://homepages.laas.fr/nseydoux/ontologies/tp-iss#> .
@base <http://homepages.laas.fr/nseydoux/ontologies/tp-iss> .
<http://homepages.laas.fr/nseydoux/ontologies/tp-iss> rdf:type owl:Ontology .
#################################################################
# Annotation properties
#################################################################
### http://purl.oclc.org/NET/ssnx/ssn#observes
ssn:observes rdf:type owl:AnnotationProperty .
#################################################################
# Object Properties
#################################################################
### http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLObjectProperty_0f63feb1_1b41_4716_92bb_1ef70da83f72
tp-iss:OWLObjectProperty_0f63feb1_1b41_4716_92bb_1ef70da83f72 rdf:type owl:ObjectProperty ;
rdfs:domain tp-iss:OWLClass_75255c9b_fdf8_4c41_9552_a599230329cc ;
rdfs:range tp-iss:OWLClass_b7dc1540_f585_4aab_aeb8_59265536249e ;
rdfs:label "a pour symptome"@en .
### http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLObjectProperty_214a72af_4335_4b8a_b251_edcce1785ea7
tp-iss:OWLObjectProperty_214a72af_4335_4b8a_b251_edcce1785ea7 rdf:type owl:ObjectProperty ;
rdfs:subPropertyOf owl:topObjectProperty ;
owl:inverseOf tp-iss:OWLObjectProperty_4a511452_e141_4a7e_b156_cf152f19cd2d ;
rdfs:domain tp-iss:OWLClass_c8a39393_1773_4418_971e_85efde7cf347 ,
[ rdf:type owl:Restriction ;
owl:onProperty tp-iss:OWLObjectProperty_214a72af_4335_4b8a_b251_edcce1785ea7 ;
owl:qualifiedCardinality "1"^^xsd:nonNegativeInteger ;
owl:onClass tp-iss:OWLClass_cc9a247b_da2d_4b1c_90e4_8f9e9e5cac7e
] ;
rdfs:range tp-iss:OWLClass_cc9a247b_da2d_4b1c_90e4_8f9e9e5cac7e ;
rdfs:label "a pour capitale"@en .
### http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLObjectProperty_3e84e8b7_9283_4582_b02d_3815a4cf3864
tp-iss:OWLObjectProperty_3e84e8b7_9283_4582_b02d_3815a4cf3864 rdf:type owl:ObjectProperty ;
rdfs:domain tp-iss:OWLClass_b7dc1540_f585_4aab_aeb8_59265536249e ;
rdfs:range tp-iss:OWLClass_70366453_b04e_4693_9806_9bb04ff4593c ;
rdfs:label "a pour date"@en .
### http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLObjectProperty_4a511452_e141_4a7e_b156_cf152f19cd2d
tp-iss:OWLObjectProperty_4a511452_e141_4a7e_b156_cf152f19cd2d rdf:type owl:ObjectProperty ;
rdfs:subPropertyOf tp-iss:OWLObjectProperty_6637af56_609a_4059_bf56_f2870d032dbc ;
rdfs:label "est la capitale de"@fr .
### http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLObjectProperty_57b19d61_bcdf_40fd_90c7_dd56beb7acb6
tp-iss:OWLObjectProperty_57b19d61_bcdf_40fd_90c7_dd56beb7acb6 rdf:type owl:ObjectProperty ;
rdfs:domain tp-iss:OWLClass_b7dc1540_f585_4aab_aeb8_59265536249e ;
rdfs:range tp-iss:OWLClass_bf3863e3_9c85_4aef_9b6e_396eb5000083 ;
rdfs:label "a pour localisation"@en .
### http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLObjectProperty_6637af56_609a_4059_bf56_f2870d032dbc
tp-iss:OWLObjectProperty_6637af56_609a_4059_bf56_f2870d032dbc rdf:type owl:ObjectProperty ,
owl:TransitiveProperty ;
rdfs:domain tp-iss:OWLClass_bf3863e3_9c85_4aef_9b6e_396eb5000083 ;
rdfs:range tp-iss:OWLClass_bf3863e3_9c85_4aef_9b6e_396eb5000083 ;
rdfs:label "est inclus dans"@en .
### http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLObjectProperty_6e59efc0_2d2e_4485_a5a2_2ea407080c48
tp-iss:OWLObjectProperty_6e59efc0_2d2e_4485_a5a2_2ea407080c48 rdf:type owl:ObjectProperty ;
rdfs:domain tp-iss:OWLClass_75255c9b_fdf8_4c41_9552_a599230329cc ;
rdfs:range tp-iss:OWLClass_70366453_b04e_4693_9806_9bb04ff4593c ;
rdfs:label "débute à"@en .
### http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLObjectProperty_cf7c18d0_5a3f_4173_897a_754d49d90f25
tp-iss:OWLObjectProperty_cf7c18d0_5a3f_4173_897a_754d49d90f25 rdf:type owl:ObjectProperty ;
rdfs:domain tp-iss:OWLClass_75255c9b_fdf8_4c41_9552_a599230329cc ;
rdfs:range tp-iss:OWLClass_6d5bb482_3e1e_47a0_be94_995d4df0f35e ;
rdfs:label "caractérisé par"@en .
### http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLObjectProperty_f0381af4_a882_4f64_8928_6089116baadc
tp-iss:OWLObjectProperty_f0381af4_a882_4f64_8928_6089116baadc rdf:type owl:ObjectProperty ;
rdfs:domain tp-iss:OWLClass_75255c9b_fdf8_4c41_9552_a599230329cc ;
rdfs:range tp-iss:OWLClass_70366453_b04e_4693_9806_9bb04ff4593c ;
rdfs:label "finit à"@en .
### http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLObjectProperty_f4ed4114_811e_4c3b_9fda_e5659bf2ec9c
tp-iss:OWLObjectProperty_f4ed4114_811e_4c3b_9fda_e5659bf2ec9c rdf:type owl:ObjectProperty ;
rdfs:domain tp-iss:OWLClass_b7dc1540_f585_4aab_aeb8_59265536249e ;
rdfs:range tp-iss:OWLClass_6d5bb482_3e1e_47a0_be94_995d4df0f35e ;
rdfs:label "mesure"@en .
### http://purl.oclc.org/NET/ssnx/ssn#attachedSystem
ssn:attachedSystem rdf:type owl:ObjectProperty .
### http://purl.oclc.org/NET/ssnx/ssn#onPlatform
ssn:onPlatform rdf:type owl:ObjectProperty .
### http://www.w3.org/2002/07/owl#OWLObjectProperty_c71b5265_ff81_4c91_b30d_a3e858340405
owl:OWLObjectProperty_c71b5265_ff81_4c91_b30d_a3e858340405 rdf:type owl:ObjectProperty ;
owl:propertyChainAxiom ( ssn:onPlatform
owl:OWLObjectProperty_c71b5265_ff81_4c91_b30d_a3e858340405
) ,
( owl:OWLObjectProperty_c71b5265_ff81_4c91_b30d_a3e858340405
tp-iss:OWLObjectProperty_6637af56_609a_4059_bf56_f2870d032dbc
) ;
rdfs:label "se situe dans"@en .
### http://www.w3.org/2002/07/owl#OWLObjectProperty_fb806106_4ace_40ff_99be_b78033118b3c
owl:OWLObjectProperty_fb806106_4ace_40ff_99be_b78033118b3c rdf:type owl:ObjectProperty ;
rdfs:domain ssn:System ;
rdfs:range ssn:System ;
owl:propertyChainAxiom ( ssn:onPlatform
ssn:attachedSystem
) ;
rdfs:label "est compatible avec"@en .
#################################################################
# Data properties
#################################################################
### http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLDataProperty_1ba5bda8_e69b_4c0f_930c_ffc2fcf02f10
tp-iss:OWLDataProperty_1ba5bda8_e69b_4c0f_930c_ffc2fcf02f10 rdf:type owl:DatatypeProperty ;
rdfs:domain tp-iss:OWLClass_b7dc1540_f585_4aab_aeb8_59265536249e ;
rdfs:range xsd:float ;
rdfs:label "a pour valeur"@en .
### http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLDataProperty_8c1edaf8_176d_4e84_a40f_881f06ca36d5
tp-iss:OWLDataProperty_8c1edaf8_176d_4e84_a40f_881f06ca36d5 rdf:type owl:DatatypeProperty ;
rdfs:domain tp-iss:OWLClass_70366453_b04e_4693_9806_9bb04ff4593c ;
rdfs:range xsd:dateTimeStamp ;
rdfs:label "a pour timestamp"@en .
### http://homepages.laas.fr/nseydoux/ontologies/tp-iss#a_pour_durée
tp-iss:a_pour_durée rdf:type owl:DatatypeProperty .
#################################################################
# Classes
#################################################################
### http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLClass_1356bdaa_2770_4f7e_b281_2e7a014b3220
tp-iss:OWLClass_1356bdaa_2770_4f7e_b281_2e7a014b3220 rdf:type owl:Class ;
rdfs:subClassOf tp-iss:OWLClass_93368bc8_4bb5_4d60_acd1_fd650a97dea7 ;
rdfs:label "Ensoleillement"@en .
### http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLClass_3f9c9e2e_1534_4048_9f3e_3131d300ae08
tp-iss:OWLClass_3f9c9e2e_1534_4048_9f3e_3131d300ae08 rdf:type owl:Class ;
owl:equivalentClass [ owl:intersectionOf ( tp-iss:OWLClass_75255c9b_fdf8_4c41_9552_a599230329cc
[ rdf:type owl:Restriction ;
owl:onProperty tp-iss:OWLObjectProperty_0f63feb1_1b41_4716_92bb_1ef70da83f72 ;
owl:someValuesFrom [ owl:intersectionOf ( tp-iss:OWLClass_b7dc1540_f585_4aab_aeb8_59265536249e
[ rdf:type owl:Restriction ;
owl:onProperty tp-iss:OWLObjectProperty_f4ed4114_811e_4c3b_9fda_e5659bf2ec9c ;
owl:hasValue owl:OWLNamedIndividual_2a8dc066_4bd2_454c_a56b_11db9452e7dd
]
[ rdf:type owl:Restriction ;
owl:onProperty tp-iss:OWLDataProperty_1ba5bda8_e69b_4c0f_930c_ffc2fcf02f10 ;
owl:someValuesFrom [ rdf:type rdfs:Datatype ;
owl:onDatatype xsd:float ;
owl:withRestrictions ( [ xsd:minExclusive "0.0"^^xsd:float
]
)
]
]
) ;
rdf:type owl:Class
]
]
) ;
rdf:type owl:Class
] ;
rdfs:subClassOf tp-iss:OWLClass_453350aa_9d45_444a_a509_77b94bbc7bb2 ;
rdfs:label "Pluie"@en .
### http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLClass_453350aa_9d45_444a_a509_77b94bbc7bb2
tp-iss:OWLClass_453350aa_9d45_444a_a509_77b94bbc7bb2 rdf:type owl:Class ;
rdfs:subClassOf tp-iss:OWLClass_75255c9b_fdf8_4c41_9552_a599230329cc ;
rdfs:label "Mauvais temps"@en .
### http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLClass_60a7a81e_a726_4794_a7aa_7c366ca6ce44
tp-iss:OWLClass_60a7a81e_a726_4794_a7aa_7c366ca6ce44 rdf:type owl:Class ;
rdfs:subClassOf tp-iss:OWLClass_453350aa_9d45_444a_a509_77b94bbc7bb2 ;
rdfs:label "Brouillard"@en .
### http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLClass_6d5bb482_3e1e_47a0_be94_995d4df0f35e
tp-iss:OWLClass_6d5bb482_3e1e_47a0_be94_995d4df0f35e rdf:type owl:Class ;
rdfs:subClassOf ssn:Property ;
rdfs:label "Paramètre mesurables"@en .
### http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLClass_70366453_b04e_4693_9806_9bb04ff4593c
tp-iss:OWLClass_70366453_b04e_4693_9806_9bb04ff4593c rdf:type owl:Class ;
rdfs:label "Instant"@en .
### http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLClass_75255c9b_fdf8_4c41_9552_a599230329cc
tp-iss:OWLClass_75255c9b_fdf8_4c41_9552_a599230329cc rdf:type owl:Class ;
rdfs:label "Phénomène"@en .
### http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLClass_93368bc8_4bb5_4d60_acd1_fd650a97dea7
tp-iss:OWLClass_93368bc8_4bb5_4d60_acd1_fd650a97dea7 rdf:type owl:Class ;
rdfs:subClassOf tp-iss:OWLClass_75255c9b_fdf8_4c41_9552_a599230329cc ;
rdfs:label "Beau temps"@en .
### http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLClass_b7dc1540_f585_4aab_aeb8_59265536249e
tp-iss:OWLClass_b7dc1540_f585_4aab_aeb8_59265536249e rdf:type owl:Class ;
rdfs:label "Observation" ,
"Observation météo"@en .
### http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLClass_bf3863e3_9c85_4aef_9b6e_396eb5000083
tp-iss:OWLClass_bf3863e3_9c85_4aef_9b6e_396eb5000083 rdf:type owl:Class ;
rdfs:label "Lieu"@en .
### http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLClass_c8a39393_1773_4418_971e_85efde7cf347
tp-iss:OWLClass_c8a39393_1773_4418_971e_85efde7cf347 rdf:type owl:Class ;
rdfs:subClassOf tp-iss:OWLClass_bf3863e3_9c85_4aef_9b6e_396eb5000083 ;
owl:disjointWith tp-iss:OWLClass_cc9a247b_da2d_4b1c_90e4_8f9e9e5cac7e ;
rdfs:label "Pays"@en .
### http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLClass_cc9a247b_da2d_4b1c_90e4_8f9e9e5cac7e
tp-iss:OWLClass_cc9a247b_da2d_4b1c_90e4_8f9e9e5cac7e rdf:type owl:Class ;
rdfs:subClassOf tp-iss:OWLClass_bf3863e3_9c85_4aef_9b6e_396eb5000083 ;
rdfs:label "Ville"@en .
### http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLClass_df27e975_e629_44bb_9479_a57bc2f0b95b
tp-iss:OWLClass_df27e975_e629_44bb_9479_a57bc2f0b95b rdf:type owl:Class ;
rdfs:subClassOf tp-iss:OWLClass_bf3863e3_9c85_4aef_9b6e_396eb5000083 ;
rdfs:label "Continent"@en .
### http://homepages.laas.fr/nseydoux/ontologies/tp-iss#Phénomène_court
tp-iss:Phénomène_court rdf:type owl:Class ;
owl:equivalentClass [ owl:intersectionOf ( tp-iss:OWLClass_75255c9b_fdf8_4c41_9552_a599230329cc
[ rdf:type owl:Restriction ;
owl:onProperty tp-iss:a_pour_durée ;
owl:someValuesFrom [ rdf:type rdfs:Datatype ;
owl:onDatatype xsd:int ;
owl:withRestrictions ( [ xsd:maxInclusive "15"^^xsd:int
]
)
]
]
) ;
rdf:type owl:Class
] ;
rdfs:subClassOf tp-iss:OWLClass_75255c9b_fdf8_4c41_9552_a599230329cc .
### http://purl.oclc.org/NET/ssnx/ssn#Platform
ssn:Platform rdf:type owl:Class ;
rdfs:subClassOf [ rdf:type owl:Restriction ;
owl:onProperty owl:OWLObjectProperty_c71b5265_ff81_4c91_b30d_a3e858340405 ;
owl:someValuesFrom tp-iss:OWLClass_bf3863e3_9c85_4aef_9b6e_396eb5000083
] .
### http://purl.oclc.org/NET/ssnx/ssn#Property
ssn:Property rdf:type owl:Class .
### http://purl.oclc.org/NET/ssnx/ssn#SensingDevice
ssn:SensingDevice rdf:type owl:Class .
### http://purl.oclc.org/NET/ssnx/ssn#System
ssn:System rdf:type owl:Class .
### http://www.w3.org/2002/07/owl#OWLClass_5978d744_0b81_42e3_be10_3d1eebb096ce
owl:OWLClass_5978d744_0b81_42e3_be10_3d1eebb096ce rdf:type owl:Class ;
rdfs:label "Paramètre observable"@en .
#################################################################
# Individuals
#################################################################
### http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLNamedIndividual_2b887a87_5d83_4d70_b7c9_6f8b1c3e54f0
tp-iss:OWLNamedIndividual_2b887a87_5d83_4d70_b7c9_6f8b1c3e54f0 rdf:type owl:NamedIndividual ,
tp-iss:OWLClass_6d5bb482_3e1e_47a0_be94_995d4df0f35e ;
rdfs:label "Température"@en .
### http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLNamedIndividual_2be00ec6_20f0_4ce1_a370_949a455cb0a1
tp-iss:OWLNamedIndividual_2be00ec6_20f0_4ce1_a370_949a455cb0a1 rdf:type owl:NamedIndividual ,
tp-iss:OWLClass_b7dc1540_f585_4aab_aeb8_59265536249e ;
tp-iss:OWLObjectProperty_3e84e8b7_9283_4582_b02d_3815a4cf3864 tp-iss:OWLNamedIndividual_4f731814_91f0_4d75_a5cf_4a0d3629a308 ;
tp-iss:OWLObjectProperty_57b19d61_bcdf_40fd_90c7_dd56beb7acb6 tp-iss:OWLNamedIndividual_40c87ce2_4767_4cb0_9cd7_1dda03352a38 ;
tp-iss:OWLObjectProperty_f4ed4114_811e_4c3b_9fda_e5659bf2ec9c owl:OWLNamedIndividual_2a8dc066_4bd2_454c_a56b_11db9452e7dd ;
tp-iss:OWLDataProperty_1ba5bda8_e69b_4c0f_930c_ffc2fcf02f10 "3.0"^^xsd:float ;
rdfs:label "P1"@en .
### http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLNamedIndividual_40c87ce2_4767_4cb0_9cd7_1dda03352a38
tp-iss:OWLNamedIndividual_40c87ce2_4767_4cb0_9cd7_1dda03352a38 rdf:type owl:NamedIndividual ,
tp-iss:OWLClass_cc9a247b_da2d_4b1c_90e4_8f9e9e5cac7e ,
owl:Thing ;
tp-iss:OWLObjectProperty_6637af56_609a_4059_bf56_f2870d032dbc tp-iss:OWLNamedIndividual_e2cea48d_7da1_41cf_9a6e_167bd3b64a8f ;
rdfs:label "Toulouse"@en .
### http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLNamedIndividual_4ef6700d_d3ca_437e_96a6_5f531744c9fd
tp-iss:OWLNamedIndividual_4ef6700d_d3ca_437e_96a6_5f531744c9fd rdf:type owl:NamedIndividual ,
tp-iss:OWLClass_6d5bb482_3e1e_47a0_be94_995d4df0f35e ;
rdfs:label "Hygrométrie"@en .
### http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLNamedIndividual_4f731814_91f0_4d75_a5cf_4a0d3629a308
tp-iss:OWLNamedIndividual_4f731814_91f0_4d75_a5cf_4a0d3629a308 rdf:type owl:NamedIndividual ,
tp-iss:OWLClass_70366453_b04e_4693_9806_9bb04ff4593c ;
tp-iss:OWLDataProperty_8c1edaf8_176d_4e84_a40f_881f06ca36d5 "2015-10-11T13:20:00Z"^^xsd:dateTimeStamp ;
rdfs:label "I1"@en .
### http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLNamedIndividual_779078ef_da9a_47ac_bb61_59a30ffffa85
tp-iss:OWLNamedIndividual_779078ef_da9a_47ac_bb61_59a30ffffa85 rdf:type owl:NamedIndividual ,
tp-iss:OWLClass_c8a39393_1773_4418_971e_85efde7cf347 ;
tp-iss:OWLObjectProperty_214a72af_4335_4b8a_b251_edcce1785ea7 tp-iss:OWLNamedIndividual_b95bbab6_16d9_4238_9ba6_b4c2874a3912 ,
tp-iss:OWLNamedIndividual_e51e3974_f657_469e_b7a1_6ebaf4935b6a ;
rdfs:label "France"@fr .
### http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLNamedIndividual_b95bbab6_16d9_4238_9ba6_b4c2874a3912
tp-iss:OWLNamedIndividual_b95bbab6_16d9_4238_9ba6_b4c2874a3912 rdf:type owl:NamedIndividual ,
tp-iss:OWLClass_cc9a247b_da2d_4b1c_90e4_8f9e9e5cac7e ;
rdfs:label "Paris"@fr .
### http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLNamedIndividual_c85bf788_ee5b_4da6_a867_08c79d7380e3
tp-iss:OWLNamedIndividual_c85bf788_ee5b_4da6_a867_08c79d7380e3 rdf:type owl:NamedIndividual ,
tp-iss:OWLClass_6d5bb482_3e1e_47a0_be94_995d4df0f35e ;
rdfs:label "Vitesse du vent"@en .
### http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLNamedIndividual_ddf74788_0035_4c06_bdc7_e519b04c7f99
tp-iss:OWLNamedIndividual_ddf74788_0035_4c06_bdc7_e519b04c7f99 rdf:type owl:NamedIndividual ,
tp-iss:OWLClass_75255c9b_fdf8_4c41_9552_a599230329cc ;
tp-iss:OWLObjectProperty_0f63feb1_1b41_4716_92bb_1ef70da83f72 tp-iss:OWLNamedIndividual_2be00ec6_20f0_4ce1_a370_949a455cb0a1 ;
rdfs:label "A1"@en .
### http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLNamedIndividual_e2cea48d_7da1_41cf_9a6e_167bd3b64a8f
tp-iss:OWLNamedIndividual_e2cea48d_7da1_41cf_9a6e_167bd3b64a8f rdf:type owl:NamedIndividual ,
owl:Thing ;
rdfs:label "France"@en .
### http://homepages.laas.fr/nseydoux/ontologies/tp-iss#OWLNamedIndividual_e51e3974_f657_469e_b7a1_6ebaf4935b6a
tp-iss:OWLNamedIndividual_e51e3974_f657_469e_b7a1_6ebaf4935b6a rdf:type owl:NamedIndividual ,
tp-iss:OWLClass_cc9a247b_da2d_4b1c_90e4_8f9e9e5cac7e ;
rdfs:label "La ville Lumière"@fr .
### http://www.w3.org/2002/07/owl#OWLNamedIndividual_268609f4_8a6e_4076_a5c9_cfd144dde88e
owl:OWLNamedIndividual_268609f4_8a6e_4076_a5c9_cfd144dde88e rdf:type owl:NamedIndividual ,
owl:OWLClass_5978d744_0b81_42e3_be10_3d1eebb096ce ;
rdfs:label "Pression athmosphérique"@en .
### http://www.w3.org/2002/07/owl#OWLNamedIndividual_2a8dc066_4bd2_454c_a56b_11db9452e7dd
owl:OWLNamedIndividual_2a8dc066_4bd2_454c_a56b_11db9452e7dd rdf:type owl:NamedIndividual ,
owl:OWLClass_5978d744_0b81_42e3_be10_3d1eebb096ce ;
rdfs:label "Pluviométrie"@en .
### http://www.w3.org/2002/07/owl#OWLNamedIndividual_61229c23_41e4_4ec8_aa17_04ca3dcc42d2
owl:OWLNamedIndividual_61229c23_41e4_4ec8_aa17_04ca3dcc42d2 rdf:type owl:NamedIndividual ,
ssn:SensingDevice ;
ssn:onPlatform owl:OWLNamedIndividual_61237d59_bb40_44ac_bfe3_d9e45ffe04d6 ;
rdfs:label "Sonde T1"@en .
### http://www.w3.org/2002/07/owl#OWLNamedIndividual_61237d59_bb40_44ac_bfe3_d9e45ffe04d6
owl:OWLNamedIndividual_61237d59_bb40_44ac_bfe3_d9e45ffe04d6 rdf:type owl:NamedIndividual ,
ssn:Platform ;
ssn:attachedSystem owl:OWLNamedIndividual_dbca17ec_b04b_47fd_a523_4698b3d40ba5 ;
owl:OWLObjectProperty_c71b5265_ff81_4c91_b30d_a3e858340405 tp-iss:OWLNamedIndividual_40c87ce2_4767_4cb0_9cd7_1dda03352a38 ;
rdfs:label "Platform1"@en .
### http://www.w3.org/2002/07/owl#OWLNamedIndividual_b544466b_449c_4af9_a082_33aa45fcda65
owl:OWLNamedIndividual_b544466b_449c_4af9_a082_33aa45fcda65 rdf:type owl:NamedIndividual ,
owl:OWLClass_5978d744_0b81_42e3_be10_3d1eebb096ce ;
rdfs:label "Hygrométrie"@en .
### http://www.w3.org/2002/07/owl#OWLNamedIndividual_babab508_1c69_472e_8f83_56a6d02a4b52
owl:OWLNamedIndividual_babab508_1c69_472e_8f83_56a6d02a4b52 rdf:type owl:NamedIndividual ,
owl:OWLClass_5978d744_0b81_42e3_be10_3d1eebb096ce ;
rdfs:label "Vitesse du vent"@en .
### http://www.w3.org/2002/07/owl#OWLNamedIndividual_dbca17ec_b04b_47fd_a523_4698b3d40ba5
owl:OWLNamedIndividual_dbca17ec_b04b_47fd_a523_4698b3d40ba5 rdf:type owl:NamedIndividual ,
ssn:SensingDevice ;
ssn:observes owl:OWLNamedIndividual_2a8dc066_4bd2_454c_a56b_11db9452e7dd ;
rdfs:label "Sonde_P1"@en .
### Generated by the OWL API (version 4.2.5.20160517-0735) https://github.com/owlcs/owlapi

201
tp2_sensors.rdf Normal file
View file

@ -0,0 +1,201 @@
<?xml version="1.0"?>
<rdf:RDF xmlns="http://www.semanticweb.org/5iss/tp2#"
xml:base="http://www.semanticweb.org/5iss/tp2"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:terms="http://purl.org/dc/terms/"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:ns="http://creativecommons.org/ns#"
xmlns:xml="http://www.w3.org/XML/1998/namespace"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:ssn="http://purl.oclc.org/NET/ssnx/ssn#">
<owl:Ontology rdf:about="http://www.semanticweb.org/5iss/tp2">
<owl:imports rdf:resource="http://purl.oclc.org/NET/ssnx/ssn"/>
<owl:imports rdf:resource="http://homepages.laas.fr/nseydoux/ontologies/tp-iss"/>
</owl:Ontology>
<!--
///////////////////////////////////////////////////////////////////////////////////////
//
// Data properties
//
///////////////////////////////////////////////////////////////////////////////////////
-->
<!-- http://www.semanticweb.org/5iss/tp2#OWLDataProperty_7c0f8588_780a_4d6e_abe1_6b493059b9fe -->
<owl:DatatypeProperty rdf:about="http://www.semanticweb.org/5iss/tp2#OWLDataProperty_7c0f8588_780a_4d6e_abe1_6b493059b9fe">
<rdfs:label xml:lang="en">a pour minimum</rdfs:label>
</owl:DatatypeProperty>
<!-- http://www.semanticweb.org/5iss/tp2#OWLDataProperty_83a4c21e_0890_4f57_a7ec_ce2be3515a46 -->
<owl:DatatypeProperty rdf:about="http://www.semanticweb.org/5iss/tp2#OWLDataProperty_83a4c21e_0890_4f57_a7ec_ce2be3515a46">
<rdfs:label xml:lang="en">a pour maximum</rdfs:label>
</owl:DatatypeProperty>
<!--
///////////////////////////////////////////////////////////////////////////////////////
//
// Classes
//
///////////////////////////////////////////////////////////////////////////////////////
-->
<!-- http://purl.oclc.org/NET/ssnx/ssn#Property -->
<rdf:Description rdf:about="http://purl.oclc.org/NET/ssnx/ssn#Property">
<owl:equivalentClass rdf:resource="http://www.w3.org/2002/07/owl#OWLClass_5978d744_0b81_42e3_be10_3d1eebb096ce"/>
</rdf:Description>
<!-- http://www.w3.org/2002/07/owl#OWLClass_5978d744_0b81_42e3_be10_3d1eebb096ce -->
<owl:Class rdf:about="http://www.w3.org/2002/07/owl#OWLClass_5978d744_0b81_42e3_be10_3d1eebb096ce"/>
<!--
///////////////////////////////////////////////////////////////////////////////////////
//
// Individuals
//
///////////////////////////////////////////////////////////////////////////////////////
-->
<!-- http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_0021ac01_ffff_4c2f_825b_f785ca896c45 -->
<owl:NamedIndividual rdf:about="http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_0021ac01_ffff_4c2f_825b_f785ca896c45">
<rdf:type rdf:resource="http://purl.oclc.org/NET/ssnx/ssn#SensingDevice"/>
<ssn:hasOperatingRange rdf:resource="http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_ea074e3d_0263_4210_8567_730d34fe4991"/>
<rdfs:label xml:lang="en">TemperatureSensor_3</rdfs:label>
</owl:NamedIndividual>
<!-- http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_03047893_45b5_4b9f_90cb_01eaab27d536 -->
<owl:NamedIndividual rdf:about="http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_03047893_45b5_4b9f_90cb_01eaab27d536">
<rdf:type rdf:resource="http://purl.oclc.org/NET/ssnx/ssn#SensingDevice"/>
<ssn:hasOperatingRange rdf:resource="http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_76f08a90_4bfe_4c0b_89f8_4a729587a8aa"/>
<rdfs:label xml:lang="en">TemperatureSensor_1</rdfs:label>
</owl:NamedIndividual>
<!-- http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_148731a7_7d98_4896_8aa5_41423bb1345f -->
<owl:NamedIndividual rdf:about="http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_148731a7_7d98_4896_8aa5_41423bb1345f">
<rdf:type rdf:resource="http://purl.oclc.org/NET/ssnx/ssn#SensorOutput"/>
<ssn:isProducedBy rdf:resource="http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_0021ac01_ffff_4c2f_825b_f785ca896c45"/>
<rdfs:label xml:lang="en">Output T2</rdfs:label>
</owl:NamedIndividual>
<!-- http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_68f0ea2c_e5c8_4940_bfc6_14d61d262d86 -->
<owl:NamedIndividual rdf:about="http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_68f0ea2c_e5c8_4940_bfc6_14d61d262d86">
<rdf:type rdf:resource="http://purl.oclc.org/NET/ssnx/ssn#SensorOutput"/>
<ssn:isProducedBy rdf:resource="http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_f9d9c0b6_f1b8_419f_bb8f_01ea9e5d783e"/>
<rdfs:label xml:lang="en">Output T3</rdfs:label>
</owl:NamedIndividual>
<!-- http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_76f08a90_4bfe_4c0b_89f8_4a729587a8aa -->
<owl:NamedIndividual rdf:about="http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_76f08a90_4bfe_4c0b_89f8_4a729587a8aa">
<rdf:type rdf:resource="http://purl.oclc.org/NET/ssnx/ssn#OperatingRange"/>
<ssn:inCondition rdf:resource="http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_818bcc98_efa7_4501_b5db_ff9122f2e082"/>
<rdfs:label xml:lang="en">Range B</rdfs:label>
</owl:NamedIndividual>
<!-- http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_818bcc98_efa7_4501_b5db_ff9122f2e082 -->
<owl:NamedIndividual rdf:about="http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_818bcc98_efa7_4501_b5db_ff9122f2e082">
<rdf:type rdf:resource="http://purl.oclc.org/NET/ssnx/ssn#Condition"/>
<ssn:forProperty rdf:resource="http://www.semanticweb.org/seydoux/ontologies/2015/11/untitled-ontology-29#OWLNamedIndividual_2b887a87_5d83_4d70_b7c9_6f8b1c3e54f0"/>
<OWLDataProperty_7c0f8588_780a_4d6e_abe1_6b493059b9fe rdf:datatype="http://www.w3.org/2001/XMLSchema#float">0.0</OWLDataProperty_7c0f8588_780a_4d6e_abe1_6b493059b9fe>
<OWLDataProperty_83a4c21e_0890_4f57_a7ec_ce2be3515a46 rdf:datatype="http://www.w3.org/2001/XMLSchema#float">50.0</OWLDataProperty_83a4c21e_0890_4f57_a7ec_ce2be3515a46>
<rdfs:comment>Positive temperature range relatively common on earth. Expressed in °C</rdfs:comment>
<rdfs:label xml:lang="en">Positive earthly temperatures</rdfs:label>
<rdfs:label>Températures positives</rdfs:label>
</owl:NamedIndividual>
<!-- http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_c4043e50_f8ce_4170_9d5a_794943e46bd9 -->
<owl:NamedIndividual rdf:about="http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_c4043e50_f8ce_4170_9d5a_794943e46bd9">
<rdf:type rdf:resource="http://purl.oclc.org/NET/ssnx/ssn#Condition"/>
<ssn:forProperty rdf:resource="http://www.semanticweb.org/seydoux/ontologies/2015/11/untitled-ontology-29#OWLNamedIndividual_2b887a87_5d83_4d70_b7c9_6f8b1c3e54f0"/>
<OWLDataProperty_7c0f8588_780a_4d6e_abe1_6b493059b9fe rdf:datatype="http://www.w3.org/2001/XMLSchema#float">-30.0</OWLDataProperty_7c0f8588_780a_4d6e_abe1_6b493059b9fe>
<OWLDataProperty_83a4c21e_0890_4f57_a7ec_ce2be3515a46 rdf:datatype="http://www.w3.org/2001/XMLSchema#float">50.0</OWLDataProperty_83a4c21e_0890_4f57_a7ec_ce2be3515a46>
<rdfs:comment>Temperatures commonly measured on earth, both positive and negative, expressed in °C.</rdfs:comment>
<rdfs:label xml:lang="en">Common temperatures</rdfs:label>
</owl:NamedIndividual>
<!-- http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_ea074e3d_0263_4210_8567_730d34fe4991 -->
<owl:NamedIndividual rdf:about="http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_ea074e3d_0263_4210_8567_730d34fe4991">
<rdf:type rdf:resource="http://purl.oclc.org/NET/ssnx/ssn#OperatingRange"/>
<ssn:inCondition rdf:resource="http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_c4043e50_f8ce_4170_9d5a_794943e46bd9"/>
<rdfs:label xml:lang="en">Range A</rdfs:label>
</owl:NamedIndividual>
<!-- http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_f9d9c0b6_f1b8_419f_bb8f_01ea9e5d783e -->
<owl:NamedIndividual rdf:about="http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_f9d9c0b6_f1b8_419f_bb8f_01ea9e5d783e">
<rdf:type rdf:resource="http://purl.oclc.org/NET/ssnx/ssn#SensingDevice"/>
<ssn:hasOperatingRange rdf:resource="http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_76f08a90_4bfe_4c0b_89f8_4a729587a8aa"/>
<rdfs:label xml:lang="en">TemperatureSensor_2</rdfs:label>
</owl:NamedIndividual>
<!-- http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_fc080a98_fa88_4825_b227_641894457026 -->
<owl:NamedIndividual rdf:about="http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_fc080a98_fa88_4825_b227_641894457026">
<rdf:type rdf:resource="http://purl.oclc.org/NET/ssnx/ssn#SensorOutput"/>
<ssn:isProducedBy rdf:resource="http://www.semanticweb.org/5iss/tp2#OWLNamedIndividual_03047893_45b5_4b9f_90cb_01eaab27d536"/>
<rdfs:label xml:lang="en">Output T1</rdfs:label>
</owl:NamedIndividual>
<!-- http://www.semanticweb.org/seydoux/ontologies/2015/11/untitled-ontology-29#OWLNamedIndividual_2b887a87_5d83_4d70_b7c9_6f8b1c3e54f0 -->
<owl:NamedIndividual rdf:about="http://www.semanticweb.org/seydoux/ontologies/2015/11/untitled-ontology-29#OWLNamedIndividual_2b887a87_5d83_4d70_b7c9_6f8b1c3e54f0">
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#OWLClass_5978d744_0b81_42e3_be10_3d1eebb096ce"/>
<rdfs:label>Température</rdfs:label>
</owl:NamedIndividual>
</rdf:RDF>
<!-- Generated by the OWL API (version 4.2.5.20160517-0735) https://github.com/owlcs/owlapi -->