Skip to content

Instantly share code, notes, and snippets.

View nfigay's full-sized avatar
💭
Expert on Interoperability

Figay nfigay

💭
Expert on Interoperability
View GitHub Profile
@nfigay
nfigay / archimate.js
Created August 31, 2021 08:46
A javascript library to be reuse on #jArchi scripts or javascript programs, with a set of tables related to the ArchiMate language.
var ArchiMateObjects=["Resource","Capability", "Value_Stream","Course_Of_Action","Business_Actor","Business_Role", "Business_Collaboration", "Business_Interface", "Business_Process", "Business_Function", "Business_Interaction", "Business_Event", "Business_Service", "Business_Object", "Contract", "Representation", "Product", "Application_Component", "Application_Collaboration", "Application_Interface", "Application_Function", "Application_Interaction", "Application_Process", "Application_Event","Application_Service", "Data_Object", "Node", "Device", "System_Software","Technology_Collaboration", "Technology_Interface", "Path","Communication_Network", "Technology_Function", "Technology_Process", "Technology_Interaction", "Technology_Event", "Technology_Service", "Artifact", "Equipment", "Facility", "Distribution_Network", "Material", "Stakeholder", "Driver", "Assessment", "Goal", "Outcome", "Principle", "Requirement", "Constraint", "Meaning", "Value", "WorkPackage", "Deliverable", "Implementation_Event", "Platea
@nfigay
nfigay / ArchiRelationshipArrayBuilder.ajs
Last active October 8, 2022 14:41
This #jArchi script aims at create the table of allowed relationships in ArchiMate, as implemented by Archi, as a excel table.
/*
* Archi Relationship Array Builder script
*/
console.log("Archi Relationship Array Builder");
var ArchiMateObjects=["Resource","Capability", "Value_Stream","Course_Of_Action","Business_Actor","Business_Role", "Business_Collaboration", "Business_Interface", "Business_Process", "Business_Function", "Business_Interaction", "Business_Event", "Business_Service", "Business_Object", "Contract", "Representation", "Product", "Application_Component", "Application_Collaboration", "Application_Interface", "Application_Function", "Application_Interaction", "Application_Process", "Application_Event","Application_Service", "Data_Object", "Node", "Device", "System_Software","Technology_Collaboration", "Technology_Interface", "Path","Communication_Network", "Technology_Function", "Technology_Process", "Technology_Interaction", "Technology_Event", "Technology_Service", "Artifact", "Equipment", "Facility", "Distribution_Network", "Material", "Stakeholder", "Driver", "Assessment", "Goal", "Outcome", "Principle", "Requirem
@nfigay
nfigay / ExportToOWL.ajs
Last active May 14, 2024 20:30
This #jArchi script export the content of a selected model as an OWL2 file.
/*
* ArchiMate Model export as OWL2 file
* Author: Nicolas Figay 2021
* Version: 0.1
* This script creates a vis.js graph
*/
console.log("Export to Ontology Web Language");
load(__DIR__ + "lib/archimate.js");
@nfigay
nfigay / PlantUML-V2G
Created August 31, 2021 08:21
This #jArchi script creates a PlantUML file (.puml) with all elements in the selected views - one file per view * A simple graph is produced, no nesting produced
/*
* PlantUML View export as Graph Script (PlantUML-V2G)
* Author: Nicolas Figay 2020
* Version: 0.1
* This script creates a .puml file with all elements in the selected views - one file per view
* A simple graph is produced, no nesting produced
*/
console.log("PlantUML View export Script");
load(__DIR__ + "lib/archimate.js");
@nfigay
nfigay / PlantUML-V2NG
Last active August 31, 2021 08:17
This #jArchi script * This script creates a .puml file with all elements in the selected views - one file per view .A graph is produced, with Group and Grouping elements represented as nesting elements
console.log("PlantUML View export as Graph with Nesting Script (PlantUML-V2NG)");
load(__DIR__ + "lib/archimate.js");
String.prototype.capitalize = function() {
return this.charAt(0).toUpperCase() + this.slice(1);
}
let displayChildren = function f(object){
var did="#"+object.id;
$(did).children().filter('element').each(function(node) {
switch (node.type) {
case 'junction':
@nfigay
nfigay / ExportToVisJs.ajs
Last active June 6, 2024 21:39
This #jArchi script export the content of a selected Archi diagram on a single HTML page, with side by side the exported image of the diagram, and two interactive #visjs graphs, one as a flat graph, the other using an expendable node for all the composite model element of the graph. It reuses archimate.js, which provides a set of arrays containi…
/*
* View export as Vis.js
* Author: Nicolas Figay 2021
* Version: 0.1
* This script creates a vis.js graph
*/
var ArchiMateRelationArcs =
["arrows:{to: {enabled:false,type:'arrow'},\
from: {enabled:false,type:'arrow'}},\
@nfigay
nfigay / TransversalFolderStructure.ajs
Last active January 21, 2022 16:17
Import of a hierarchy as a transversal folder structure plus Grouping hierarchy
/*
* Creation of Transversal Folder Structure script
* Author: Nicolas Figay 2020
* Version: 0.1
* This #jarchi script - from a text describing a table of content or a hierarchy - creates a folder structure for
* each ArchiMate layer and for views
* In addition, a grouping is created per hierarchy element
*/
console.log("Creation of Transversal Folder Structure script");