Skip to content

Commit 097dea3

Browse files
committed
Change start of NamedIndividuals' suffices to use last path-segment of class's IRI
A follow-on patch will regenerate Make-managed files. References: * casework/CASE-Utilities-Python#110 Signed-off-by: Alex Nelson <[email protected]>
1 parent 673439a commit 097dea3

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

case_exiftool/__init__.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def controlled_dictionary_object_to_node(
8181
controlled_dict: typing.Dict[str, rdflib.Literal],
8282
) -> rdflib.URIRef:
8383
n_controlled_dictionary = ns_base[
84-
"controlled-dictionary-" + case_utils.local_uuid.local_uuid()
84+
"ControlledDictionary-" + case_utils.local_uuid.local_uuid()
8585
]
8686
graph.add((n_controlled_dictionary, NS_RDF.type, NS_UCO_TYPES.ControlledDictionary))
8787
for key in sorted(controlled_dict.keys()):
@@ -92,7 +92,7 @@ def controlled_dictionary_object_to_node(
9292
_logger.info("v_value = %r." % v_value)
9393
raise
9494
n_entry = ns_base[
95-
"controlled-dictionary-entry-" + case_utils.local_uuid.local_uuid()
95+
"ControlledDictionaryEntry-" + case_utils.local_uuid.local_uuid()
9696
]
9797
graph.add((n_controlled_dictionary, NS_UCO_TYPES.entry, n_entry))
9898
graph.add((n_entry, NS_RDF.type, NS_UCO_TYPES.ControlledDictionaryEntry))
@@ -114,7 +114,7 @@ def manufacturer_name_to_node(
114114
"""
115115
n_manufacturer: typing.Optional[rdflib.URIRef] = None
116116
if printconv_name is not None or raw_name is not None:
117-
n_manufacturer = ns_base["identity-" + case_utils.local_uuid.local_uuid()]
117+
n_manufacturer = ns_base["Identity-" + case_utils.local_uuid.local_uuid()]
118118
graph.add((n_manufacturer, NS_RDF.type, NS_UCO_IDENTITY.Identity))
119119

120120
if printconv_name is not None:
@@ -411,9 +411,9 @@ def _load_xml_file_into_dict(
411411
)
412412

413413
# Determine slug by MIME type.
414-
self.oo_slug = "file-" # The prefix "oo_" means generic observable object.
414+
self.oo_slug = "File-" # The prefix "oo_" means generic observable object.
415415
if self.mime_type == "image/jpeg":
416-
self.oo_slug = "picture-"
416+
self.oo_slug = "Picture-"
417417
else:
418418
_logger.warning("TODO - MIME type %r not yet implemented." % self.mime_type)
419419

@@ -509,7 +509,7 @@ def n_camera_object(self) -> rdflib.URIRef:
509509
"""
510510
if self._n_camera_object is None:
511511
self._n_camera_object = self.ns_base[
512-
"device-" + case_utils.local_uuid.local_uuid()
512+
"Device-" + case_utils.local_uuid.local_uuid()
513513
]
514514
self.graph.add(
515515
(self._n_camera_object, NS_RDF.type, NS_UCO_OBSERVABLE.ObservableObject)
@@ -523,7 +523,7 @@ def n_camera_object_device_facet(self) -> rdflib.URIRef:
523523
"""
524524
if self._n_camera_object_device_facet is None:
525525
self._n_camera_object_device_facet = self.ns_base[
526-
"device-facet-" + case_utils.local_uuid.local_uuid()
526+
"DeviceFacet-" + case_utils.local_uuid.local_uuid()
527527
]
528528
self.graph.add(
529529
(
@@ -548,7 +548,7 @@ def n_content_data_facet(self) -> rdflib.URIRef:
548548
"""
549549
if self._n_content_data_facet is None:
550550
self._n_content_data_facet = self.ns_base[
551-
"content-data-facet-" + case_utils.local_uuid.local_uuid()
551+
"ContentDataFacet-" + case_utils.local_uuid.local_uuid()
552552
]
553553
self.graph.add(
554554
(
@@ -591,7 +591,7 @@ def n_exif_facet(self) -> rdflib.URIRef:
591591
"""
592592
if self._n_exif_facet is None:
593593
self._n_exif_facet = self.ns_base[
594-
"exif-facet-" + case_utils.local_uuid.local_uuid()
594+
"EXIFFacet-" + case_utils.local_uuid.local_uuid()
595595
]
596596
self.graph.add(
597597
(self._n_exif_facet, NS_RDF.type, NS_UCO_OBSERVABLE.EXIFFacet)
@@ -608,7 +608,7 @@ def n_file_facet(self) -> rdflib.URIRef:
608608
"""
609609
if self._n_file_facet is None:
610610
self._n_file_facet = self.ns_base[
611-
"file-facet-" + case_utils.local_uuid.local_uuid()
611+
"FileFacet-" + case_utils.local_uuid.local_uuid()
612612
]
613613
self.graph.add(
614614
(self._n_file_facet, NS_RDF.type, NS_UCO_OBSERVABLE.FileFacet)
@@ -625,7 +625,7 @@ def n_location_object(self) -> rdflib.URIRef:
625625
"""
626626
if self._n_location_object is None:
627627
self._n_location_object = self.ns_base[
628-
"location-" + case_utils.local_uuid.local_uuid()
628+
"Location-" + case_utils.local_uuid.local_uuid()
629629
]
630630
self.graph.add(
631631
(self._n_location_object, NS_RDF.type, NS_UCO_LOCATION.Location)
@@ -639,7 +639,7 @@ def n_location_object_latlong_facet(self) -> rdflib.URIRef:
639639
"""
640640
if self._n_location_object_latlong_facet is None:
641641
self._n_location_object_latlong_facet = self.ns_base[
642-
"lat-long-coordinates-facet-" + case_utils.local_uuid.local_uuid()
642+
"LatLongCoordinatesFacet-" + case_utils.local_uuid.local_uuid()
643643
]
644644
self.graph.add(
645645
(
@@ -684,7 +684,7 @@ def n_raster_picture_facet(self) -> rdflib.URIRef:
684684
"""
685685
if self._n_raster_picture_facet is None:
686686
self._n_raster_picture_facet = self.ns_base[
687-
"raster-picture-facet-" + case_utils.local_uuid.local_uuid()
687+
"RasterPictureFacet-" + case_utils.local_uuid.local_uuid()
688688
]
689689
self.graph.add(
690690
(
@@ -709,7 +709,7 @@ def n_relationship_object_location(self) -> rdflib.URIRef:
709709
"""
710710
if self._n_relationship_object_location is None:
711711
self._n_relationship_object_location = self.ns_base[
712-
"relationship-" + case_utils.local_uuid.local_uuid()
712+
"Relationship-" + case_utils.local_uuid.local_uuid()
713713
]
714714
self.graph.add(
715715
(
@@ -755,7 +755,7 @@ def n_unix_file_permissions_facet(self) -> rdflib.URIRef:
755755
"""
756756
if self._n_unix_file_permissions_facet is None:
757757
self._n_unix_file_permissions_facet = self.ns_base[
758-
"unix-file-permissions-facet-" + case_utils.local_uuid.local_uuid()
758+
"UNIXFilePermissionsFacet-" + case_utils.local_uuid.local_uuid()
759759
]
760760
self.graph.add(
761761
(

0 commit comments

Comments
 (0)