Skip to content

Commit a7b98e2

Browse files
oxistoanatheka
andauthored
Introduces ObjectStorageService (#49)
* Introduces `ObjectStorageService` Represents the service to access an object storage. Moved http endpoint from storage service to this specific one, as only this one has an HTTP endpoint. * Use 'rdfs:comment' instead of 'dc:description' * Added more comments to storage services Co-authored-by: Angelika Schneider <angelika.schneider@aisec.fraunhofer.de>
1 parent 017c52d commit a7b98e2

5 files changed

Lines changed: 37 additions & 14 deletions

File tree

cloudpg/src/main/java/io/clouditor/graph/passes/Azure.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ class AzurePass : CloudResourceDiscoveryPass() {
427427
// specific to the Storage containers, e.g., authenticity, url,
428428
// For now we fill it out as good as we can with the current ontology
429429
val storageAccount =
430-
StorageService(
430+
ObjectStorageService(
431431
HttpEndpoint(
432432
auth,
433433
null,

cloudpg/src/main/java/io/clouditor/graph/passes/KubernetesPass.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ class KubernetesPass : CloudResourceDiscoveryPass() {
151151
if (service?.name == "postgres") {
152152
val db =
153153
RelationalDatabaseService(
154-
null,
155154
mutableListOf<Storage>(),
156155
container,
157156
service.ips,
@@ -168,7 +167,6 @@ class KubernetesPass : CloudResourceDiscoveryPass() {
168167
if (service?.name == "mongo") {
169168
val db =
170169
DocumentDatabaseService(
171-
null,
172170
mutableListOf<Storage>(),
173171
container,
174172
service.ips,

cloudpg/src/main/java/io/clouditor/graph/testing/LocalTestingPass.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ class LocalTestingPass : Pass() {
116116
if (service.name == "postgres") {
117117
val db =
118118
RelationalDatabaseService(
119-
null,
120119
mutableListOf<Storage>(),
121120
null,
122121
null,
@@ -132,7 +131,6 @@ class LocalTestingPass : Pass() {
132131
if (service.name == "mongo") {
133132
val db =
134133
DocumentDatabaseService(
135-
null,
136134
mutableListOf<Storage>(),
137135
null,
138136
null,

owl2java/resources/urn_webprotege_ontology_e4316a28-d966-4499-bd93-6be721055117.owx

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,9 @@
242242
<Declaration>
243243
<Class IRI="http://graph.clouditor.io/classes/ObjectStorageRequest"/>
244244
</Declaration>
245+
<Declaration>
246+
<Class IRI="http://graph.clouditor.io/classes/ObjectStorageService"/>
247+
</Declaration>
245248
<Declaration>
246249
<Class IRI="http://graph.clouditor.io/classes/Operation"/>
247250
</Declaration>
@@ -1572,6 +1575,17 @@
15721575
<Literal>xsd:de.fraunhofer.aisec.cpg.graph.Node</Literal>
15731576
</DataHasValue>
15741577
</SubClassOf>
1578+
<SubClassOf>
1579+
<Class IRI="http://graph.clouditor.io/classes/ObjectStorageService"/>
1580+
<Class IRI="http://graph.clouditor.io/classes/StorageService"/>
1581+
</SubClassOf>
1582+
<SubClassOf>
1583+
<Class IRI="http://graph.clouditor.io/classes/ObjectStorageService"/>
1584+
<ObjectSomeValuesFrom>
1585+
<ObjectProperty abbreviatedIRI="prop:offers"/>
1586+
<Class IRI="http://graph.clouditor.io/classes/HttpEndpoint"/>
1587+
</ObjectSomeValuesFrom>
1588+
</SubClassOf>
15751589
<SubClassOf>
15761590
<Class IRI="http://graph.clouditor.io/classes/Operation"/>
15771591
<Class IRI="http://graph.clouditor.io/classes/Functionality"/>
@@ -1697,13 +1711,6 @@
16971711
<Class IRI="http://graph.clouditor.io/classes/Storage"/>
16981712
</ObjectSomeValuesFrom>
16991713
</SubClassOf>
1700-
<SubClassOf>
1701-
<Class IRI="http://graph.clouditor.io/classes/StorageService"/>
1702-
<ObjectSomeValuesFrom>
1703-
<ObjectProperty abbreviatedIRI="prop:offers"/>
1704-
<Class IRI="http://graph.clouditor.io/classes/HttpEndpoint"/>
1705-
</ObjectSomeValuesFrom>
1706-
</SubClassOf>
17071714
<SubClassOf>
17081715
<Class IRI="http://graph.clouditor.io/classes/TransportEncryption"/>
17091716
<Class IRI="http://graph.clouditor.io/classes/Confidentiality"/>
@@ -2403,6 +2410,11 @@ name = metadata.name</Literal>
24032410
<IRI>http://graph.clouditor.io/classes/DatabaseQuery</IRI>
24042411
<Literal>DatabaseQuery</Literal>
24052412
</AnnotationAssertion>
2413+
<AnnotationAssertion>
2414+
<AnnotationProperty abbreviatedIRI="rdfs:comment"/>
2415+
<IRI>http://graph.clouditor.io/classes/DatabaseService</IRI>
2416+
<Literal>This class represents a database service. For example, a postgres SQL server would be modelled as a database service (with a host and IP) and the individual tables or collections would be modelled as a DatabaseStorage entity.</Literal>
2417+
</AnnotationAssertion>
24062418
<AnnotationAssertion>
24072419
<AnnotationProperty abbreviatedIRI="rdfs:label"/>
24082420
<IRI>http://graph.clouditor.io/classes/DatabaseService</IRI>
@@ -2614,7 +2626,7 @@ name = metadata.name</Literal>
26142626
<Literal xml:lang="english">NetworkSecurityGroup</Literal>
26152627
</AnnotationAssertion>
26162628
<AnnotationAssertion>
2617-
<AnnotationProperty IRI="http://purl.org/dc/elements/1.1/description"/>
2629+
<AnnotationProperty abbreviatedIRI="rdfs:comment"/>
26182630
<IRI>http://graph.clouditor.io/classes/NetworkService</IRI>
26192631
<Literal>A NetworkService is an application (on the network layer) running on a Compute resource. It provides access to a resource</Literal>
26202632
</AnnotationAssertion>
@@ -2653,6 +2665,16 @@ name = metadata.name</Literal>
26532665
<IRI>http://graph.clouditor.io/classes/ObjectStorageRequest</IRI>
26542666
<Literal xml:lang="english">ObjectStorageRequest</Literal>
26552667
</AnnotationAssertion>
2668+
<AnnotationAssertion>
2669+
<AnnotationProperty abbreviatedIRI="rdfs:comment"/>
2670+
<IRI>http://graph.clouditor.io/classes/ObjectStorageService</IRI>
2671+
<Literal>An object storage service represents the network service that is used to access a list of object storage containers. The storage itself is modelled as a ObjectStorage. The service has an http endpoint.</Literal>
2672+
</AnnotationAssertion>
2673+
<AnnotationAssertion>
2674+
<AnnotationProperty abbreviatedIRI="rdfs:label"/>
2675+
<IRI>http://graph.clouditor.io/classes/ObjectStorageService</IRI>
2676+
<Literal>ObjectStorageService</Literal>
2677+
</AnnotationAssertion>
26562678
<AnnotationAssertion>
26572679
<AnnotationProperty abbreviatedIRI="rdfs:label"/>
26582680
<IRI>http://graph.clouditor.io/classes/Operation</IRI>
@@ -2728,6 +2750,11 @@ name = metadata.name</Literal>
27282750
<IRI>http://graph.clouditor.io/classes/Storage</IRI>
27292751
<Literal xml:lang="english">Storage</Literal>
27302752
</AnnotationAssertion>
2753+
<AnnotationAssertion>
2754+
<AnnotationProperty abbreviatedIRI="rdfs:comment"/>
2755+
<IRI>http://graph.clouditor.io/classes/StorageService</IRI>
2756+
<Literal>This entity represents a network-based service that can be used to access a particular storage backend. It has multiple subclasses, e.g., for databases or object stores. It has a list of storage resources associated to it.</Literal>
2757+
</AnnotationAssertion>
27312758
<AnnotationAssertion>
27322759
<AnnotationProperty abbreviatedIRI="rdfs:label"/>
27332760
<IRI>http://graph.clouditor.io/classes/StorageService</IRI>

owl2java/src/main/kotlin/io/clouditor/graph/OWLCloudOntology.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ class OWLCloudOntology(filepath: String, private val resourceNameFromOwlFile: St
583583
for (elem in nce.classesInSignature) {
584584
for (item in EntitySearcher.getAnnotationObjects(elem, ontology!!)) {
585585
if (item != null) {
586-
if (item.property.iri.remainder.get().toString() == "description") {
586+
if (item.property.iri.remainder.get() == "comment") {
587587
var description = item.value.toString()
588588
return description.substring(1, description.length-1)
589589
}

0 commit comments

Comments
 (0)