diff --git a/docker/rml-mapper/Dockerfile b/docker/rml-mapper/Dockerfile
index 20583dd2..801b3b5d 100644
--- a/docker/rml-mapper/Dockerfile
+++ b/docker/rml-mapper/Dockerfile
@@ -20,6 +20,7 @@ COPY demo.sh /app/demo.sh
RUN dos2unix /app/demo.sh
RUN chmod +x /app/demo.sh
+
# Run the rml mappings
ENTRYPOINT "/app/demo.sh"
diff --git a/docker/rml-mapper/demo.sh b/docker/rml-mapper/demo.sh
index 99ebc2fd..c7cd976f 100644
--- a/docker/rml-mapper/demo.sh
+++ b/docker/rml-mapper/demo.sh
@@ -2,8 +2,8 @@
# This script is for use inside the docker container defined in the Dockerfile in this folder
# See README.md for instructions
-cp /app/NOAKADEXPI/Blueprint/DISC_EXAMPLE-02/DISC_EXAMPLE-02-02.xml /app/local/www/public/
-cp /app/NOAKADEXPI/Blueprint/DISC_EXAMPLE-02/DISC_EXAMPLE-02-02.xml /app/local/rml_mappings/pandid.xml
+cp /app/local/pandid.xml /app/local/www/public/DISC_EXAMPLE-02-02.xml
+cp /app/local/pandid.xml /app/local/rml_mappings/pandid.xml
# Create rdf
cd local/rml_mappings
diff --git a/rml_mappings/imf/attributes-map.rml.ttl b/rml_mappings/imf/attributes-map.rml.ttl
index 1a34470b..feab10f4 100644
--- a/rml_mappings/imf/attributes-map.rml.ttl
+++ b/rml_mappings/imf/attributes-map.rml.ttl
@@ -28,10 +28,10 @@
rml:reference "@AttributeURI";
];
rr:objectMap [
- rml:reference "@Value" ;
- rr:termType rr:Literal
- ],
- [
+ # rml:reference "@Value" ;
+ # rr:termType rr:Literal
+ # ],
+ # [
rml:reference "@ValueURI";
rr:termType rr:IRI
];
diff --git a/www/src/components/diagram/ActuatingSystem.tsx b/www/src/components/diagram/ActuatingSystem.tsx
index 81a91740..f48ff045 100644
--- a/www/src/components/diagram/ActuatingSystem.tsx
+++ b/www/src/components/diagram/ActuatingSystem.tsx
@@ -3,20 +3,20 @@ import SvgElement from "./SvgElement.tsx";
// TODO - Remove when new graphical format implemented
export default function ActuatingSystem(props: ActuatingSystemProps) {
- const actuatingSystemComponents = props.ActuatingSystemComponent.filter(
- (component) => component.ComponentName,
- );
+ const actuatingSystemComponents = Array.isArray(props.ActuatingSystemComponent)
+ ? props.ActuatingSystemComponent.filter((component) => component.ComponentName)
+ : [];
return (
- <>
- {actuatingSystemComponents.map((component, index: number) => (
-
- ))}
- >
+ <>
+ {actuatingSystemComponents.map((component, index: number) => (
+
+ ))}
+ >
);
-}
+}
\ No newline at end of file
diff --git a/www/src/components/diagram/CenterLine.tsx b/www/src/components/diagram/CenterLine.tsx
index d401a333..b472d36e 100644
--- a/www/src/components/diagram/CenterLine.tsx
+++ b/www/src/components/diagram/CenterLine.tsx
@@ -59,7 +59,10 @@ export default function CenterLine(props: CenterLineComponentProps) {
}
id={iri ? iri : props.id}
key={index + "_highlight"}
- d={constructPath(centerline.Coordinate, height)}
+ d={Array.isArray(centerline.Coordinate)
+ ? constructPath(centerline.Coordinate, height)
+ : ""
+ }
stroke={color ? color : "black"}
strokeWidth={5}
opacity={hasSelectedInternalNode ? 0.5 : 0}
@@ -68,7 +71,10 @@ export default function CenterLine(props: CenterLineComponentProps) {
}
diff --git a/www/src/components/diagram/piping/PipeSegment.tsx b/www/src/components/diagram/piping/PipeSegment.tsx
index fcd1628f..63ea67e3 100644
--- a/www/src/components/diagram/piping/PipeSegment.tsx
+++ b/www/src/components/diagram/piping/PipeSegment.tsx
@@ -46,7 +46,7 @@ export default function PipeSegment(props: PipeSegmentProps) {
{props.PropertyBreak.PolyLine && (
diff --git a/www/src/utils/HelperFunctions.ts b/www/src/utils/HelperFunctions.ts
index 1594bb52..7e265a47 100644
--- a/www/src/utils/HelperFunctions.ts
+++ b/www/src/utils/HelperFunctions.ts
@@ -54,12 +54,14 @@ export function iriFromPiping(segment: PipingNetworkSegmentProps) {
(!segment.PipingComponent || !segment.PropertyBreak)
) {
return `https://assetid.equinor.com/plantx#${segment.Connection.ToID}-node${segment.Connection.ToNode}-connector`;
- } else if (segment.PipingComponent[1]) {
+ } else if (segment.PipingComponent && segment.PipingComponent[1]) {
return `https://assetid.equinor.com/plantx#${segment.PipingComponent[1].ID}-node2-connector`;
} else if (segment.Connection?.FromID) {
return `https://assetid.equinor.com/plantx#${segment.Connection.FromID}-node${segment.Connection.FromNode}-connector`;
} else if (segment.Connection?.ToID) {
return `https://assetid.equinor.com/plantx#${segment.Connection!.ToID}-node${segment.Connection!.ToNode}-connector`;
+ } else if (segment.PipingComponent?.ID) {
+ return `https://assetid.equinor.com/plantx#${segment.PipingComponent.ID}-node2-connector`;
} else {
console.error("Something went wrong with iri creation");
return ``;
diff --git a/www/src/utils/SvgEdit.ts b/www/src/utils/SvgEdit.ts
index 0f882c81..84b21ad4 100644
--- a/www/src/utils/SvgEdit.ts
+++ b/www/src/utils/SvgEdit.ts
@@ -64,7 +64,7 @@ export function addTextToNode(
fill: "black",
});
const genericAttribute = extractGenericAttributes(genericAttributes);
- textElement!.textContent = genericAttribute[0].Value;
+ textElement!.textContent = genericAttribute[0]?.Value || "Lacking value";
}
return element;