+
+"""
+Returns possible district network element that is mapped to the
+specified model configuration component. The DN element is found
+using the following relation path:
+
+ domain model configuration component ---[MOD.ComponentToElement]---> domain model diagram element
+ ----[DN.MappedFromElement]----> district network diagram element
+"""
+possibleDNElementMappedToComponent :: Resource -> <ReadGraph> Maybe Resource
+possibleDNElementMappedToComponent mappedComponent = match possibleObject mappedComponent MOD.ComponentToElement with
+ Nothing -> Nothing
+ Just element -> possibleObject element DN.MappedFromElement
+
+"""
+Returns all district network elements that are found to be mapped the
+specified mapped model configuration components by
+[possibleDNElementMappedToComponent](possibleDNElementMappedToComponent).
+
+The result list can be smaller than the input resource list, even empty.
+"""
+dnElementsMappedToComponents :: [Resource] -> <ReadGraph> [Resource]
+dnElementsMappedToComponents mappedComponents = mapMaybe possibleDNElementMappedToComponent mappedComponents
+
+
+importJava "org.simantics.district.network.DistrictNetworkUtil" where
+ createNetworkDiagram :: Resource -> Resource -> String -> Resource -> Resource -> Resource -> Resource -> Resource -> <WriteGraph, Proc> Resource
+ changeMappingType :: Resource -> [Resource] -> <WriteGraph, Proc> ()
+ findDNElementById :: Resource -> String -> <ReadGraph, Proc> Maybe Resource
+ findDNElementByXYCoordinates :: Resource -> Double -> Double -> Double -> <ReadGraph, Proc> [Resource]
+