Skip to content

Instantly share code, notes, and snippets.

@BillBarnhill
Created May 3, 2010 22:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BillBarnhill/388659 to your computer and use it in GitHub Desktop.
Save BillBarnhill/388659 to your computer and use it in GitHub Desktop.
@prefix : <urn:j:>.
@prefix gage: <urn:j:gage:>.
@prefix howe: <urn:j:howe:>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
@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#> .
@prefix windows: <urn:windows:> .
windows:Computer
owl:oneOf (gage:computer howe:computer).
gage:computer
a windows:Computer;
windows:cpuUtilization "80"^^xsd:int;
windows:process gage:pid1;
windows:process gage:pid2;
windows:process gage:pid3;
windows:process gage:pid4.
gage:pid1
a windows:Process;
windows:processDescription "wordpad.exe"^^xsd:string;
windows:cpuUsage "61"^^xsd:int.
gage:pid2
a windows:Process;
windows:processDescription "svchost.exe"^^xsd:string;
windows:cpuUsage "10"^^xsd:int.
gage:pid3
a windows:Process;
windows:processDescription "svchost.exe"^^xsd:string;
windows:cpuUsage "80"^^xsd:int.
gage:pid4
a windows:Process;
windows:processDescription "System Idle"^^xsd:string;
windows:cpuUsage "70"^^xsd:int.
howe:computer
a windows:Computer;
windows:cpuUtilization "20"^^xsd:int.
@prefix : <urn:windows:>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
@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#> .
:processDescription
a owl:DatatypeProperty;
rdfs:range xsd:string;
owl:cardinality 1;
rdfs:domain :Process.
:cpuUsage
a owl:FunctionalProperty;
a owl:DatatypeProperty;
rdfs:domain :Process.
:cpuUtilization
a owl:FunctionalProperty;
a owl:DatatypeProperty;
rdfs:domain :Computer.
:process
a owl:InverseFunctionalProperty;
a owl:ObjectProperty;
rdfs:domain :Computer;
rdfs:range :Process.
:on
a owl:ObjectProperty;
owl:inverseOf :process.
:Process
rdfs:subClassOf owl:Thing;
a owl:Class.
:SystemProcess
a owl:Class;
owl:disjointWith :NonSystemProcess;
owl:equivalentClass
[
owl:intersectionOf (
:Process
[a owl:Restriction;
owl:onProperty :processDescription;
owl:someValuesFrom
[
rdf:type owl:DataRange;
owl:oneOf ( "svchost.exe"^^xsd:string "System Idle"^^xsd:string );
owl:onDataRange xsd:string
]
]
)
].
:NonSystemProcess
a owl:Class;
owl:disjointWith :SystemProcess;
owl:equivalentClass
[
owl:intersectionOf (
:Process
[a owl:Restriction;
owl:onProperty :processDescription;
owl:datatypeComplementOf [
owl:allValuesFrom
[
rdf:type owl:DataRange;
owl:oneOf ( "svchost.exe"^^xsd:string "System Idle"^^xsd:string );
owl:onDataRange xsd:string
]
]
]
)
].
# -- Following does not contain instances and does not throw errors
#:NonSystemProcess
# owl:equivalentClass [
# owl:intersectionOf (
# [owl:objectComplementOf :SystemProcess]
# :Process
# )
# ].
# -- Following does not contain instances and does not throw errors
#:NonSystemProcess
# owl:equivalentClass [
# owl:objectComplementOf :SystemProcess
# ].
:zeroRange
rdf:type owl:DataRange;
xsd:minInclusive 0;
xsd:maxInclusive 0;
owl:onDataRange xsd:int.
:Process0
a owl:Class;
owl:equivalentClass
[
owl:intersectionOf (
:Process
[
a owl:Restriction;
owl:onProperty :cpuUsage;
owl:someValuesFrom :zeroRange
]
)
].
:Process10
a owl:Class;
owl:equivalentClass
[
owl:intersectionOf (
:Process
[a owl:Restriction;
owl:onProperty :cpuUsage;
owl:someValuesFrom
[
rdf:type owl:DataRange;
xsd:minInclusive 1;
xsd:maxInclusive 10;
owl:onDataRange xsd:int
]
]
)
].
:Process20
a owl:Class;
owl:equivalentClass
[
owl:intersectionOf (
:Process
[a owl:Restriction;
owl:onProperty :cpuUsage;
owl:someValuesFrom
[
rdf:type owl:DataRange;
xsd:minInclusive 11;
xsd:maxInclusive 20;
owl:onDataRange xsd:int
]
]
)
].
:Process30
a owl:Class;
owl:equivalentClass
[
owl:intersectionOf (
:Process
[a owl:Restriction;
owl:onProperty :cpuUsage;
owl:someValuesFrom
[
rdf:type owl:DataRange;
xsd:minInclusive 21;
xsd:maxInclusive 30;
owl:onDataRange xsd:int
]
]
)
].
:Process40
a owl:Class;
owl:equivalentClass
[
owl:intersectionOf (
:Process
[a owl:Restriction;
owl:onProperty :cpuUsage;
owl:someValuesFrom
[
rdf:type owl:DataRange;
xsd:minInclusive 31;
xsd:maxInclusive 40;
owl:onDataRange xsd:int
]
]
)
].
:Process50
a owl:Class;
owl:equivalentClass
[
owl:intersectionOf (
:Process
[a owl:Restriction;
owl:onProperty :cpuUsage;
owl:someValuesFrom
[
rdf:type owl:DataRange;
xsd:minInclusive 41;
xsd:maxInclusive 50;
owl:onDataRange xsd:int
]
]
)
].
:Process60
a owl:Class;
owl:equivalentClass
[
owl:intersectionOf (
:Process
[a owl:Restriction;
owl:onProperty :cpuUsage;
owl:someValuesFrom
[
rdf:type owl:DataRange;
xsd:minInclusive 51;
xsd:maxInclusive 60;
owl:onDataRange xsd:int
]
]
)
].
:Process70
a owl:Class;
owl:equivalentClass
[
owl:intersectionOf (
:Process
[a owl:Restriction;
owl:onProperty :cpuUsage;
owl:someValuesFrom
[
rdf:type owl:DataRange;
xsd:minInclusive 61;
xsd:maxInclusive 70;
owl:onDataRange xsd:int
]
]
)
].
:Process80
a owl:Class;
owl:equivalentClass
[
owl:intersectionOf (
:Process
[a owl:Restriction;
owl:onProperty :cpuUsage;
owl:someValuesFrom
[
rdf:type owl:DataRange;
xsd:minInclusive 71;
xsd:maxInclusive 80;
owl:onDataRange xsd:int
]
]
)
].
:Process90
a owl:Class;
owl:equivalentClass
[
owl:intersectionOf (
:Process
[a owl:Restriction;
owl:onProperty :cpuUsage;
owl:someValuesFrom
[
rdf:type owl:DataRange;
xsd:minInclusive 81;
xsd:maxInclusive 90;
owl:onDataRange xsd:int
]
]
)
].
:Process100
a owl:Class;
owl:equivalentClass
[
owl:intersectionOf (
:Process
[a owl:Restriction;
owl:onProperty :cpuUsage;
owl:someValuesFrom
[
rdf:type owl:DataRange;
xsd:minInclusive 91;
xsd:maxInclusive 100;
owl:onDataRange xsd:int
]
]
)
].
:SystemProcess
rdfs:subClassOf owl:Thing;
a owl:Class.
:ImmovableProcess
rdfs:subClassOf owl:Thing;
a owl:Class.
:MovableProcess
rdfs:subClassOf owl:Thing;
a owl:Class.
:Computer
rdfs:subClassOf owl:Thing;
a owl:Class.
:ComputerUtilized0
rdfs:subClassOf owl:Thing;
a owl:Class.
:ComputerUtilized10
rdfs:subClassOf owl:Thing;
a owl:Class.
:ComputerUtilized20
a owl:Class;
owl:equivalentClass
[
owl:intersectionOf (
:Computer
[
a owl:Restriction;
owl:onProperty :cpuUtilization;
owl:someValuesFrom
[
rdf:type owl:DataRange;
xsd:minInclusive 11;
xsd:maxInclusive 20;
owl:onDataRange xsd:int
]
]
)
].
:ComputerUtilized30
rdfs:subClassOf owl:Thing;
a owl:Class.
:ComputerUtilized40
rdfs:subClassOf owl:Thing;
a owl:Class.
:ComputerUtilized50
rdfs:subClassOf owl:Thing;
a owl:Class.
:ComputerUtilized60
a owl:Class;
owl:equivalentClass
[
owl:intersectionOf (
:Computer
[
a owl:Restriction;
owl:onProperty :cpuUtilization;
owl:someValuesFrom
[
rdf:type owl:DataRange;
xsd:minInclusive 51;
xsd:maxInclusive 60;
owl:onDataRange xsd:int
]
]
)
].
:ComputerUtilized70
rdfs:subClassOf owl:Thing;
a owl:Class.
:ComputerUtilized80
rdfs:subClassOf owl:Thing;
a owl:Class.
:ComputerUtilized90
rdfs:subClassOf owl:Thing;
a owl:Class.
:ComputerUtilized100
rdfs:subClassOf owl:Thing;
a owl:Class.
:OverUtilizedComputer
rdfs:subClassOf owl:Thing;
a owl:Class.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment