smartapi/model/Authorization.cpp \
smartapi/model/Availability.cpp \
smartapi/model/Capacity.cpp \
+ smartapi/model/Classification.cpp \
smartapi/model/Condition.cpp \
smartapi/model/Contract.cpp \
smartapi/model/Controllability.cpp \
smartapi/model/Authorization.h \
smartapi/model/Availability.h \
smartapi/model/Capacity.h \
+ smartapi/model/Classification.h \
smartapi/model/Condition.h \
smartapi/model/Contract.h \
smartapi/model/Controllability.h \
#include "smartapi/common/ACTIVITIES.h"
#include "smartapi/factory/RequestFactory.h"
#include "smartapi/model/Response.h"
+#include "smartapi/model/Classification.h"
SearchAgent::SearchAgent(QString myId, QNetworkAccessManager* am) :
void SearchAgent::ofTheme(QString searchString, bool exactMatch)
{
+ Classification* classification = new Classification();
+ classification->addType(NS__SMARTAPI + "Theme");
if (exactMatch) {
- mEntity->add(PROPERTY__THEME, searchString);
+ classification->add(PROPERTY__RDFS_LABEL, searchString);
} else {
Condition* condition = new Condition();
condition->addRegex("(?i)" + searchString);
- mEntity->add(PROPERTY__THEME, condition);
+ classification->add(PROPERTY__RDFS_LABEL, condition);
}
+ mEntity->add(PROPERTY__CLASSIFICATION, classification);
}
void SearchAgent::ofLocality(QString searchString, bool exactMatch)
class CalculationMethod : public Calculable
{
public:
- CalculationMethod(QString identifierUri = QString());
- CalculationMethod(CalculationMethod* o);
- ~CalculationMethod();
+ CalculationMethod(QString identifierUri = QString());
+ CalculationMethod(CalculationMethod* o);
+ ~CalculationMethod();
};
#endif // CALCULATIONMETHOD_H
--- /dev/null
+#include "Classification.h"
+#include "smartapi/common/PROPERTY.h"
+
+
+Classification::Classification()
+ : Obj()
+{
+ setType(RESOURCE__CLASSIFICATION);
+}
+
+Classification::Classification(QString uri)
+ : Obj(uri)
+{
+ setType(RESOURCE__CLASSIFICATION);
+}
+
+Classification::Classification(Classification* g)
+ : Obj(g)
+{
+ setType(RESOURCE__CLASSIFICATION);
+}
+
+Classification::~Classification()
+{
+}
+
+void Classification::clearReferences(QSet<GraphItem*>* trash)
+{
+ INIT_CLEAR(Obj, trash);
+ FINISH_CLEAR(Obj, trash);
+}
+
+Resource* Classification::serialize(Model* model)
+{
+ INIT_SERIALIZE(Obj, model)
+ FINISH_SERIALIZE(Obj)
+}
+
+void Classification::parse(Statement* statement)
+{
+ INIT_PARSE(statement)
+ FINISH_PARSE(Obj)
+}
--- /dev/null
+#ifndef CLASSIFICATION_H
+#define CLASSIFICATION_H
+
+#include "smartapi/model/Obj.h"
+
+#include <QString>
+
+class Classification : public Obj
+{
+public:
+ Classification();
+ Classification(QString uri);
+ Classification(Classification* g);
+ ~Classification();
+
+ Resource* serialize(Model* model);
+ void parse(Statement* statement);
+ void clearReferences(QSet<GraphItem*>* trash);
+
+private:
+};
+
+#endif // CLASSIFICATION_H
// This file is automatically created by HeaderFileGenerator.
// Do not edit manually.
-// Generation time 2019/07/10 00:45:04
+// Generation time 2019/07/10 16:15:47
package smartapi.common;
rdfs:range rdf:Property ;
vs:term_status "testing" .
+
# network interface description
smartapi:interface a owl:ObjectProperty;
rdfs:range xsd:string ;
vs:term_status "testing" .
+smartapi:topic a owl:DatatypeProperty ;
+ rdfs:label "Topic"@en ;
+ rdfs:comment "A topic for the data that is being processed. May also be used as a technical classifier (e.g. in MQTT protocol)"@en ;
+ rdfs:isDefinedBy smartapi:DCommonStructureOntology ;
+ rdfs:range xsd:string ;
+ vs:term_status "testing" .
+
+
# ability, availability, controllability, validity
smartapi:Ability a owl:Class ;
# classification by theme and topic
-smartapi:topic a owl:DatatypeProperty ;
- rdfs:label "Topic"@en ;
- rdfs:comment "A topic for the data that is being processed. May also be used as a technical classifier (e.g. in MQTT protocol)"@en ;
- rdfs:isDefinedBy smartapi:DataOntology ;
- rdfs:range xsd:string ;
- vs:term_status "testing" .
+smartapi:Classification a owl:Class ;
+ rdfs:label "Classification"@en ;
+ rdfs:comment "A classification of an entity or data. Classifications are objects and can therefore carry more information than just types, e.g. localizations of the descriptions of classification reasons."@en ;
+ rdfs:subClassOf smartapi:Obj ;
+ rdfs:isDefinedBy smartapi:DataOntology .
+
+smartapi:classification a owl:ObjectProperty ;
+ rdfs:label "Classification"@en ;
+ rdfs:comment "The property of an entity that carries the classification."@en ;
+ rdfs:domain smartapi:Entity ;
+ rdfs:isDefinedBy smartapi:DataOntology .
-smartapi:theme a owl:DatatypeProperty ;
- rdfs:label "Theme"@en ;
- rdfs:comment "The theme of the data that is being processed."@en ;
- rdfs:isDefinedBy smartapi:DataOntology ;
- rdfs:range xsd:string ;
- vs:term_status "testing" .
-
# generic trading terms
smartapi:Instant a owl:Class ;
rdfs:label "Instant"@en ;
- rdfs:comment "A simplification of instant in owl time. note that property smartapi:instant links directly to xsd:dateTime not smartapi:Instant."@en ;
+ rdfs:comment "A simplification of instant in owl time. Note that property smartapi:instant links directly to xsd:dateTime not smartapi:Instant."@en ;
rdfs:isDefinedBy smartapi:DataOntology ;
rdfs:subClassOf smartapi:TemporalEntity;
vs:term_status "testing".
rdfs:range smartapi:Object ;
rdfs:isDefinedBy smartapi:EntityOntology .
+
# entity properties
smartapi:screenshot a owl:ObjectProperty ;
rdfs:subClassOf smartapi:Response ;
vs:term_status "testing" .
+
# heartbeat
smartapi:Heartbeat a owl:Class ;
rdfs:range smartapi:Heartbeat;
vs:term_status "testing" .
+
# general message properties
smartapi:id a owl:DatatypeProperty ;
rdfs:range rdf:Property ;
vs:term_status "testing" .
+
# input and output
smartapi:hasDataResource a owl:ObjectProperty;
rdfs:label "Has data resource"@en ;
rdfs:comment "A data resource related to activity."@en ;
rdfs:domain smartapi:Activity ;
- rdfs:range smartapi:Evaluation ;
+ rdfs:range smartapi:Evaluation ;
vs:term_status "testing" ;
- rdfs:isDefinedBy smartapi:NetworkingOntology .
+ rdfs:isDefinedBy smartapi:NetworkingOntology .
smartapi:Input a owl:Class ;
rdfs:label "Input"@en ;
rdfs:range smartapi:Output ;
vs:term_status "testing" .
+
# error
smartapi:Error a owl:Class ;
rdfs:domain smartapi:Error ;
vs:term_status "testing" .
+
# status
smartapi:Status a owl:Class ;