Skip to content

Commit 9abb5ff

Browse files
authored
Merge pull request #2 from SPYDERISK/1-remove-mis-and-twis-labels
fix: removed dependency on TWIS.csv having a 'label' property
2 parents 46d3898 + dfc7da9 commit 9abb5ff

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

Diff for: csv2nq.py

-5
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,6 @@ def output_twis(nqw, heading, twa_misbehaviour):
622622
# Check that the table is as expected: if fields are missing this will raise an exception
623623
header = next(reader)
624624
uri_index = header.index("URI")
625-
label_index = header.index("label")
626625
affected_by_index = header.index("affectedBy")
627626
affects_index = header.index("affects")
628627

@@ -632,7 +631,6 @@ def output_twis(nqw, heading, twa_misbehaviour):
632631

633632
# Extract the information we need from the next row
634633
uri = nqw.encode_ssm_uri(row[uri_index])
635-
label = nqw.encode_string(row[label_index])
636634
affected_by = nqw.encode_ssm_uri(row[affected_by_index])
637635
affects = nqw.encode_ssm_uri(row[affects_index])
638636

@@ -644,7 +642,6 @@ def output_twis(nqw, heading, twa_misbehaviour):
644642
# Output lines we need to the NQ file
645643
# Average case
646644
nqw.write_quad(uri, nqw.encode_rdfns_uri("22-rdf-syntax-ns#type"), nqw.encode_ssm_uri("core#TrustworthinessImpactSet"))
647-
nqw.write_quad(uri, nqw.encode_rdfs_uri("rdf-schema#label"), label)
648645
nqw.write_quad(uri, nqw.encode_ssm_uri("core#affectedBy"), affected_by)
649646
nqw.write_quad(uri, nqw.encode_ssm_uri("core#affects"), affects)
650647

@@ -661,13 +658,11 @@ def output_twis(nqw, heading, twa_misbehaviour):
661658

662659
uri = nqw.encode_ssm_uri("domain#TWIS-" + min_affects + "-" + max_affected_by)
663660
nqw.write_quad(uri, nqw.encode_rdfns_uri("22-rdf-syntax-ns#type"), nqw.encode_ssm_uri("core#TrustworthinessImpactSet"))
664-
nqw.write_quad(uri, nqw.encode_rdfs_uri("rdf-schema#label"), label)
665661
nqw.write_quad(uri, nqw.encode_ssm_uri("core#affects"), nqw.encode_ssm_uri("domain#" + min_affects))
666662
nqw.write_quad(uri, nqw.encode_ssm_uri("core#affectedBy"), nqw.encode_ssm_uri("domain#" + max_affected_by))
667663

668664
uri = nqw.encode_ssm_uri("domain#TWIS-" + max_affects + "-" + min_affected_by)
669665
nqw.write_quad(uri, nqw.encode_rdfns_uri("22-rdf-syntax-ns#type"), nqw.encode_ssm_uri("core#TrustworthinessImpactSet"))
670-
nqw.write_quad(uri, nqw.encode_rdfs_uri("rdf-schema#label"), label)
671666
nqw.write_quad(uri, nqw.encode_ssm_uri("core#affects"), nqw.encode_ssm_uri("domain#" + max_affects))
672667
nqw.write_quad(uri, nqw.encode_ssm_uri("core#affectedBy"), nqw.encode_ssm_uri("domain#" + min_affected_by))
673668

0 commit comments

Comments
 (0)