├── .gitignore ├── LICENCE ├── README.md ├── config.json ├── css └── local.css ├── default.csv ├── examples.json ├── examples ├── doc-formats.csv ├── flowchart-subgraph.csv ├── sshoc-image.csv ├── sshoc-object.csv └── sshoc-sample.csv ├── graphics ├── GitHub-Mark-64px.png ├── IPERION-HS Logo.png ├── UKRI_AHR_Council-Logo_Horiz-RGB.png ├── clear-text.png ├── help.png ├── iperionhs-eu-tag2.png ├── ng-logo-black-100x40.png ├── sshoc-eu-tag2.png ├── sshoc-logo.png ├── view-fullscreen.png ├── view-refresh.png └── view-restore.png ├── index.php ├── js ├── local-dev.js ├── local.js └── svg-pan-zoom.js ├── unique_classes.json └── xml ├── index.php └── t.xml /.gitignore: -------------------------------------------------------------------------------- 1 | /stuff/ 2 | -------------------------------------------------------------------------------- /LICENCE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 - 2021 Knut Sveidqvist 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![DOI](https://zenodo.org/badge/281618147.svg)](https://zenodo.org/badge/latestdoi/281618147) 2 | # dynamic-modelling 3 | This is an interactive live modelling system which can automatically convert simple tab separated triples into graphical models using the [mermaid library](https://mermaid-js.github.io/mermaid). 4 | 5 | ## Instructions 6 | Full details and instructions relating to how this system works is still being developed, however several examples are included in the interactive web site: [dynamic modelling](https://research.ng-london.org.uk/modelling/), with all of the related code presented here in [GitHub](https://github.com/jpadfield/dynamic-modelling). 7 | 8 | ## Acknowledgement 9 | 10 | This software is currently being developed and used as part of the work of the following project: 11 | 12 | ### The H2020 [IPERION-HS](https://www.iperionhs.eu/) project 13 | [IPERION-HS](https://www.iperionhs.eu/)
14 | [IPERION-HS](https://www.iperionhs.eu/) 15 | 16 | This software was initially developed, prepared and tested as part of: 17 | 18 | ### The H2020 [SSHOC](https://sshopencloud.eu/) project 19 | [SSHOC](https://sshopencloud.eu/)
20 | [SSHOC](https://sshopencloud.eu/) 21 | 22 | ### The AHRC Funded [Linked.Art](https://linked.art/) project 23 | [Linked.Art](https://ahrc.ukri.org/) 24 | -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "format": { 3 | "group": { 4 | "stroke": "white", "fill": "white", "color": "black"}, 5 | "base": { 6 | "stroke": "black", "fill": "white", "color": "black", "rx": "5px", "ry": "5px"}, 7 | "thing": { 8 | "stroke": "#2C5D98", "fill": "#D0E5FF", "color": "#2C5D98"}, 9 | "event": { 10 | "stroke": "#5C811F", "fill": "#5C811F", "color": "white"}, 11 | "event_bn": { 12 | "stroke": "#4A6719", "fill": "#D0DDBB", "color": "#4A6719", "rx": "20px", "ry": "20px"}, 13 | "object": { 14 | "stroke": "#2C5D98", "fill": "#2C5D98", "color": "white"}, 15 | "object_bn": { 16 | "stroke": "#1E3F67", "fill": "#94abc5", "color": "#1E3F67", "rx": "20px", "ry": "20px"}, 17 | "idea": { 18 | "stroke": "#1f0e9a", "fill": "#1f0e9a", "color": "white"}, 19 | "idea_bn": { 20 | "stroke": "#1f0e9a", "fill": "#e7e5f6", "color": "#1f0e9a", "rx": "20px", "ry": "20px"}, 21 | "document": { 22 | "stroke": "#2C5D98", "fill": "#33B0FF", "color": "2C5D98"}, 23 | "document_bn": { 24 | "stroke": "#1E3F67", "fill": "#B8E3FE", "color": "#1E3F67", "rx": "20px", "ry": "20px"}, 25 | "actor": { 26 | "stroke": "#4e4403", "fill": "#fdde29", "color": "#4e4403"}, 27 | "actor_bn": { 28 | "stroke": "#564F26", "fill": "#ffee8c", "color": "#564F26", "rx": "20px", "ry": "20px"}, 29 | "period": { 30 | "stroke": "#6340b1","fill":"#6340b1", "color":"white"}, 31 | "period_bn": { 32 | "stroke": "#6340b1","fill":"#dacef5", "color":"#6340b1", "rx": "20px", "ry": "20px"}, 33 | "dims": { 34 | "stroke": "#9A6D3B","fill":"#9A6D3B", "color":"white"}, 35 | "dims_bn": { 36 | "stroke": "#674928","fill":"#d4bda4", "color":"#674928","rx":"20px","ry":"20px;"}, 37 | "place": { 38 | "stroke": "#bd4512","fill":"#bd4512", "color":"white"}, 39 | "place_bn": { 40 | "stroke": "#9D390F","fill":"#eecaba", "color":"#9D390F","rx":"20px","ry":"20px"}, 41 | "type": { 42 | "stroke": "#502604", "fill": "#FAB565", "color":"#502604", "rx":"20px","ry":"20px"}, 43 | "type_bn": { 44 | "stroke": "#502604", "fill": "#F9E1C3", "color":"#6C3304", "rx":"20px","ry":"20px"}, 45 | "name": { 46 | "stroke": "#563800", "fill": "#FEF3BA", "color":"#563800", "rx": "20px", "ry": "20px"}, 47 | "literal": { 48 | "stroke": "black", "fill": "#f0f0e0", "rx": "2px", "ry": "2px", "max-width": "100px"}, 49 | "url": { 50 | "stroke": "#2C5D98", "color": "#2C5D98"}, 51 | "note": { 52 | "stroke": "#2C5D98", "fill": "#D8FDFF", "color": "#2C5D98"}, 53 | 54 | "object2": { 55 | "stroke": "black","fill":"#E1BA9C","rx":"20px","ry":"20px"}, 56 | "actor2": { 57 | "stroke": "black","fill":"#FFBDCA","rx":"20px","ry":"20px"}, 58 | "dims2": { 59 | "stroke": "black","fill":"#c6c6c6","rx":"20px","ry":"20px"}, 60 | "type2": { 61 | "stroke": "red", "fill": "#FAB565", "rx":"20px","ry":"20px"}, 62 | "name2": { 63 | "stroke": "orange", "fill": "#FEF3BA", "rx": "20px", "ry": "20px"}, 64 | "infoobj": { 65 | "stroke": "#907010","fill":"#fffa40","rx":"20px","ry":"20px"}, 66 | "timespan": { 67 | "stroke": "blue","fill":"#ddfffe","rx":"20px","ry":"20px"}, 68 | "place2": { 69 | "stroke": "#3a7a3a","fill":"#aff090","rx":"20px","ry":"20px"}, 70 | "event2": { 71 | "stroke": "blue","fill":"#96e0f6","rx":"20px","ry":"20px"}, 72 | "digital2":{ 73 | "stroke": "#999","fill":"#eee","rx":"5px","ry":"5px"}, 74 | 75 | 76 | "object2_bn": { 77 | "stroke": "black","fill":"#E1BA9C","rx":"20px","ry":"20px"}, 78 | "actor2_bn": { 79 | "stroke": "black","fill":"#FFBDCA","rx":"20px","ry":"20px"}, 80 | "dims2_bn": { 81 | "stroke": "black","fill":"#c6c6c6","rx":"20px","ry":"20px"}, 82 | "type2_bn": { 83 | "stroke": "red", "fill": "#FAB565", "rx":"20px","ry":"20px"}, 84 | "name2_bn": { 85 | "stroke": "orange", "fill": "#FEF3BA", "rx": "20px", "ry": "20px"}, 86 | "infoobj_bn": { 87 | "stroke": "#907010","fill":"#fffa40","rx":"20px","ry":"20px"}, 88 | "timespan_bn": { 89 | "stroke": "blue","fill":"#ddfffe","rx":"20px","ry":"20px"}, 90 | "place2_bn": { 91 | "stroke": "#3a7a3a","fill":"#aff090","rx":"20px","ry":"20px"}, 92 | "event2_bn": { 93 | "stroke": "blue","fill":"#96e0f6","rx":"20px","ry":"20px"}, 94 | "digital2_bn":{ 95 | "stroke": "#999","fill":"#eee","rx":"5px","ry":"5px"}, 96 | 97 | "classstyle": { 98 | "stroke": "black","fill":"white"}, 99 | "crm": { 100 | "stroke": "#333333", "fill": "#DCDCDC", "color": "#333333"}, 101 | "sg1": { 102 | "stroke": "black", "fill": "#fefcf4", "color":"black", "rx": "10px", "ry": "10px"}, 103 | "sg2": { 104 | "stroke": "black", "fill": "#fffffb", "color":"black", "rx": "10px", "ry": "10px"} 105 | }, 106 | "prefix" : { 107 | "ngo": { 108 | "match": { 109 | "short": "[Nn][Gg][Oo][:]([0-9A-Z]{3}[-].+)", 110 | "long": "http[s]*[:][\/]+data[.]ng[-]london[.]org[.]uk[\/]resource[\/]([0-9A-Z]{3}[-].+)"}, 111 | "format": "object", 112 | "url": "https://data.ng-london.org.uk/resource/" 113 | }, 114 | "ng": { 115 | "match": { 116 | "short": "[Nn][Gg][:]([0-9A-Z]{4}[-].+)", 117 | "long": "http[s]*[:][\/]+data[.]ng[-]london[.]org[.]uk[\/]([0-9A-Z]{4}[-].+)"}, 118 | "format": "object", 119 | "url": "https://data.ng-london.org.uk/" 120 | }, 121 | "aat": { 122 | "match": { 123 | "short": "[Aa][Aa][Tt][:](.+)", 124 | "long": "http[s]*[:][\/]+vocab[.]getty[.]edu[\/]aat[\/](.+)"}, 125 | "format": "type", 126 | "url": "http://vocab.getty.edu/aat/" 127 | }, 128 | "ulan": { 129 | "match": { 130 | "short": "[Uu][Ll][Aa][nN][:](.+)", 131 | "long": "http[s]*[:][\/]+vocab[.]getty[.]edu[\/]ulan[\/](.+)"}, 132 | "format": "type", 133 | "url": "http://vocab.getty.edu/ulan/" 134 | }, 135 | "tgn": { 136 | "match": { 137 | "short": "[Tt][Gg][Nn][:](.+)", 138 | "long": "http[s]*[:][\/]+vocab[.]getty[.]edu[\/]tgn[\/](.+)"}, 139 | "format": "type", 140 | "url": "http://vocab.getty.edu/tgn/" 141 | }, 142 | "wd": { 143 | "match": { 144 | "short": "[Ww][Dd][:](.+)", 145 | "long": "http[s]*[:][\/]+www[.]wikidata[.]org[\/]wiki[\/](.+)"}, 146 | "format": "type", 147 | "url": "https://www.wikidata.org/wiki/" 148 | }, 149 | "note": { 150 | "match": { 151 | "short": "[\"].+[\"]"}, 152 | "format": "note" 153 | }, 154 | "note": { 155 | "match": { 156 | "short": "[#34;].+[#34;]"}, 157 | "format": "note" 158 | }, 159 | "crm": { 160 | "match": { 161 | "short": "[Cc][Rr][Mm][:](.+)"}, 162 | "format": "crm" 163 | }, 164 | "sci": { 165 | "match": { 166 | "short": "[sS][cC][iI][:](.+)"}, 167 | "format": "crm" 168 | }, 169 | "dig": { 170 | "match": { 171 | "short": "[Dd][Ii][Gg][:](.+)"}, 172 | "format": "crm" 173 | }, 174 | "ngi": { 175 | "match": { 176 | "short": "[nN[[gG][iI][:](.+)"}, 177 | "format": "oPID" 178 | }, 179 | "bn": { 180 | "match": { 181 | "short": "_[bB][nN][\\s-]*(.*)", 182 | "long": "_Blank Node[\\s-]*(.*)"}, 183 | "format": "thing" 184 | } , 185 | "bn2": { 186 | "match": { 187 | "short": "_Blank Node[\\s-]*(.*)"}, 188 | "format": "thing" 189 | } , 190 | "url": { 191 | "match": { 192 | "short": "http.+"}, 193 | "format": "url" 194 | } 195 | }, 196 | "unique": { 197 | "comment": "Force any items with these prefixes to be a unique item in the model", 198 | "regex": [ 199 | "[Cc][Rr][Mm][:].+", 200 | "[sS][cC][Ii][:].+", 201 | "[dD][iI][gG][:].+", 202 | "Type" 203 | ] 204 | } 205 | } 206 | -------------------------------------------------------------------------------- /css/local.css: -------------------------------------------------------------------------------- 1 | body 2 | { 3 | #background-color: #fcfcfc; 4 | height: 100%; 5 | } 6 | 7 | 8 | .list 9 | { 10 | left:80px; 11 | } 12 | 13 | g a 14 | {color:inherit;} 15 | 16 | .nav-button { 17 | position: relative; 18 | top: 8px; 19 | left: 8px; 20 | } 21 | 22 | .btn { 23 | display: inline-block; 24 | padding: 6px 12px; 25 | margin-bottom: 0; 26 | font-size: 14px; 27 | font-weight: normal; 28 | line-height: 1.428571429; 29 | text-align: center; 30 | white-space: nowrap; 31 | vertical-align: middle; 32 | cursor: pointer; 33 | background-image: none; 34 | border: 1px solid transparent; 35 | border-radius: 4px; 36 | -webkit-user-select: none; 37 | -moz-user-select: none; 38 | -ms-user-select: none; 39 | -o-user-select: none; 40 | user-select: none; 41 | } 42 | 43 | .imbutton { 44 | opacity:0.75; 45 | } 46 | 47 | .imbutton:hover { 48 | opacity:1; 49 | } 50 | 51 | .btn-default { 52 | color: #333333; 53 | background-color: #ffffff; 54 | border-color: #cccccc; 55 | } 56 | 57 | .btn-default:hover, .btn-default:focus, .btn-default:active, .btn-default.active, .open .dropdown-toggle.btn-default { 58 | color: #333333; 59 | background-color: #ebebeb; 60 | border-color: #adadad; 61 | } 62 | 63 | .navbar-light .navbar-nav .nav-link { 64 | color: rgba(0,0,0,.7); 65 | font-size: larger; 66 | } 67 | 68 | .navbar-light .navbar-nav .nav-link:focus, .navbar-light .navbar-nav .nav-link:hover { 69 | background-color: #e4e4e4; 70 | } 71 | 72 | #page { 73 | position:absolute; 74 | height:100vh; 75 | width:100%; 76 | overflow:hidden; 77 | padding:0px; 78 | } 79 | 80 | .tbtns { 81 | position: absolute; 82 | right: 21px; 83 | top: 6px; 84 | height:33px; 85 | } 86 | 87 | .textbtn { 88 | position: relative; 89 | padding: 5px; 90 | width: 40px !important; 91 | } 92 | 93 | .moddiv { 94 | position:relative; 95 | min-height:200px; 96 | width:100%; 97 | background-color:white; 98 | left:0px; 99 | } 100 | 101 | .textareadiv { 102 | position: relative; 103 | min-height: 240px; 104 | width: 100%; 105 | overflow: hidden; 106 | background-color: white; 107 | left: 0px; 108 | top: 0px; 109 | margin: 0px; 110 | } 111 | 112 | .textdiv { 113 | position:relative; 114 | height:255px; 115 | width:100%; 116 | background-color: white; 117 | } 118 | 119 | #holder.fullscreen { 120 | z-index: 9999; 121 | width: 100%; 122 | height: 100%; 123 | position: fixed; 124 | top: 0; 125 | left: 0; 126 | } 127 | 128 | #textholder.fullscreen{ 129 | z-index: 9999; 130 | width: 100%; 131 | height: 100%; 132 | position: fixed; 133 | top: 0; 134 | left: 0; 135 | } 136 | 137 | 138 | 139 | 140 | /* Based on: https://bbbootstrap.com/snippets/modal-multiple-tabs-89860645 */ 141 | fieldset { 142 | display: none 143 | } 144 | 145 | fieldset.show { 146 | display: block 147 | } 148 | 149 | select:focus, 150 | input:focus { 151 | -moz-box-shadow: none !important; 152 | -webkit-box-shadow: none !important; 153 | box-shadow: none !important; 154 | border: 1px solid #2196F3 !important; 155 | outline-width: 0 !important; 156 | font-weight: 400 157 | } 158 | 159 | button:focus { 160 | -moz-box-shadow: none !important; 161 | -webkit-box-shadow: none !important; 162 | box-shadow: none !important; 163 | outline-width: 0 164 | } 165 | 166 | .tabs { 167 | margin: 2px 5px 0px 5px; 168 | padding-bottom: 10px; 169 | cursor: pointer 170 | } 171 | 172 | .tabs:hover, 173 | .tabs.active { 174 | border-bottom: 1px solid #2196F3 175 | } 176 | 177 | a:hover { 178 | text-decoration: none; 179 | color: #1565C0 180 | } 181 | 182 | .box { 183 | margin-bottom: 10px; 184 | border-radius: 5px; 185 | padding: 10px 186 | } 187 | 188 | .modal-backdrop { 189 | background-color: black; 190 | } 191 | 192 | .line { 193 | background-color: #CFD8DC; 194 | height: 1px; 195 | width: 100% 196 | } 197 | 198 | @media screen and (max-width: 768px) { 199 | .tabs h6 { 200 | font-size: 12px 201 | } 202 | } 203 | -------------------------------------------------------------------------------- /default.csv: -------------------------------------------------------------------------------- 1 | //The first line is an optional special comment that requests TB (Top Bottom) or a LR (Left Right) flow diagram, the default is LR - the style of the nodes linking the displayed concepts can also be adjusted with the addition or omission of the extra term "fix" 2 | // Extra formats can be selected using a | separated pair of terms - the format only needs to be defined the first time an entities is referenced 3 | Dynamic Modeller was created by Joseph Padfield|https://orcid.org/0000-0002-2572-6428 object|actor 4 | Dynamic Modeller is based on https://mermaid-js.github.io/mermaid 5 | Dynamic Modeller can toggle Zooming (toggle control in upper right of the model window) |name2 6 | Dynamic Modeller designed to "Allow users to create modelling flow-diagrams from simple lists of triples" 7 | Dynamic Modeller works with Triples 8 | Dynamic Modeller can use Subgraphs 9 | Dynamic Modeller allows the use of Tooltips |document 10 | Tooltips tooltip Also known as hover text or labels 11 | Tooltips for example Example Concept with a Tooltip |thing 12 | Example Concept with a Tooltip tooltip This approach can be used to hide comments on larger flow diagrams to simplify their appearance but without loosing the extra descriptions and information. 13 | Tooltips has comment "Tooltips are added to link based nodes, with alternative texts, automatically, but they can also be added manually through an additional triple using the 'tooltip' property to link the item to the required text:
Label tooltip Required hover text " 14 | Dynamic Modeller can format Links with alternative labels 15 | Links with alternative labels for example Example Formats |url 16 | Links with alternative labels has comment "This can be achieved by adding the alternative label as a '|' separated suffix, such as:
'ALT TEXT|https://full.url/or/link' " 17 | Dynamic Modeller uses https://github.com/ariutta/svg-pan-zoom 18 | https://github.com/ariutta/svg-pan-zoom has comment "svg-pan-zoom is used to allow users to use their mouse to navigate around and zoom in and out of larger models" 19 | // Comments can be added simply by starting a line with // or ## 20 | //subgraph Example Subgraph Title 21 | Subgraphs are Grouped sections of a graph 22 | Subgraphs has comment "Subgraph are started by adding a special comment before the relevant triples - //Subgraph GROUP TITLE"

"The GROUP TITLE or subgraph label is optional and can be hidden using the following syntax - //Subgraph //GROUP TITLE"

"Alternatively the GROUP TITLE can be omitted completely - //Subgraph" 23 | Subgraphs has comment "Subgraph are ended by adding a special comment after the relevant triples - //end" 24 | Subgraphs can be nested as Sub-Subgraphs 25 | //subgraph Example Sub-Subgraph Title 26 | Sub-Subgraphs has comment "Care needs to be taken to make sure which Subgraph nodes appear in, but it is possible to created nested sub-subgraphs simply by starting a new subgraph inside another one." 27 | //end 28 | //end 29 | //subgraph Formatted Subgraph 30 | Subgraphs can be styled Styled Subgraphs 31 | Styled Subgraphs has comment "Any of the existing standard formats can automatically be applied to a subgraph by simply adding the name of the format after the //end line. For example this subgraph has been styled with the line //end base" 32 | //end base 33 | Triples are Tab separated |type 34 | Triples have some "Basic automatic formatting, but it is possible to force some further options using additional instructions after the third value in a given triple" 35 | Triples format examples Example Formats|https://research.ng-london.org.uk/modelling/?example=example_formats 36 | Dynamic Modeller can also "Start with data formatted as JSON, which is then automatically converted to Triples, please check the triples and report any errors in the conversion" 37 | // Blank node can be added as shown 38 | _BN has type Production event_bn| 39 | _BN are allocated "An automatic number each time the 'has type' property is used, so multiple _BN can be added to the list of triples and they will processed. All other properties will be allocated to the current _BN until a new 'has type' property is called." 40 | Dynamic Modeller carries out _BN 41 | _BN produces Flow-diagrams |thing 42 | Flow-diagrams can be saved by "Copying the triples and saving them as a text file." 43 | Flow-diagrams can be saved by "Bookmarking or copying the URL under the Bookmark Link options, under the Links menu, after an update." 44 | 45 | Flow-diagrams can be saved by Downloading an image |event 46 | Downloading an image has comment "Following the link under the Download Image link, under the Links menu, and using the options provided." 47 | Downloading an image is achieved using https://mermaid.ink/ 48 | 49 | Flow-diagrams can also be edited in The Mermaid Live Editor |event 50 | The Mermaid Live Editor has comment "Following the link under the Mermaid Editor link, under the Links menu, and using the options provided." 51 | The Mermaid Live Editor has url https://mermaid-js.github.io/mermaid-live-editor 52 | _BN has type Author actor_bn| 53 | _BN has comment "New Blank Nodes, or any other entities can refer back to a previous Blank Node by adding a suffix to indicate how many Blank Nodes back one wants to refer to, i.e. the previous blank node would be referenced as '_BN-1' and the one before that would be '_BN-2' and so on." 54 | _BN assigned _BN-1 55 | 56 | Dynamic Modeller can display Free Font Awesome 5 Icons|https://fontawesome.com/v5/icons/ 57 | Free Font Awesome 5 Icons for example far:fa-user-circle far:fa-heart fab:fa-creative-commons fas:fa-code 58 | far:fa-user-circle far:fa-heart fab:fa-creative-commons fas:fa-code has note The Font Awesome icons can be added by formatting the icon details, provided on the Font Awesome website, like:
far : fa-user-circle
(without the spaces around the colon). 59 | -------------------------------------------------------------------------------- /examples.json: -------------------------------------------------------------------------------- 1 | { 2 | "documentation": { 3 | "title": "Example documentation model", 4 | "format": "triples", 5 | "uri": "./default.csv" 6 | }, 7 | "example_formats":{ 8 | "title": "Examples of all of the predefined config formats", 9 | "format": "triples", 10 | "uri": "examples/doc-formats.csv" 11 | }, 12 | "example_flowchart":{ 13 | "title": "Examples of formatting and linking Subgraphs", 14 | "format": "triples", 15 | "uri": "examples/flowchart-subgraph.csv" 16 | }, 17 | "artist": { 18 | "title": "IPERION-CH - Artist CIDOC CRM", 19 | "format": "triples", 20 | "uri": "https://raw.githubusercontent.com/jpadfield/cidoc-crm.examples/master/models/artist/artist-triples.csv" 21 | }, 22 | "object": { 23 | "title": "IPERION-CH - Object CIDOC CRM", 24 | "format": "triples", 25 | "uri": "https://raw.githubusercontent.com/jpadfield/cidoc-crm.examples/master/models/object/object-triples.csv" 26 | }, 27 | "imaging": { 28 | "title": "IPERION-CH - Image Examination CIDOC CRM", 29 | "format": "triples", 30 | "uri": "https://raw.githubusercontent.com/jpadfield/cidoc-crm.examples/master/models/imageexam/imageexam-triples.csv" 31 | }, 32 | "object2":{ 33 | "title": "Linked Art - Getty Object Showcase 1", 34 | "format": "json", 35 | "uri": "https://raw.githubusercontent.com/linked-art/showcase1/master/data/getty/Object/02bac13e-7e54-45ab-ba3a-426b7e48a0d1.json" 36 | }, 37 | "sshoc_object":{ 38 | "title": "SSHOC - Object CIDOC CRM", 39 | "format": "triples", 40 | "uri": "examples/sshoc-object.csv" 41 | }, 42 | "sshoc_sample":{ 43 | "title": "SSHOC - Painting Sample CIDOC CRM", 44 | "format": "triples", 45 | "uri": "examples/sshoc-sample.csv" 46 | }, 47 | "sshoc_image":{ 48 | "title": "SSHOC - Image and IIIF CIDOC CRM", 49 | "format": "triples", 50 | "uri": "examples/sshoc-image.csv" 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /examples/doc-formats.csv: -------------------------------------------------------------------------------- 1 | crm linked to thing crm|thing 2 | thing linked to event |event 3 | event linked to event_bn |event_bn 4 | thing linked to object |object 5 | object linked to object_bn |object_bn 6 | thing linked to actor |actor 7 | actor linked to actor_bn |actor_bn 8 | 9 | thing useful for subgraphs sg1 |sg1 10 | thing useful for subgraphs sg2 |sg2 11 | sg2 custom borders sg2-5-10 |sg2-5-10 12 | sg2 custom borders sg2-10-2 |sg2-5-2 13 | 14 | object linked to idea |idea 15 | idea linked to idea_bn |idea_bn 16 | 17 | object linked to document |document 18 | document linked to document_bn |document_bn 19 | 20 | object linked to type |type 21 | object linked to dims |dims 22 | dims linked to dims_bn |dims_bn 23 | 24 | object linked to place |place 25 | place linked to place_bn |place_bn 26 | 27 | actor linked to name |name 28 | event linked to period |period 29 | period linked to period_bn |period_bn 30 | 31 | thing linked to url |url 32 | url linked to note |note 33 | url linked to literal |literal 34 | note linked to stuff note|UNDEFINED 35 | stuff linked to base |base 36 | 37 | Linked Art linked to event2 crm|event2 38 | Linked Art linked to object2 |object2 39 | Linked Art linked to actor2 |actor2 40 | Linked Art linked to dims2 |dims2 41 | Linked Art linked to digital2 |digital2 42 | 43 | actor2 linked to type2 |type2 44 | type2 linked to name2 |name2 45 | dims2 linked to infoobj |infoobj 46 | infoobj linked to timespan |timespan 47 | timespan linked to place2 |place2 48 | event2 linked to literal |literal 49 | event2 linked to classstyle |classstyle 50 | -------------------------------------------------------------------------------- /examples/flowchart-subgraph.csv: -------------------------------------------------------------------------------- 1 | //flowchart LR 2 | 3 | //subgraph SB One 4 | This is an Example 5 | //end name 6 | 7 | //subgraph SB Two 8 | This#-1 is another Example#-1 9 | //end base 10 | 11 | SB One can be linked to SB Two 12 | SB One has note At the time of writing the formatting of Subgraph links within more complex models can be less clear as the property label can be displaced and the arrows can be obscured by other parts of the diagram. 13 | SB Two has note The option for linking Subgraphs, via their label/title, requires the diagram to be flagged, on the first line, as a "flowchart" rather than the old "graph" syntax. 14 | -------------------------------------------------------------------------------- /examples/sshoc-image.csv: -------------------------------------------------------------------------------- 1 | ngo:1ZFX-UT2V-87KR-N3EY crm:P39_measured ngo:0D0E-0001-0000-0000 event|object 2 | //subgraph Pyramid 3 | //subgraph Pyramidal Levels 4 | N02f1971b0b564dc6bf800010b96f9289 rdfs:label Number of pyramidal levels dims_bn|note 5 | N02f1971b0b564dc6bf800010b96f9289 crm:P90_has_value 6 |literal 6 | N02f1971b0b564dc6bf800010b96f9289 crm:P2_has_type crm:E54_Dimension |type 7 | N02f1971b0b564dc6bf800010b96f9289 rdf:type crm:E54_Dimension |type 8 | //end 9 | ngo:3UFH-4E94-4ZCU-VSYE crm:P1_is_identifed_by Nc61a3e9bcd094264ada9250dc99a5d6cXX object|object_bn 10 | ngo:3UFH-4E94-4ZCU-VSYE crm:P43_has_dimension N02f1971b0b564dc6bf800010b96f9289 11 | //subgraph Pyramid File Name 12 | Nc61a3e9bcd094264ada9250dc99a5d6cXX crm:P2_has_type wd:Q1144928 13 | wd:Q1144928 rdfs:label filename 14 | Nc61a3e9bcd094264ada9250dc99a5d6cXX crm:P2_has_type crm:E42_Identifier |type 15 | Nc61a3e9bcd094264ada9250dc99a5d6cXX rdf:type crm:E42_Identifier |type 16 | Nc61a3e9bcd094264ada9250dc99a5d6cXX rdfs:label N-0027-00-000060-PYR.tif 17 | //end 18 | ngo:3UFH-4E94-4ZCU-VSYE crm:P2_has_type wd:Q3411251 19 | wd:Q3411251 rdfs:label pyramid 20 | //end 21 | N3017590f9ff54ca4b46ccdeac8e55903 rdf:type dig:D3_Formal_Derivation event_bn|type 22 | N3017590f9ff54ca4b46ccdeac8e55903 dig:L23_used_software_or_firmware ngo:XE06-LC28-SMX0-OTVO |object 23 | N3017590f9ff54ca4b46ccdeac8e55903 crm:P2_has_type dig:D3_Formal_Derivation 24 | N3017590f9ff54ca4b46ccdeac8e55903 dig:L21_used_as_derivation_source ngo:3UFH-4E94-4ZCU-VSYE |object 25 | N3017590f9ff54ca4b46ccdeac8e55903 dig:L22_created_derivative ngo:62NG-RN57-CLEB-AMSM |object 26 | //subgraph Digital Image of NG27 27 | aat:300215302 rdfs:label digital images 28 | ngo:5TGX-GBZ4-XV2A-XQGC crm:P108i_was_produced_by ngo:1ZFX-UT2V-87KR-N3EY object|event 29 | ngo:5TGX-GBZ4-XV2A-XQGC crm:P43_has_dimension N35acaf74c9a848eaaa6bd3a17be7ffe8 |dims_bn 30 | aat:300266226 rdfs:label TIFF 31 | ngo:5TGX-GBZ4-XV2A-XQGC crm:P2_has_type aat:300215302 32 | ngo:5TGX-GBZ4-XV2A-XQGC crm:P149_is_identified_by Nc61a3e9bcd094264ada9250dc99a5d6c |dims_bn 33 | //subgraph File Name 34 | Nc61a3e9bcd094264ada9250dc99a5d6c crm:P2_has_type wd:Q1144928 35 | wd:Q1144928 rdfs:label filename 36 | Nc61a3e9bcd094264ada9250dc99a5d6c crm:P2_has_type crm:E42_Identifier |type 37 | Nc61a3e9bcd094264ada9250dc99a5d6c rdf:type crm:E42_Identifier |type 38 | Nc61a3e9bcd094264ada9250dc99a5d6c rdfs:label N-0027-00-000060.tif 39 | //end 40 | //subgraph Bit Depth 41 | wd:Q270159 rdfs:label 8-bit 42 | aat:300265866 rdfs:label bits (computing) 43 | aat:300410392 rdfs:label bit depth 44 | N35acaf74c9a848eaaa6bd3a17be7ffe8 crm:P2_has_type wd:Q270159 dims_bn| 45 | N35acaf74c9a848eaaa6bd3a17be7ffe8 rdf:type crm:E54_Dimension |type 46 | N35acaf74c9a848eaaa6bd3a17be7ffe8 crm:P2_has_type aat:300410392 47 | N35acaf74c9a848eaaa6bd3a17be7ffe8 crm:P91_has_unit aat:300265866 48 | N35acaf74c9a848eaaa6bd3a17be7ffe8 crm:P2_has_type crm:E54_Dimension |type 49 | //end 50 | //subgraph X-Ray Imaging Event 51 | aat:300056058 rdfs:label x-ray (radiation) 52 | aat:300379861 rdfs:label imaging (image making process) 53 | aat:300419323 rdfs:label x-radiography 54 | ngo:1ZFX-UT2V-87KR-N3EY rdf:type crm:E16_Measurement event|type 55 | ngo:1ZFX-UT2V-87KR-N3EY crm:P2_has_type crm:E16_Measurement 56 | ngo:1ZFX-UT2V-87KR-N3EY crm:P2_has_type aat:300379861 57 | ngo:1ZFX-UT2V-87KR-N3EY crm:P32_used_general_technique aat:300419323 58 | ngo:1ZFX-UT2V-87KR-N3EY rdfs:comment This event is really a composite of two events - the x-ray examination, which was taken on film, and the digitisation of that film 59 | ngo:1ZFX-UT2V-87KR-N3EY rdfs:label X-Ray Examination of NG27 60 | ngo:1ZFX-UT2V-87KR-N3EY crm:P125_used_object_of_type aat:300056058 61 | //end 62 | ngo:5TGX-GBZ4-XV2A-XQGC crm:P70i_is_documented_in ngo:4CBT-XTB5-GIHR-D7JO |object 63 | ngo:4CBT-XTB5-GIHR-D7JO rdfs:label The National Gallery Collection Image Database 64 | ngo:5TGX-GBZ4-XV2A-XQGC crm:P43_has_dimension N5337eb7a43994acfaae78e2d1571df56 |dims_bn 65 | ngo:5TGX-GBZ4-XV2A-XQGC crm:P2_has_type dig:D9_Data_Object |type 66 | ngo:5TGX-GBZ4-XV2A-XQGC crm:P2_has_type aat:300266226 67 | ngo:5TGX-GBZ4-XV2A-XQGC dig:L56_has_pixel_width 3502 |literal 68 | ngo:5TGX-GBZ4-XV2A-XQGC dig:L57_has_pixel_height 4435 |literal 69 | ngo:5TGX-GBZ4-XV2A-XQGC rdf:type dig:D9_Data_Object 70 | //subgraph File Size 71 | N5337eb7a43994acfaae78e2d1571df56 crm:P90_has_value 31093772 dims_bn|literal 72 | aat:300265863 rdfs:label size for computer files 73 | aat:300265869 rdfs:label bytes 74 | N5337eb7a43994acfaae78e2d1571df56 crm:P2_has_type aat:300265863 75 | N5337eb7a43994acfaae78e2d1571df56 crm:P2_has_type crm:E54_Dimension |type 76 | N5337eb7a43994acfaae78e2d1571df56 rdf:type crm:E54_Dimension |type 77 | N5337eb7a43994acfaae78e2d1571df56 crm:P91_has_unit aat:300265869 78 | //end 79 | //end 80 | ngo:5TGX-GBZ4-XV2A-XQGC crm:P65_shows_visual_item ngo:IKPB-MY0O-IQRM-Q1YS |object 81 | ngo:5TGX-GBZ4-XV2A-XQGC crm:P138_represents ngo:0D0E-0001-0000-0000 82 | ngo:5TGX-GBZ4-XV2A-XQGC crm:P62_depicts ngo:0D0E-0001-0000-0000 83 | //subgraph Thumbnail 84 | ngo:62NG-RN57-CLEB-AMSM rdf:type dig:D9_Data_Object |type 85 | ngo:62NG-RN57-CLEB-AMSM crm:P2_has_type dig:D9_Data_Object 86 | ngo:62NG-RN57-CLEB-AMSM crm:P48_has_preferred_identifier N256cc5005ca64c55ad70b0f7a84ba046 |dims_bn 87 | wd:Q873806 rdfs:label thumbnail 88 | ngo:62NG-RN57-CLEB-AMSM crm:P2_has_type wd:Q873806 89 | //subgraph Thumbnail URI 90 | N256cc5005ca64c55ad70b0f7a84ba046 rdf:type crm:E42_Identifier |type 91 | aat:300404629 rdfs:label uniform resource identifiers 92 | N256cc5005ca64c55ad70b0f7a84ba046 crm:P2_has_type crm:E42_Identifier |type 93 | N256cc5005ca64c55ad70b0f7a84ba046 rdf:value https://research.ng-london.org.uk/iiif/pics/tmp/raphael_pyr/N-0027/16.1_X-Ray_Images/N-0027-00-000060-PYR.tif/full/,256/0/default.jpg |url 94 | //end 95 | //end 96 | N256cc5005ca64c55ad70b0f7a84ba046 crm:P2_has_type aat:300404629 97 | ngo:62NG-RN57-CLEB-AMSM crm:P62_depicts ngo:0D0E-0001-0000-0000 98 | ngo:62NG-RN57-CLEB-AMSM crm:P65_shows_visual_item ngo:IKPB-MY0O-IQRM-Q1YS 99 | Nb23f47ae7f2543c99655735df33b2b6f rdf:type dig:D3_Formal_Derivation event_bn|type 100 | Nb23f47ae7f2543c99655735df33b2b6f dig:L22_created_derivative ngo:3UFH-4E94-4ZCU-VSYE |object 101 | Nb23f47ae7f2543c99655735df33b2b6f crm:P2_has_type dig:D3_Formal_Derivation 102 | Nb23f47ae7f2543c99655735df33b2b6f dig:L21_used_as_derivation_source ngo:5TGX-GBZ4-XV2A-XQGC 103 | //subgraph Visual Item representing an Image 104 | ngo:IKPB-MY0O-IQRM-Q1YS crm:P138_represents ngo:0D0E-0001-0000-0000 105 | ngo:IKPB-MY0O-IQRM-Q1YS crm:P1i_is_identified_by X-ray image of a detail from NG27 106 | ngo:IKPB-MY0O-IQRM-Q1YS rdf:type crm:E36_Visual_Item |type 107 | ngo:IKPB-MY0O-IQRM-Q1YS crm:P2_has_type crm:E36_Visual_Item 108 | //end 109 | //subgraph IIIF Server 110 | ngo:XE06-LC28-SMX0-OTVO rdf:type dig:D14_Software object| 111 | ngo:XE06-LC28-SMX0-OTVO crm:P2_has_type aat:300266043 112 | ngo:XE06-LC28-SMX0-OTVO crm:P2_has_type dig:D14_Software |type 113 | ngo:XE06-LC28-SMX0-OTVO crm:P48_has_preferred_identifier N6d994ff4ca1146d28ccd4f895688b4fa 114 | aat:300266043 rdfs:label servers (computer) 115 | N6d994ff4ca1146d28ccd4f895688b4fa crm:P2_has_type crm:E42_Identifier |type 116 | N6d994ff4ca1146d28ccd4f895688b4fa rdf:value https://research.ng-london.org.uk/iiif |url 117 | N6d994ff4ca1146d28ccd4f895688b4fa rdf:type crm:E42_Identifier |type 118 | //end 119 | -------------------------------------------------------------------------------- /examples/sshoc-object.csv: -------------------------------------------------------------------------------- 1 | //subgraph Width and Height 2 | aat:300055644 rdfs:label height 3 | aat:300055647 rdfs:label width 4 | aat:300379098 rdfs:label centimeters 5 | N00b58fc196f84ad6b4c432a53f4c9fd9 rdf:type crm:E54_Dimension dims_bn|type 6 | N00b58fc196f84ad6b4c432a53f4c9fd9 crm:P90_has_value 81 7 | N00b58fc196f84ad6b4c432a53f4c9fd9 crm:P2_has_type crm:E54_Dimension |type 8 | N00b58fc196f84ad6b4c432a53f4c9fd9 crm:P91_has_unit aat:300379098 9 | N00b58fc196f84ad6b4c432a53f4c9fd9 crm:P2_has_type aat:300055647 10 | N95d46b3529834d41b65338714016a3dc crm:P90_has_value 108.7 dims_bn| 11 | N95d46b3529834d41b65338714016a3dc crm:P91_has_unit aat:300379098 12 | N95d46b3529834d41b65338714016a3dc crm:P2_has_type crm:E54_Dimension |type 13 | N95d46b3529834d41b65338714016a3dc rdf:type crm:E54_Dimension |type 14 | N95d46b3529834d41b65338714016a3dc crm:P2_has_type aat:300055644 15 | //end 16 | //subgraph ID Number 17 | aat:300404626 rdfs:label identification numbers 18 | N9a9193589c244bdd90cd1a8a3be22b15 crm:P2_has_type aat:300404626 19 | N9a9193589c244bdd90cd1a8a3be22b15 crm:P2_has_type crm:E42_Identifier |type 20 | N9a9193589c244bdd90cd1a8a3be22b15 rdfs:label NG27 21 | N9a9193589c244bdd90cd1a8a3be22b15 rdf:type crm:E42_Identifier 22 | //end 23 | ngo:0D0E-0001-0000-0000 crm:P2_has_type aat:300033799 object| 24 | //subgraph Title 25 | ngo:01CE-1F84-PVN2-I0KB crm:P2_has_type crm:E35_Title name|type 26 | aat:300417208 rdfs:label brief title 27 | aat:300417209 rdfs:label full title 28 | ngo:01CE-1F84-PVN2-I0KB crm:P2_has_type aat:300417208 29 | ngo:01CE-1F84-PVN2-I0KB rdfs:label Portrait of Pope Julius II 30 | ngo:01CE-1F84-PVN2-I0KB crm:P108i_was_produced_by This set of triples points to a production event that exists elsewhere in our database but overcomplicates the presentation when mapped here. |note 31 | ngo:01CE-1F84-PVN2-I0KB rdf:type crm:E35_Title 32 | ngo:01CE-1F84-PVN2-I0KB crm:P2_has_type aat:300417209 33 | //end 34 | ngo:0D0E-0001-0000-0000 crm:P102_has_title ngo:01CE-1F84-PVN2-I0KB object| 35 | aat:300033799 rdfs:label oil paintings (visual works)@en 36 | ngo:0D0E-0001-0000-0000 rdf:type crm:E24_Physical_Human_Made_Thing |type 37 | ngo:0D0E-0001-0000-0000 crm:P46_forms_part_of ngo:ZGSO-VAD2-9Z05-06C8 |object 38 | ngo:0D0E-0001-0000-0000 crm:P48_has_preferred_identifier N9a9193589c244bdd90cd1a8a3be22b15 39 | aat:300033618 rdfs:label paintings (visual items) 40 | ngo:0D0E-0001-0000-0000 crm:P2_has_type aat:300033618 41 | ngo:0D0E-0001-0000-0000 crm:P43_has_dimension N00b58fc196f84ad6b4c432a53f4c9fd9 42 | ngo:0D0E-0001-0000-0000 crm:P53_has_former_or_current_location ngo:86O6-Z6YG-YL6M-10CR |place 43 | ngo:0D0E-0001-0000-0000 crm:P46_is_composed_of ngo:EKIQ-ZJ5P-V90O-7W9G |object 44 | ngo:0D0E-0001-0000-0000 crm:P2_has_type crm:E24_Physical_Human_Made_Thing 45 | ngo:0D0E-0001-0000-0000 crm:P43_has_dimension N95d46b3529834d41b65338714016a3dc 46 | ngo:0D0E-0001-0000-0000 crm:P46_is_composed_of ngo:92X1-C8TT-C1MA-RNRN |object 47 | //subgraph Location 48 | ngo:86O6-Z6YG-YL6M-10CR crm:P2_has_type crm:E53_Place |type 49 | ngo:86O6-Z6YG-YL6M-10CR rdf:type crm:E53_Place 50 | ngo:86O6-Z6YG-YL6M-10CR rdfs:label Room 8 51 | //end 52 | ngo:0D0E-0001-0000-0000 crm:P2_has_type aat:300033656 53 | aat:300033656 rdfs:label panel paintings (paintings by form)@en 54 | //subgraph Support Material 55 | ngo:92X1-C8TT-C1MA-RNRN rdf:type crm:E24_Physical_Human_Made_Thing |type 56 | aat:300014844 rdfs:label supports (artists' materials) 57 | aat:300012363 rdfs:label poplar (wood)@en 58 | ngo:92X1-C8TT-C1MA-RNRN crm:P45_consists_of aat:300012363 59 | ngo:92X1-C8TT-C1MA-RNRN crm:P2_has_type aat:300014844 60 | ngo:92X1-C8TT-C1MA-RNRN crm:P2_has_type crm:E24_Physical_Human_Made_Thing |type 61 | //end 62 | //subgraph Media 63 | ngo:EKIQ-ZJ5P-V90O-7W9G rdf:type crm:E24_Physical_Human_Made_Thing |type 64 | Nacb7e7b2294043598d642b35c199fe06 crm:P2_has_type aat:300014286 object_bn| 65 | Nacb7e7b2294043598d642b35c199fe06 crm:P2_has_type aat:300014720 66 | aat:300014720 rdfs:label binder (materials) 67 | aat:300014286 rdfs:label drying oil 68 | ngo:EKIQ-ZJ5P-V90O-7W9G crm:P45_consists_of Nacb7e7b2294043598d642b35c199fe06 69 | ngo:EKIQ-ZJ5P-V90O-7W9G crm:P2_has_type aat:300015050 70 | ngo:EKIQ-ZJ5P-V90O-7W9G crm:P2_has_type aat:300163343 71 | aat:300015050 rdfs:label oil paint (paint)@en 72 | aat:300163343 rdfs:label media (artists' material) 73 | ngo:EKIQ-ZJ5P-V90O-7W9G crm:P2_has_type crm:E24_Physical_Human_Made_Thing |type 74 | //end 75 | //subgraph Collection 76 | ngo:ZGSO-VAD2-9Z05-06C8 crm:P2_has_type crm:E78_Curated_Holding |type 77 | aat:300443858 rdfs:label collections (repositories) 78 | ngo:ZGSO-VAD2-9Z05-06C8 crm:P2_has_type aat:300443858 79 | ngo:ZGSO-VAD2-9Z05-06C8 rdf:type crm:E78_Curated_Holding |type 80 | ngo:ZGSO-VAD2-9Z05-06C8 rdfs:label The National Gallery Collection 81 | //end 82 | -------------------------------------------------------------------------------- /examples/sshoc-sample.csv: -------------------------------------------------------------------------------- 1 | N1c244cd259cc4bcdb8efc94652ec0290 sci:O5_removed ngo:Y4M5-2P4X-GYFR-9WJP event_bn|object 2 | N1c244cd259cc4bcdb8efc94652ec0290 sci:O3_sampled_from ngo:0D0E-0001-0000-0000 |object 3 | N1c244cd259cc4bcdb8efc94652ec0290 sci:O4_sampled_at N3017590f9ff54ca4b46ccdeac8e55903 |place_bn 4 | N1c244cd259cc4bcdb8efc94652ec0290 crm:P14_carried_out_by ngo:WLTN-O3MV-PTQH-4CHX |actor 5 | N1c244cd259cc4bcdb8efc94652ec0290 crm:P70_is_documented_in N3c49ba4a0b3c411eb0f28315f97a70e1 |object_bn 6 | N1c244cd259cc4bcdb8efc94652ec0290 rdfs:comment Actual textual content describing the sampling process (describes the event) |note 7 | //subgraph Documentation 8 | wd:Q1710397 rdfs:label reason |thing 9 | N3c49ba4a0b3c411eb0f28315f97a70e1 crm:P2_has_type wd:Q1710397 |type 10 | N3c49ba4a0b3c411eb0f28315f97a70e1 rdfs:comment As part of a general technical examination of the painting - documenting the material and techniques used in its production. |note 11 | N3c49ba4a0b3c411eb0f28315f97a70e1 rdf:type crm:E31_Document |type 12 | N3c49ba4a0b3c411eb0f28315f97a70e1 crm:P2_has_type crm:E31_Document |type 13 | //end 14 | N1c244cd259cc4bcdb8efc94652ec0290 rdf:type sci:S2_Sample_Taking |type 15 | N1c244cd259cc4bcdb8efc94652ec0290 crm:P2_has_type sci:S2_Sample_Taking |type 16 | //subgraph Sampled Location 17 | aat:300241583 rdfs:label components (object part) thing| 18 | N3017590f9ff54ca4b46ccdeac8e55903 crm:P2_has_type aat:300241583 place_bn| 19 | N3017590f9ff54ca4b46ccdeac8e55903 rdfs:label Crimson of cope shadow above right hand 110x |note 20 | N3017590f9ff54ca4b46ccdeac8e55903 rdf:type crm:E53_Place |type 21 | N3017590f9ff54ca4b46ccdeac8e55903 crm:P2_has_type crm:E53_Place |type 22 | //end 23 | //subgraph Sample Embedding 24 | ngo:MNEA-GXYR-WR13-5W4S crm:P2_has_type crm:E13_Attribute_Assignment event|type 25 | aat:300034254 rdfs:label cross sections thing| 26 | aat:300014533 rdfs:label epoxy resin thing| 27 | ngo:MNEA-GXYR-WR13-5W4S crm:P2_has_type aat:300443464 28 | aat:300443464 rdfs:label embedding thing| 29 | ngo:MNEA-GXYR-WR13-5W4S crm:P16_used_specific_object aat:300014533 30 | ngo:MNEA-GXYR-WR13-5W4S crm:P177_assigned_property_of_type aat:300034254 31 | ngo:MNEA-GXYR-WR13-5W4S rdf:type sci:S18_Alteration |type 32 | ngo:MNEA-GXYR-WR13-5W4S crm:P2_has_type sci:S18_Alteration |type 33 | //end 34 | ngo:MNEA-GXYR-WR13-5W4S crm:P140_assigned_attribute_to ngo:Y4M5-2P4X-GYFR-9WJP event_bn|object 35 | ngo:0D0E-0001-0000-0000 crm:P59_has_section N3017590f9ff54ca4b46ccdeac8e55903 |object_bn 36 | //subgraph Sample Imaging 37 | Nb23f47ae7f2543c99655735df33b2b6f crm:P2_has_type crm:E16_Measurement event_bn|type 38 | aat:300379861 rdfs:label imaging (image making process) thing| 39 | Nb23f47ae7f2543c99655735df33b2b6f crm:P2_has_type aat:300379861 40 | Nb23f47ae7f2543c99655735df33b2b6f rdfs:label Imaging of N-0027-00_inorganic_sample_012 |note 41 | Nb23f47ae7f2543c99655735df33b2b6f rdf:type crm:E16_Measurement |type 42 | Nb23f47ae7f2543c99655735df33b2b6f crm:P32_used_general_technique aat:300379532 43 | aat:300379532 rdfs:label optical microscopy 44 | //end 45 | Nb23f47ae7f2543c99655735df33b2b6f crm:P39_measured ngo:Y4M5-2P4X-GYFR-9WJP 46 | //subgraph Person Responsible 47 | ngo:WLTN-O3MV-PTQH-4CHX rdf:type crm:E21_Person |type 48 | aat:300025820 rdfs:label conservation scientist thing| 49 | ngo:WLTN-O3MV-PTQH-4CHX crm:P2_has_type aat:300025820 50 | ngo:WLTN-O3MV-PTQH-4CHX crm:P2_has_type crm:E21_Person |type 51 | ngo:WLTN-O3MV-PTQH-4CHX rdfs:label Example NG Staff Member |note 52 | //end 53 | //subgraph Sample 54 | ngo:Y4M5-2P4X-GYFR-9WJP crm:P138_represents ngo:0D0E-0001-0000-0000 55 | ngo:Y4M5-2P4X-GYFR-9WJP rdfs:label N-0027-00_inorganic_sample_012 |note 56 | ngo:Y4M5-2P4X-GYFR-9WJP crm:P2_has_type sci:S13_Sample |type 57 | ngo:Y4M5-2P4X-GYFR-9WJP sci:O25i_is_contained_in ngo:0D0E-0001-0000-0000 58 | ngo:Y4M5-2P4X-GYFR-9WJP rdf:type sci:S13_Sample |type 59 | aat:300028875 rdfs:label samples thing| 60 | ngo:Y4M5-2P4X-GYFR-9WJP crm:P2_has_type aat:300028875 61 | ngo:0D0E-0001-0000-0000 rdf:type E24_Physical_Human_Made_Thing 62 | ngo:0D0E-0001-0000-0000 rdfs:label Portrait of Pope Julius II |name 63 | //end 64 | ngo:Y4M5-2P4X-GYFR-9WJP crm:P2_has_type aat:300034254 65 | ngo:Y4M5-2P4X-GYFR-9WJP sci:O18i_was_altered_by ngo:MNEA-GXYR-WR13-5W4S 66 | -------------------------------------------------------------------------------- /graphics/GitHub-Mark-64px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpadfield/dynamic-modelling/f98a1b528ef2b90f2c41a8855d1f1a2f3ed767d7/graphics/GitHub-Mark-64px.png -------------------------------------------------------------------------------- /graphics/IPERION-HS Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpadfield/dynamic-modelling/f98a1b528ef2b90f2c41a8855d1f1a2f3ed767d7/graphics/IPERION-HS Logo.png -------------------------------------------------------------------------------- /graphics/UKRI_AHR_Council-Logo_Horiz-RGB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpadfield/dynamic-modelling/f98a1b528ef2b90f2c41a8855d1f1a2f3ed767d7/graphics/UKRI_AHR_Council-Logo_Horiz-RGB.png -------------------------------------------------------------------------------- /graphics/clear-text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpadfield/dynamic-modelling/f98a1b528ef2b90f2c41a8855d1f1a2f3ed767d7/graphics/clear-text.png -------------------------------------------------------------------------------- /graphics/help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpadfield/dynamic-modelling/f98a1b528ef2b90f2c41a8855d1f1a2f3ed767d7/graphics/help.png -------------------------------------------------------------------------------- /graphics/iperionhs-eu-tag2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpadfield/dynamic-modelling/f98a1b528ef2b90f2c41a8855d1f1a2f3ed767d7/graphics/iperionhs-eu-tag2.png -------------------------------------------------------------------------------- /graphics/ng-logo-black-100x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpadfield/dynamic-modelling/f98a1b528ef2b90f2c41a8855d1f1a2f3ed767d7/graphics/ng-logo-black-100x40.png -------------------------------------------------------------------------------- /graphics/sshoc-eu-tag2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpadfield/dynamic-modelling/f98a1b528ef2b90f2c41a8855d1f1a2f3ed767d7/graphics/sshoc-eu-tag2.png -------------------------------------------------------------------------------- /graphics/sshoc-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpadfield/dynamic-modelling/f98a1b528ef2b90f2c41a8855d1f1a2f3ed767d7/graphics/sshoc-logo.png -------------------------------------------------------------------------------- /graphics/view-fullscreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpadfield/dynamic-modelling/f98a1b528ef2b90f2c41a8855d1f1a2f3ed767d7/graphics/view-fullscreen.png -------------------------------------------------------------------------------- /graphics/view-refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpadfield/dynamic-modelling/f98a1b528ef2b90f2c41a8855d1f1a2f3ed767d7/graphics/view-refresh.png -------------------------------------------------------------------------------- /graphics/view-restore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpadfield/dynamic-modelling/f98a1b528ef2b90f2c41a8855d1f1a2f3ed767d7/graphics/view-restore.png -------------------------------------------------------------------------------- /js/local-dev.js: -------------------------------------------------------------------------------- 1 | let config 2 | let prefix 3 | let allClasses 4 | let usedClasses 5 | let pathinfo 6 | 7 | function getCleanTriples(triplesTxt) { 8 | let lastLine = 0; 9 | let cleanData = []; 10 | 11 | let data = triplesTxt.split("\n"); 12 | 13 | data.forEach((line, k) => { 14 | let trip = []; 15 | let m; 16 | 17 | if (/^.+\t.+\t.+$/g.test(line)) { 18 | trip = line.split("\t"); 19 | } else if (/^.+[,].+[,].+$/g.test(line)) { 20 | trip = line.split(","); 21 | } else { 22 | trip = [line]; 23 | } 24 | 25 | trip = trip.map((value) => value.trim()); 26 | 27 | // Starting things with @ can upset mermaid 28 | trip = trip.map((tv) => { 29 | if (/^[\@](.+)$/g.test(tv)) { 30 | m = tv.match(/^[\@](.+)$/); 31 | return m[1]; 32 | } 33 | return tv; 34 | }); 35 | 36 | // only consider the first 4 values - removes spaces coming from spreadsheets 37 | trip = trip.slice(0, 4); 38 | 39 | // Considered as a data line 40 | if (trip[0]) { 41 | lastLine = k; 42 | } 43 | 44 | // Allow gaps of up to two lines between blocks of triples and remove others. 45 | if (k <= lastLine + 2) { 46 | cleanData.push(trip.join("\t")); 47 | } 48 | }); 49 | 50 | return cleanData; 51 | } 52 | 53 | function Mermaid_defThing(varName, no, fc = false) { 54 | let prefix = config.prefix; 55 | let click = false; 56 | let code = "O" + no; 57 | let cls = "literal"; 58 | 59 | for (let nm in prefix) { 60 | let a = prefix[nm]; 61 | let regex = new RegExp("^" + a.match.short + "$"); 62 | 63 | if (regex.test(varName)) { 64 | cls = a.format; 65 | 66 | if (a.url) { 67 | let pp = pathinfo(a.url); 68 | let tt = "Link to: " + pp.dirname + " ..."; 69 | click = `click ${code} "${a.url}${m[1]}" "${tt}";\n`; 70 | } else if (/^http.+$/g.test(varName)) { 71 | click = `click ${code} "${varName}";\n`; 72 | } 73 | 74 | break; 75 | } 76 | } 77 | 78 | if (fc) { 79 | cls = fc; 80 | } 81 | 82 | if (allClasses[cls]) { 83 | usedClasses[cls] = allClasses[cls]; 84 | } else { 85 | if (/^(.+)[-]([0-9]+)[-]([0-9]+)$/g.test(cls)) { 86 | let cm = cls.match(/^(.+)[-]([0-9]+)[-]([0-9]+)$/); 87 | 88 | if (allClasses[cm[1]]) { 89 | let tc = allClasses[cm[1]].trim().replace(/;$/, ''); 90 | tc = tc.replace(new RegExp("classDef " + cm[1]), "classDef " + cls); 91 | tc += ",stroke-dasharray:" + cm[2] + " " + cm[3] + ";\n"; 92 | allClasses[cls] = tc; 93 | usedClasses[cls] = allClasses[cls]; 94 | } 95 | } 96 | } 97 | 98 | let str = `\n${code}("${varName}")\nclass ${code} ${cls};\n${click}`; 99 | 100 | return str; 101 | } 102 | -------------------------------------------------------------------------------- /js/local.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | $("#clear").click(function(){ 3 | $("#triplesTxt").text("") 4 | }); 5 | }); 6 | 7 | $(function () { 8 | 9 | $(document).on('keydown', 'textarea.detectTab', function(e) { 10 | var keyCode = e.keyCode || e.which; 11 | 12 | if (keyCode == 9) { 13 | e.preventDefault(); 14 | // call custom function here 15 | var start = this.selectionStart; 16 | var end = this.selectionEnd; 17 | 18 | // set textarea value to: text before caret + tab + text after caret 19 | $(this).val($(this).val().substring(0, start) 20 | + "\t" 21 | + $(this).val().substring(end)); 22 | 23 | // put caret at right position again 24 | this.selectionStart = 25 | this.selectionEnd = start + 1; 26 | } 27 | }); 28 | }); 29 | 30 | var panZoom; 31 | 32 | function modelZoom () 33 | { 34 | console.log("modelZoom"); 35 | console.log($('zoom-toggle')); 36 | 37 | if (typeof panZoom !== 'undefined') { 38 | // Variable is defined 39 | // Your code here 40 | panZoom.destroy(); 41 | panZoom = undefined; 42 | $(window).off('resize'); 43 | $('#zoom-toggle').prop('checked', false); 44 | } 45 | else { 46 | // Variable is not defined 47 | // Your code here 48 | var md = $( "svg" ).first(); 49 | $(md).width("100%"); 50 | $(md).height("100%"); 51 | 52 | // Expose to window namespase for testing purposes 53 | panZoom = svgPanZoom('#' + $(md).attr('id'), { 54 | zoomEnabled: true, 55 | minZoom: 0.1, 56 | maxZoom: 75, 57 | controlIconsEnabled: true, 58 | fit: true, 59 | center: true 60 | }); 61 | 62 | $('#zoom-toggle').prop('checked', true); 63 | 64 | $(window).resize(function(){ 65 | modelResize (); 66 | }); 67 | 68 | } 69 | } 70 | 71 | function modelResize () 72 | { 73 | console.log("modelResize"); 74 | panZoom.resize(); 75 | panZoom.fit(); 76 | panZoom.center(); 77 | } 78 | 79 | function togglefullscreen (b, divID) 80 | { 81 | var src = $('#'+b).children('img')[0].src; 82 | var filename = src.substring(src.lastIndexOf('/')+1); 83 | 84 | if (filename == "view-fullscreen.png") { 85 | $('#'+b).html(""); } 86 | else { 87 | $('#'+b).html(""); } 88 | 89 | $('#'+divID).toggleClass('fullscreen'); 90 | $(':focus').blur(); 91 | modelResize (); 92 | } 93 | 94 | 95 | $(document).ready(function() 96 | { 97 | /////////////////////////////////////////////////////////////////////// 98 | // Based on https://bbbootstrap.com/snippets/modal-multiple-tabs-89860645 99 | /////////////////////////////////////////////////////////////////////// 100 | 101 | $(".tabs").click(function(){ 102 | $(".tabs").removeClass("active"); 103 | $(".tabs h6").removeClass("font-weight-bold"); 104 | $(".tabs h6").addClass("text-muted"); 105 | $(this).children("h6").removeClass("text-muted"); 106 | $(this).children("h6").addClass("font-weight-bold"); 107 | $(this).addClass("active"); 108 | 109 | current_fs = $(".active"); 110 | next_fs = $(this).attr('id'); 111 | next_fs = "#" + next_fs + "1"; 112 | 113 | $("fieldset").removeClass("show"); 114 | $(next_fs).addClass("show"); 115 | 116 | current_fs.animate({}, { 117 | step: function() { 118 | current_fs.css({ 119 | 'display': 'none', 120 | 'position': 'relative' 121 | }); 122 | next_fs.css({ 123 | 'display': 'block' 124 | }); 125 | } 126 | }); 127 | }); 128 | ////////////////////////////////////////////////////////////////////// 129 | 130 | $(document).ready(function() { 131 | $("#mermaidCode").click(function(e) { 132 | e.preventDefault(); // Prevent the default link behavior 133 | 134 | var htmlContent = $("#modelDivTxt").html(); // Get the HTML content to copy 135 | var decodedContent = $("