Automation Contribution Options
As discussed in
AutomationMeetings20120223, some examples of the discussed Automation Contribution options have been created.
Option A - generic resource as currently defined in the draft specification
#Example Automation Result - freeform contributions
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix dcterms: <http://purl.org/dc/terms/>.
@prefix oslc: <http://open-services.net/ns/core#>.
@prefix oslc_auto: <http://open-services.net/ns/auto#>.
@prefix my_ns: <http://example.org/ns/my_ns#>.
<http://example.org/autoResults/result1>
dcterms:title "Automation Result 1";
dcterms:identifier "1"^^<http://www.w3.org/2001/XMLSchema#integer>;
rdf:type oslc_auto:AutomationResult;
oslc_auto:state "Complete";
oslc_auto:verdict "Success";
oslc_auto:pass "true";
oslc_auto:reportsOnAutomationPlan <http://example.org/autoPlan/plan1>;
oslc_auto:hasContribution <http://example.org/testResult/result1>;
oslc_auto:hasContribution _:log_contrib;
oslc_auto:hasContribution _:approval_contrib.
_:log_contrib
my_ns:logfile <http://buildserver1/builds/123/logfile.txt>.
_:approval_contrib
my_ns:approver "Mike Fiedler";
my_ns:approval_status "Approved".
Option B - resource with some required basic attributes
#Example Automation Result - required attributes
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix dcterms: <http://purl.org/dc/terms/>.
@prefix oslc: <http://open-services.net/ns/core#>.
@prefix oslc_auto: <http://open-services.net/ns/auto#>.
@prefix my_ns: <http://example.org/ns/my_ns#>.
<http://example.org/autoResults/result1>
dcterms:title "Automation Result 1";
dcterms:identifier "1"^^<http://www.w3.org/2001/XMLSchema#integer>;
rdf:type oslc_auto:AutomationResult;
oslc_auto:state "Complete";
oslc_auto:verdict "Success";
oslc_auto:pass "true";
oslc_auto:reportsOnAutomationPlan <http://example.org/autoPlan/plan1>;
oslc_auto:hasContribution <http://example.org/testResult/result1>;
oslc_auto:hasContribution _:logfile_contrib;
oslc_auto:hasContribution _:approval_contrib .
_:log_contrib
dcterms:title "logfile.txt"
dcterms:description "Logfile for build 123";
dcterms:type my_ns:Logfile;
my_ns:logfile <http://buildserver1/builds/123/logfile.txt>.
_:approval_contrib
dcterms:title "Approval Record 123"
dcterms:description "The approval record for build 123";
dcterms:type my_ns:Approval;
my_ns:approver "Mike Fiedler";
my_ns:approval_status "Approved".
Option C - resource with additional attributes via reification - not sure this sample is right but we can discuss
# Same as above, but using reified statements to describe the contributions
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix dcterms: <http://purl.org/dc/terms/>.
@prefix oslc: <http://open-services.net/ns/core#>.
@prefix oslc_auto: <http://open-services.net/ns/auto#>.
@prefix my_ns: <http://example.org/ns/my_ns#>.
<http://example.org/autoResults/result1>
dcterms:title "Automation Result 1";
dcterms:identifier "1"^^<http://www.w3.org/2001/XMLSchema#integer>;
rdf:type oslc_auto:AutomationResult;
oslc_auto:state "Complete";
oslc_auto:verdict "Success";
oslc_auto:pass "true";
oslc_auto:reportsOnAutomationPlan <http://example.org/autoPlan/plan1>;
oslc_auto:hasContribution <http://example.org/testResult/result1>;
oslc_auto:hasContribution _:log_contrib;
oslc_auto:hasContribution _:approval_contrib.
_:log_contrib
my_ns:logfile <http://buildserver1/builds/123/logfile.txt>.
_:log_contrib dcterms:title "logfile.txt".
_:log_contrib dcterms:description "Logfile for build 123".
_:log_contrib dcterms:type my_ns:Logfile.
_:approval_contrib
my_ns:approver "Mike Fiedler";
my_ns:approval_status "Approved".
_:approval_contrib dcterms:title "Approval Record 123".
_:approval_contrib dcterms:description "The approval record for build 123".
_:approval_contrib dcterms:type my_ns:Approval.
_:approval_contrib my_ns:approver "Mike Fiedler".
_:approval_contrib my_ns:approval_status "Approved".