Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
ontouml-js
Advanced tools
Javascript library utility for manipulating OntoUML models.
npm install ontouml-js --save
// yarn users
yarn add ontouml-js
This package is designed to support manipulating OntoUML models, such as the one above, serialized in ontouml-schema
JSON format.
import { ModelManager } from 'ontouml-js';
const modelManager = new ModelManager(ontoULMSchemaModel);
const rootPackage = modelManager.rootPackage; // ontoULMSchemaModel root package
rootPackage.getAllContents() // returns elements recursively contained within the executing package
rootPackage.getAllContentsByType([ OntoUMLType.GENERALIZATION_TYPE, OntoUMLType.PROPERTY_TYPE ]) // returns elements contained within in the package selected by type
rootPackage.getContentById('elementId') // returns the element bearering the given id
const student = rootPackage.getAllContents().find(element => element.name === 'Student'); // Student role class
student.stereotypes; // [ 'role' ]
student.getParents(); // [ Person kind class ]
student.getAncestors(); // [ Person kind class, Agent category class ]
student.getChildren(); // [ Privately Enrolled role class, Privately Enrolled role class ]
student.getDescendants(); // [ Privately Enrolled role class, Privately Enrolled role class ]
const enrollmentDate = rootPackage.getAllContents().find(element => element.name === 'Enrollment Date'); // Enrollment Date mode class
enrollmentDate.properties[0]; // date property representing the class's attibute
enrollmentDate.getRootPackage; // returns rootPackage
If you are interested to know more, feel free to open an issue to provide feedback on the project or reach our team members for more specific cases:
FAQs
Javascript library utility for manipulating OntoUML models.
The npm package ontouml-js receives a total of 0 weekly downloads. As such, ontouml-js popularity was classified as not popular.
We found that ontouml-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.