Я использую Protege-5.0.0-beta-17
для разработки онтологии и apache-jena-fuseki-2.0.0
для размещения онтологии. У него есть следующие лица. Предыстория этого сценария заключается в том, что есть политики под http://mywebsite.com/module/ontologies/local_policy
. В основном политики являются типом local_policies.
<!-- http://mywebsite.com/module/ontologies/policy1 -->
<owl:NamedIndividual rdf:about="http://mywebsite.com/module/ontologies/policy1">
<rdf:type rdf:resource="http://mywebsite.com/module/ontologies/local_policy"/>
<PolicyName rdf:datatype="&xsd;string">1.1.1</PolicyName>
<PolicyResponsibility rdf:datatype="&xsd;string">CIO</PolicyResponsibility>
<PolicyKeyword rdf:datatype="&xsd;string">Information Security</PolicyKeyword>
<PolicyMaturityLevel rdf:datatype="&xsd;string">Interactive-Information</PolicyMaturityLevel>
<PolicyConsulted rdf:datatype="&xsd;string">CERT</PolicyConsulted>
<PolicyDesc rdf:datatype="&xsd;string">The relevant sections of Information Security Policy which has been published by government should be used for classifying organizational data and information. The particular policies have been elaborated in "Information assets classification and control" of the Information Security (IS) policy (http://www.government.lk/images/secPolicy/Asset_Classification_and_Control.doc). The Assistance of Computer Emergency Readiness Team (CERT) could be obtained for this purpose.</PolicyDesc>
<apply rdf:resource="http://mywebsite.com/module/ontologies/focusArea1"/>
</owl:NamedIndividual>
<!-- http://mywebsite.com/module/ontologies/policy2 -->
<owl:NamedIndividual rdf:about="http://mywebsite.com/module/ontologies/policy2">
<rdf:type rdf:resource="http://mywebsite.com/module/ontologies/local_policy"/>
<PolicyName rdf:datatype="&xsd;string">2</PolicyName>
<PolicyResponsibility rdf:datatype="&xsd;string">CIO</PolicyResponsibility>
<PolicyKeyword rdf:datatype="&xsd;string">Information Security</PolicyKeyword>
<PolicyMaturityLevel rdf:datatype="&xsd;string">Interactive-Information</PolicyMaturityLevel>
<PolicyConsulted rdf:datatype="&xsd;string">CERT</PolicyConsulted>
<PolicyDesc rdf:datatype="&xsd;string">The policies defined under the “Privacy and Citizen Information Protection” of the IS policy which have been published by government should be implemented. The guidelines provided in the above section of IS policy could be accessed through (http://www.government.lk/images/secPolicy/Privacy__Citizen_Information_Protection.doc). The assistance of CERT could be obtained for achieving this purpose.</PolicyDesc>
<apply rdf:resource="http://mywebsite.com/module/ontologies/focusArea2"/>
</owl:NamedIndividual>
<!-- http://mywebsite.com/module/ontologies/policy3 -->
<owl:NamedIndividual rdf:about="http://mywebsite.com/module/ontologies/policy3">
<rdf:type rdf:resource="http://mywebsite.com/module/ontologies/local_policy"/>
<PolicyName rdf:datatype="&xsd;string">3</PolicyName>
<PolicyDesc rdf:datatype="&xsd;string">A matrix could be defined for identifying all possible audience and possible delivery channels of organizational data/information. The template given in Annex 001 could be used for this purpose. (refer Annex 001 – Information/Data classification matrix)</PolicyDesc>
<PolicyResponsibility rdf:datatype="&xsd;string">CIO</PolicyResponsibility>
<PolicyConsulted rdf:datatype="&xsd;string">government</PolicyConsulted>
<PolicyMaturityLevel rdf:datatype="&xsd;string">Initial Infomration</PolicyMaturityLevel>
<PolicyKeyword rdf:datatype="&xsd;string">Service Delivery Channels</PolicyKeyword>
<apply rdf:resource="http://mywebsite.com/module/ontologies/focusArea3"/>
</owl:NamedIndividual>
Что я пытаюсь сделать, так это запросить онтологию и получить этих людей. Также обратите внимание, что есть и другие лица. Ниже приведен запрос, который я использую.
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix owl: <http://www.w3.org/2002/07/owl#>
SELECT ?x
WHERE {
?x rdf:type "http://mywebsite.com/module/ontologies/local_policy"
}
Но это не приносит людей, как ожидалось.
- Как я могу исправить это, чтобы получить все политики типа local_policies?
- Также я хотел бы сузить поисковый запрос, в котором политики применяются к определенной области фокусировки, например
<apply rdf:resource="http://mywebsite.com/module/ontologies/focusArea1"/>
. Если да, то как я могу расширить эту политику запросов, которая также имеет focusArea?
http://mywebsite.com/module/ontologies/
. - person Artemis   schedule 13.04.2015