我想根据其ID(ActuatorID)更新任何个人的数据属性(AccessState)。我使用1求助。我的代码没有给我任何错误,但它不会改变本体。任何人都可以指出我的错误。提前谢谢
继承我的本体论
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE rdf:RDF [
<!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
<!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#'>
<!ENTITY xsd 'http://www.w3.org/2001/XMLSchema#'>
<!ENTITY xml 'http://www.w3.org/XML/1998/namespace'>
<!ENTITY ap 'http://www.semanticweb.org/faiza/ontologies/2014/10/ActuatorProvider#'>
<!ENTITY owl 'http://www.w3.org/2002/07/owl#'>
<!ENTITY ace_lexicon 'http://attempto.ifi.uzh.ch/ace_lexicon#'>
]>
<rdf:RDF xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns="http://www.semanticweb.org/faiza/ontologies/2014/10/ActuatorProvider#" xmlns:ap="http://www.semanticweb.org/faiza/ontologies/2014/10/ActuatorProvider#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:ace_lexicon="http://attempto.ifi.uzh.ch/ace_lexicon#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<owl:AnnotationProperty rdf:about="&ace_lexicon;CN_pl">
<rdf:type rdf:resource="&owl;AnnotationProperty" />
</owl:AnnotationProperty>
<owl:AnnotationProperty rdf:about="&ace_lexicon;CN_sg">
<rdf:type rdf:resource="&owl;AnnotationProperty" />
</owl:AnnotationProperty>
<owl:AnnotationProperty rdf:about="&ace_lexicon;PN_sg">
<rdf:type rdf:resource="&owl;AnnotationProperty" />
</owl:AnnotationProperty>
<owl:AnnotationProperty rdf:about="&ace_lexicon;TV_pl">
<rdf:type rdf:resource="&owl;AnnotationProperty" />
</owl:AnnotationProperty>
<owl:AnnotationProperty rdf:about="&ace_lexicon;TV_sg">
<rdf:type rdf:resource="&owl;AnnotationProperty" />
</owl:AnnotationProperty>
<owl:AnnotationProperty rdf:about="&ace_lexicon;TV_vbg">
<rdf:type rdf:resource="&owl;AnnotationProperty" />
</owl:AnnotationProperty>
<owl:Ontology rdf:about="http://www.semanticweb.org/faiza/ontologies/2014/10/ActuatorProvider">
<rdf:type rdf:resource="&owl;Ontology" />
</owl:Ontology>
<owl:Class rdf:about="≈APServices">
<ace_lexicon:CN_pl>APServiceses</ace_lexicon:CN_pl>
<ace_lexicon:CN_sg>APServices</ace_lexicon:CN_sg>
</owl:Class>
<owl:DatatypeProperty rdf:about="≈AccessState">
<rdfs:domain rdf:resource="≈Actuating_Device" />
<rdfs:range rdf:resource="&xsd;string" />
</owl:DatatypeProperty>
<owl:NamedIndividual rdf:about="≈ActuatingDevice1">
<ace_lexicon:PN_sg>ActuatingDevice1</ace_lexicon:PN_sg>
<ap:AccessState rdf:datatype="&xsd;string">online</ap:AccessState>
<ap:ActuatorCode rdf:datatype="&xsd;integer">1</ap:ActuatorCode>
<ap:ActuatorExplain rdf:datatype="&xsd;string">"TemperatureControl"</ap:ActuatorExplain>
<ap:ActuatorID rdf:datatype="&xsd;string">"SD01"</ap:ActuatorID>
<ap:ActuatorName rdf:datatype="&xsd;string">"Fan"</ap:ActuatorName>
<ap:ConnectsTo rdf:resource="≈ActuatorMiddleware1" />
<ap:PowerConsumption rdf:datatype="&xsd;integer">400</ap:PowerConsumption>
<ap:productTime rdf:datatype="&xsd;dateTime">2015-10-02T00:00:00-05:00</ap:productTime>
<rdf:type rdf:resource="≈Actuating_Device" />
</owl:NamedIndividual>
<owl:NamedIndividual rdf:about="≈ActuatingDevice2">
<ace_lexicon:PN_sg>ActuatingDevice2</ace_lexicon:PN_sg>
<ap:AccessState rdf:datatype="&xsd;string">offline
</ap:AccessState>
<ap:ActuatorCode rdf:datatype="&xsd;integer">2</ap:ActuatorCode>
<ap:ActuatorExplain rdf:datatype="&xsd;string">"AirConditioner"</ap:ActuatorExplain>
<ap:ActuatorID rdf:datatype="&xsd;string">"DS02"</ap:ActuatorID>
<ap:ActuatorName rdf:datatype="&xsd;string">"LabConditioner"</ap:ActuatorName>
<ap:ConnectsTo rdf:resource="≈ActuatorMiddleware1" />
<ap:PowerConsumption rdf:datatype="&xsd;integer">1300</ap:PowerConsumption>
</owl:NamedIndividual>
<owl:NamedIndividual rdf:about="≈ActuatingDevice3">
<ace_lexicon:PN_sg>ActuatingDevice3</ace_lexicon:PN_sg>
<ap:ActuatorCode rdf:datatype="&xsd;integer">3</ap:ActuatorCode>
<ap:ActuatorExplain rdf:datatype="&xsd;string">"Printer"</ap:ActuatorExplain>
<ap:ActuatorID rdf:datatype="&xsd;string">"PT03"</ap:ActuatorID>
<ap:ActuatorName rdf:datatype="&xsd;string">"SamsungPrinter"</ap:ActuatorName>
<ap:ConnectsTo rdf:resource="≈ActuatorMiddleware2" />
<ap:PowerConsumption rdf:datatype="&xsd;integer">120</ap:PowerConsumption>
<rdf:type rdf:resource="≈Actuating_Device" />
</owl:NamedIndividual>
<owl:Class rdf:about="≈Actuating_Device">
<ace_lexicon:CN_pl>Actuating_Devices</ace_lexicon:CN_pl>
<ace_lexicon:CN_sg>Actuating_Device</ace_lexicon:CN_sg>
<rdfs:subClassOf rdf:resource="≈Device" />
<rdfs:subClassOf rdf:nodeID="autos10" />
<rdfs:subClassOf rdf:nodeID="autos11" />
</owl:Class>
<owl:DatatypeProperty rdf:about="≈ActuatorCode">
<ace_lexicon:TV_pl>ActuatorCode</ace_lexicon:TV_pl>
<ace_lexicon:TV_sg>ActuatorCodes</ace_lexicon:TV_sg>
<ace_lexicon:TV_vbg>ActuatorCoded</ace_lexicon:TV_vbg>
<rdfs:domain rdf:resource="≈Actuating_Device" />
<rdfs:range rdf:resource="&xsd;integer" />
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:about="≈ActuatorExplain">
<ace_lexicon:TV_pl>ActuatorExplain</ace_lexicon:TV_pl>
<ace_lexicon:TV_sg>ActuatorExplains</ace_lexicon:TV_sg>
<ace_lexicon:TV_vbg>ActuatorExplained</ace_lexicon:TV_vbg>
<rdfs:domain rdf:resource="≈Actuating_Device" />
<rdfs:range rdf:resource="&xsd;string" />
<rdfs:subPropertyOf rdf:resource="&owl;topDataProperty" />
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:about="≈ActuatorID">
<ace_lexicon:TV_pl>ActuatorID</ace_lexicon:TV_pl>
<ace_lexicon:TV_sg>ActuatorIDs</ace_lexicon:TV_sg>
<ace_lexicon:TV_vbg>ActuatorIDed</ace_lexicon:TV_vbg>
<rdfs:domain rdf:resource="≈Actuating_Device" />
<rdfs:range rdf:resource="&xsd;string" />
</owl:DatatypeProperty>
<owl:NamedIndividual rdf:about="≈ActuatorMiddleware1">
<ace_lexicon:PN_sg>ActuatorMiddleware1</ace_lexicon:PN_sg>
<ap:ConnectsTo rdf:resource="≈ActuatorServiceProvider1" />
<ap:MiddlewareCode rdf:datatype="&xsd;integer">1</ap:MiddlewareCode>
<ap:MiddlewareID rdf:datatype="&xsd;string">"MW101"</ap:MiddlewareID>
<ap:MiddlewareRight rdf:datatype="&xsd;string">false</ap:MiddlewareRight>
<ap:Use rdf:resource="≈ControlService1" />
<rdf:type rdf:resource="≈Actuator_Middleware" />
</owl:NamedIndividual>
<owl:NamedIndividual rdf:about="≈ActuatorMiddleware2">
<ace_lexicon:PN_sg>ActuatorMiddleware2</ace_lexicon:PN_sg>
<ap:ConnectsTo rdf:resource="≈ActuatorServiceProvider1" />
<ap:MiddlewareCode rdf:datatype="&xsd;integer">2</ap:MiddlewareCode>
<ap:MiddlewareID rdf:datatype="&xsd;string">"MW102"</ap:MiddlewareID>
<ap:MiddlewareRight rdf:datatype="&xsd;string">true</ap:MiddlewareRight>
<rdf:type rdf:resource="≈Actuator_Middleware" />
</owl:NamedIndividual>
<owl:Class rdf:about="≈ActuatorModel">
<rdfs:subClassOf rdf:nodeID="autos12" />
</owl:Class>
<owl:DatatypeProperty rdf:about="≈ActuatorName">
<ace_lexicon:TV_pl>ActuatorName</ace_lexicon:TV_pl>
<ace_lexicon:TV_sg>ActuatorNames</ace_lexicon:TV_sg>
<ace_lexicon:TV_vbg>ActuatorNamed</ace_lexicon:TV_vbg>
<rdfs:domain rdf:resource="≈Actuating_Device" />
<rdfs:range rdf:resource="&xsd;string" />
</owl:DatatypeProperty>
<owl:NamedIndividual rdf:about="≈ActuatorServiceProvider1">
<ace_lexicon:PN_sg>ActuatorServiceProvider1</ace_lexicon:PN_sg>
<ap:ConnectsTo rdf:resource="≈ActuatorSupportToolbox1" />
<rdf:type rdf:resource="≈Actuator_Service_Provider" />
</owl:NamedIndividual>
<owl:NamedIndividual rdf:about="≈ActuatorSupportToolbox1">
<ace_lexicon:PN_sg>ActuatorSupportToolbox1</ace_lexicon:PN_sg>
<ap:Perform rdf:resource="≈Management1" />
<rdf:type rdf:resource="≈Actuator_Support_Toolbox" />
</owl:NamedIndividual>
<owl:Class rdf:about="≈Actuator_Content_Service">
<ace_lexicon:CN_pl>Actuator_Content_Services</ace_lexicon:CN_pl>
<ace_lexicon:CN_sg>Actuator_Content_Service</ace_lexicon:CN_sg>
<rdfs:subClassOf rdf:resource="≈APServices" />
</owl:Class>
<owl:Class rdf:about="≈Actuator_Control_Service">
<ace_lexicon:CN_pl>Actuator_Control_Services</ace_lexicon:CN_pl>
<ace_lexicon:CN_sg>Actuator_Control_Service</ace_lexicon:CN_sg>
<rdfs:subClassOf rdf:resource="≈APServices" />
</owl:Class>
<owl:Class rdf:about="≈Actuator_Info_Management">
<ace_lexicon:CN_pl>Actuator_Info_Managements</ace_lexicon:CN_pl>
<ace_lexicon:CN_sg>Actuator_Info_Management</ace_lexicon:CN_sg>
<rdfs:subClassOf rdf:resource="≈Management" />
<rdfs:subClassOf rdf:nodeID="autos13" />
</owl:Class>
<owl:Class rdf:about="≈Actuator_Middleware">
<ace_lexicon:CN_pl>Actuator_Middlewares</ace_lexicon:CN_pl>
<ace_lexicon:CN_sg>Actuator_Middleware</ace_lexicon:CN_sg>
<rdfs:subClassOf rdf:nodeID="autos14" />
<rdfs:subClassOf rdf:nodeID="autos15" />
</owl:Class>
<owl:Class rdf:about="≈Actuator_Provider_Service">
<ace_lexicon:CN_pl>Actuator_Provider_Services</ace_lexicon:CN_pl>
<ace_lexicon:CN_sg>Actuator_Provider_Service</ace_lexicon:CN_sg>
<rdfs:subClassOf rdf:resource="≈APServices" />
</owl:Class>
<owl:Class rdf:about="≈Actuator_Service_Provider">
<ace_lexicon:CN_pl>Actuator_Service_Providers</ace_lexicon:CN_pl>
<ace_lexicon:CN_sg>Actuator_Service_Provider</ace_lexicon:CN_sg>
<rdfs:subClassOf rdf:nodeID="autos16" />
</owl:Class>
<owl:Class rdf:about="≈Actuator_State">
<ace_lexicon:CN_pl>Actuator_States</ace_lexicon:CN_pl>
<ace_lexicon:CN_sg>Actuator_State</ace_lexicon:CN_sg>
</owl:Class>
<owl:Class rdf:about="≈Actuator_Support_Toolbox">
<ace_lexicon:CN_pl>Actuator_Support_Toolboxes</ace_lexicon:CN_pl>
<ace_lexicon:CN_sg>Actuator_Support_Toolbox</ace_lexicon:CN_sg>
<rdfs:subClassOf rdf:nodeID="autos17" />
</owl:Class>
<owl:ObjectProperty rdf:about="≈ConnectsTo">
<ace_lexicon:TV_pl>ConnectsTo</ace_lexicon:TV_pl>
<ace_lexicon:TV_sg>ConnectsToes</ace_lexicon:TV_sg>
<ace_lexicon:TV_vbg>ConnectsToed</ace_lexicon:TV_vbg>
</owl:ObjectProperty>
<owl:NamedIndividual rdf:about="≈ControlService1">
<ace_lexicon:PN_sg>ControlService1</ace_lexicon:PN_sg>
</owl:NamedIndividual>
<owl:Class rdf:about="≈Device">
<ace_lexicon:CN_pl>Devices</ace_lexicon:CN_pl>
<ace_lexicon:CN_sg>Device</ace_lexicon:CN_sg>
</owl:Class>
<owl:DatatypeProperty rdf:about="≈Field_Key">
<rdfs:domain rdf:resource="≈Time_Attribute" />
<rdfs:range rdf:resource="&xsd;string" />
</owl:DatatypeProperty>
<owl:Class rdf:about="≈Management">
<ace_lexicon:CN_pl>Managements</ace_lexicon:CN_pl>
<ace_lexicon:CN_sg>Management</ace_lexicon:CN_sg>
</owl:Class>
<owl:NamedIndividual rdf:about="≈Management1">
<ace_lexicon:PN_sg>Management1</ace_lexicon:PN_sg>
</owl:NamedIndividual>
<owl:DatatypeProperty rdf:about="≈MiddlewareCode">
<ace_lexicon:TV_pl>MiddlewareCode</ace_lexicon:TV_pl>
<ace_lexicon:TV_sg>MiddlewareCodes</ace_lexicon:TV_sg>
<ace_lexicon:TV_vbg>MiddlewareCoded</ace_lexicon:TV_vbg>
<rdfs:domain rdf:resource="≈Actuator_Middleware" />
<rdfs:range rdf:resource="&xsd;long" />
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:about="≈MiddlewareID">
<ace_lexicon:TV_pl>MiddlewareID</ace_lexicon:TV_pl>
<ace_lexicon:TV_sg>MiddlewareIDs</ace_lexicon:TV_sg>
<ace_lexicon:TV_vbg>MiddlewareIDed</ace_lexicon:TV_vbg>
<rdfs:domain rdf:resource="≈Actuator_Middleware" />
<rdfs:range rdf:resource="&xsd;string" />
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:about="≈MiddlewareRight">
<ace_lexicon:TV_pl>MiddlewareRight</ace_lexicon:TV_pl>
<ace_lexicon:TV_sg>MiddlewareRights</ace_lexicon:TV_sg>
<ace_lexicon:TV_vbg>MiddlewareRighted</ace_lexicon:TV_vbg>
<rdfs:domain rdf:resource="≈Actuator_Middleware" />
<rdfs:range rdf:resource="&xsd;string" />
</owl:DatatypeProperty>
<owl:Class rdf:about="≈Middleware_Access_Management">
<ace_lexicon:CN_pl>Middleware_Access_Managements</ace_lexicon:CN_pl>
<ace_lexicon:CN_sg>Middleware_Access_Management</ace_lexicon:CN_sg>
<rdfs:subClassOf rdf:resource="≈Management" />
<rdfs:subClassOf rdf:nodeID="autos18" />
</owl:Class>
<owl:DatatypeProperty rdf:about="≈ModelBlend">
<rdfs:domain rdf:resource="≈ActuatorModel" />
<rdfs:range rdf:resource="&xsd;string" />
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:about="≈ModelCode">
<rdfs:domain rdf:resource="≈ActuatorModel" />
<rdfs:range rdf:resource="&xsd;long" />
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:about="≈ModelName">
<rdfs:domain rdf:resource="≈ActuatorModel" />
<rdfs:range rdf:resource="&xsd;string" />
</owl:DatatypeProperty>
<owl:Class rdf:about="≈Multistep_Attribute">
<rdf:type rdf:resource="&owl;Class" />
</owl:Class>
<owl:DatatypeProperty rdf:about="≈Multistep_Code">
<rdfs:domain rdf:resource="≈Multistep_Attribute" />
<rdfs:range rdf:resource="&xsd;long" />
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:about="≈Multistep_Explain">
<rdfs:domain rdf:resource="≈Multistep_Attribute" />
<rdfs:range rdf:resource="&xsd;string" />
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:about="≈Multistep_Name">
<rdfs:domain rdf:resource="≈Multistep_Attribute" />
<rdfs:range rdf:resource="&xsd;string" />
</owl:DatatypeProperty>
<owl:Class rdf:about="≈Mutlistep_Step">
<rdf:type rdf:resource="&owl;Class" />
</owl:Class>
<owl:ObjectProperty rdf:about="≈Perform">
<ace_lexicon:TV_pl>Perform</ace_lexicon:TV_pl>
<ace_lexicon:TV_sg>Performs</ace_lexicon:TV_sg>
<ace_lexicon:TV_vbg>Performed</ace_lexicon:TV_vbg>
<rdfs:domain rdf:resource="≈Actuator_Support_Toolbox" />
<rdfs:range rdf:resource="≈Management" />
</owl:ObjectProperty>
<owl:DatatypeProperty rdf:about="≈PowerConsumption">
<ace_lexicon:TV_pl>PowerConsumption</ace_lexicon:TV_pl>
<ace_lexicon:TV_sg>PowerConsumptions</ace_lexicon:TV_sg>
<ace_lexicon:TV_vbg>PowerConsumptioned</ace_lexicon:TV_vbg>
<rdfs:domain rdf:resource="≈Actuating_Device" />
<rdfs:range rdf:resource="&xsd;double" />
</owl:DatatypeProperty>
<owl:ObjectProperty rdf:about="≈Provide">
<ace_lexicon:TV_pl>Provide</ace_lexicon:TV_pl>
<ace_lexicon:TV_sg>Provides</ace_lexicon:TV_sg>
<ace_lexicon:TV_vbg>Provided</ace_lexicon:TV_vbg>
<rdfs:domain rdf:resource="≈Actuator_Service_Provider" />
<rdfs:range rdf:resource="≈APServices" />
</owl:ObjectProperty>
<owl:Class rdf:about="≈Range_Attribute">
<rdf:type rdf:resource="&owl;Class" />
</owl:Class>
<owl:DatatypeProperty rdf:about="≈Range_Code">
<rdfs:domain rdf:resource="≈Range_Attribute" />
<rdfs:range rdf:resource="&xsd;long" />
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:about="≈Range_Explain">
<rdfs:domain rdf:resource="≈Range_Attribute" />
<rdfs:range rdf:resource="&xsd;string" />
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:about="≈Range_Max_Value">
<rdfs:domain rdf:resource="≈Range_Attribute" />
<rdfs:range rdf:resource="&xsd;float" />
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:about="≈Range_Min_Value">
<rdfs:domain rdf:resource="≈Range_Attribute" />
<rdfs:range rdf:resource="&xsd;float" />
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:about="≈Range_Name">
<rdfs:domain rdf:resource="≈Range_Attribute" />
<rdfs:range rdf:resource="&xsd;string" />
</owl:DatatypeProperty>
<owl:Class rdf:about="≈Service_Info_Management">
<ace_lexicon:CN_pl>Service_Info_Managements</ace_lexicon:CN_pl>
<ace_lexicon:CN_sg>Service_Info_Management</ace_lexicon:CN_sg>
<rdfs:subClassOf rdf:resource="≈Management" />
</owl:Class>
<owl:DatatypeProperty rdf:about="≈Step_Code">
<rdfs:domain rdf:resource="≈Mutlistep_Step" />
<rdfs:range rdf:resource="&xsd;long" />
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:about="≈Step_Name">
<rdfs:domain rdf:resource="≈Mutlistep_Step" />
<rdfs:range rdf:resource="&xsd;string" />
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:about="≈Step_Value">
<rdfs:domain rdf:resource="≈Mutlistep_Step" />
<rdfs:range rdf:resource="&xsd;long" />
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:about="≈SwitchCode">
<rdfs:domain rdf:resource="≈Switch_Attribute" />
<rdfs:range rdf:resource="&xsd;long" />
</owl:DatatypeProperty>
<owl:Class rdf:about="≈Switch_Attribute">
<rdf:type rdf:resource="&owl;Class" />
</owl:Class>
<owl:DatatypeProperty rdf:about="≈Switch_Explain">
<rdfs:domain rdf:resource="≈Switch_Attribute" />
<rdfs:range rdf:resource="&xsd;string" />
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:about="≈Switch_Name">
<rdfs:domain rdf:resource="≈Switch_Attribute" />
<rdfs:range rdf:resource="&xsd;string" />
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:about="≈Switch_Off_State">
<rdfs:domain rdf:resource="≈Switch_Attribute" />
<rdfs:range rdf:resource="&xsd;string" />
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:about="≈Switch_On_State">
<rdfs:domain rdf:resource="≈Switch_Attribute" />
<rdfs:range rdf:resource="&xsd;string" />
</owl:DatatypeProperty>
<owl:Class rdf:about="≈Time_Attribute">
<rdf:type rdf:resource="&owl;Class" />
</owl:Class>
<owl:DatatypeProperty rdf:about="≈Time_Code">
<rdfs:domain rdf:resource="≈Time_Attribute" />
<rdfs:range rdf:resource="&xsd;long" />
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:about="≈Time_Explain">
<rdfs:domain rdf:resource="≈Time_Attribute" />
<rdfs:range rdf:resource="&xsd;string" />
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:about="≈Time_Name">
<rdfs:domain rdf:resource="≈Time_Attribute" />
<rdfs:range rdf:resource="&xsd;string" />
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:about="≈TypeCode">
<rdfs:domain rdf:resource="≈TypeInformation" />
<rdfs:range rdf:resource="&xsd;long" />
<rdfs:subPropertyOf rdf:resource="&owl;topDataProperty" />
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:about="≈TypeId">
<rdfs:domain rdf:resource="≈TypeInformation" />
<rdfs:range rdf:resource="&xsd;string" />
</owl:DatatypeProperty>
<owl:Class rdf:about="≈TypeInformation">
<rdf:type rdf:resource="&owl;Class" />
</owl:Class>
<owl:DatatypeProperty rdf:about="≈TypeName">
<rdfs:domain rdf:resource="≈TypeInformation" />
<rdfs:range rdf:resource="&xsd;string" />
</owl:DatatypeProperty>
<owl:ObjectProperty rdf:about="≈Use">
<ace_lexicon:TV_pl>Use</ace_lexicon:TV_pl>
<ace_lexicon:TV_sg>Uses</ace_lexicon:TV_sg>
<ace_lexicon:TV_vbg>Used</ace_lexicon:TV_vbg>
</owl:ObjectProperty>
<owl:ObjectProperty rdf:about="≈hasDuration">
<rdfs:domain rdf:resource="≈Actuating_Device" />
<rdfs:range rdf:resource="≈Time_Attribute" />
</owl:ObjectProperty>
<owl:ObjectProperty rdf:about="≈hasModel">
<rdf:type rdf:resource="&owl;ObjectProperty" />
</owl:ObjectProperty>
<owl:ObjectProperty rdf:about="≈hasMultistep">
<rdfs:domain rdf:resource="≈Actuating_Device" />
<rdfs:range rdf:resource="≈Multistep_Attribute" />
</owl:ObjectProperty>
<owl:ObjectProperty rdf:about="≈hasRange">
<rdfs:domain rdf:resource="≈Actuating_Device" />
<rdfs:range rdf:resource="≈Range_Attribute" />
</owl:ObjectProperty>
<owl:ObjectProperty rdf:about="≈hasState">
<ace_lexicon:TV_pl>hasState</ace_lexicon:TV_pl>
<ace_lexicon:TV_sg>hasStates</ace_lexicon:TV_sg>
<ace_lexicon:TV_vbg>hasStated</ace_lexicon:TV_vbg>
<rdf:type rdf:resource="&owl;FunctionalProperty" />
<rdfs:domain rdf:resource="≈Device" />
<rdfs:range rdf:resource="≈Actuator_State" />
</owl:ObjectProperty>
<owl:ObjectProperty rdf:about="≈hasStep">
<rdfs:domain rdf:resource="≈Actuating_Device" />
<rdfs:range rdf:resource="≈Mutlistep_Step" />
</owl:ObjectProperty>
<owl:ObjectProperty rdf:about="≈hasType">
<rdfs:domain rdf:resource="≈ActuatorModel" />
<rdfs:range rdf:resource="≈TypeInformation" />
</owl:ObjectProperty>
<owl:DatatypeProperty rdf:about="≈productTime">
<rdfs:domain rdf:resource="≈Actuating_Device" />
<rdfs:range rdf:resource="&xsd;dateTime" />
</owl:DatatypeProperty>
<owl:Restriction rdf:nodeID="autos10">
<owl:onClass rdf:resource="≈ActuatorModel" />
<owl:onProperty rdf:resource="≈hasModel" />
<owl:qualifiedCardinality rdf:datatype="&xsd;nonNegativeInteger">1</owl:qualifiedCardinality>
</owl:Restriction>
<owl:Restriction rdf:nodeID="autos11">
<owl:onClass rdf:resource="≈Actuator_State" />
<owl:onProperty rdf:resource="≈hasState" />
<owl:qualifiedCardinality rdf:datatype="&xsd;nonNegativeInteger">1</owl:qualifiedCardinality>
</owl:Restriction>
<owl:Restriction rdf:nodeID="autos12">
<owl:onClass rdf:resource="≈TypeInformation" />
<owl:onProperty rdf:resource="≈hasType" />
<owl:qualifiedCardinality rdf:datatype="&xsd;nonNegativeInteger">1</owl:qualifiedCardinality>
</owl:Restriction>
<owl:Restriction rdf:nodeID="autos13">
<owl:onProperty rdf:resource="≈Use" />
<owl:someValuesFrom rdf:resource="≈Actuator_Content_Service" />
</owl:Restriction>
<owl:Restriction rdf:nodeID="autos14">
<owl:maxQualifiedCardinality rdf:datatype="&xsd;nonNegativeInteger">1</owl:maxQualifiedCardinality>
<owl:onClass rdf:resource="≈Actuator_Service_Provider" />
<owl:onProperty rdf:resource="≈ConnectsTo" />
</owl:Restriction>
<owl:Restriction rdf:nodeID="autos15">
<owl:onProperty rdf:resource="≈Use" />
<owl:someValuesFrom rdf:resource="≈Actuator_Control_Service" />
</owl:Restriction>
<owl:Restriction rdf:nodeID="autos16">
<owl:onProperty rdf:resource="≈ConnectsTo" />
<owl:someValuesFrom rdf:resource="≈Actuator_Support_Toolbox" />
</owl:Restriction>
<owl:Restriction rdf:nodeID="autos17">
<owl:onProperty rdf:resource="≈Perform" />
<owl:someValuesFrom rdf:resource="≈Management" />
</owl:Restriction>
<owl:Restriction rdf:nodeID="autos18">
<owl:onProperty rdf:resource="≈Use" />
<owl:someValuesFrom rdf:resource="≈Actuator_Content_Service" />
</owl:Restriction>
</rdf:RDF>
我在这里使用的代码
string actID = txtActuatorId.Text;
string actState = txtActautorState.Text;
TripleStore store = new TripleStore();
Graph mygraph = new Graph();
FileLoader.Load(mygraph, "D:/ActuatorServiceProvider.owl", new RdfXmlParser());
mygraph.BaseUri = null;
store.Add(mygraph);
SparqlUpdateParser myparser = new SparqlUpdateParser();
SparqlParameterizedString querystring = new SparqlParameterizedString();
querystring.CommandText = "PREFIX ap: <http://www.semanticweb.org/faiza/ontologies/2014/10/ActuatorProvider> " +
"PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>" +
"PREFIX owl: <http://www.w3.org/2002/07/owl#>" +
"PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>" +
"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>" +
"DELETE {?ind ap:AccessState ?t.} " +
"INSERT {?ind ap:AccessState \"" + actState + "\"^^xsd:string.} " +
"WHERE {?ind ap:ActuatorID \"" + actID + "\"^^xsd:string.} ";
SparqlUpdateCommandSet cmds = myparser.ParseFromString(querystring);
LeviathanUpdateProcessor processor = new LeviathanUpdateProcessor(store);
processor.ProcessCommandSet(cmds);
mygraph.SaveToFile("D:/ActuatorServiceProvider.owl");
答案 0 :(得分:1)
您的数据看起来有点奇怪,因为您实际上似乎在值中包含双引号,例如:
LinearLayout
这也可以解释为什么您的更新不会发生变化,因为您正在搜索<ap:ActuatorExplain rdf:datatype="&xsd;string">"AirConditioner"</ap:ActuatorExplain>
<ap:ActuatorID rdf:datatype="&xsd;string">"DS02"</ap:ActuatorID>
<ap:ActuatorName rdf:datatype="&xsd;string">"LabConditioner"</ap:ActuatorName>
而您的数据包含id
。
您可以通过在查询中添加引号来修复查询,但说实话,您的实际数据似乎已损坏,您应该通过删除不必要的"id"
周围值来解决此问题。一旦您的数据得到修复,您的查询就可以正常工作。