Difference between revisions of "PyMetaModel"
Jump to navigation
Jump to search
(14 intermediate revisions by the same user not shown) | |||
Line 7: | Line 7: | ||
|title=pyMetaModel | |title=pyMetaModel | ||
|url=https://github.com/WolfgangFahl/pyMetaModel | |url=https://github.com/WolfgangFahl/pyMetaModel | ||
− | |version=0. | + | |version=0.4.4 |
|description=Migration of https://wiki.bitplan.com/index.php/MetaModel#tab=Model | |description=Migration of https://wiki.bitplan.com/index.php/MetaModel#tab=Model | ||
− | |date= | + | |date=2024-08-08 |
|since=2022-12-04 | |since=2022-12-04 | ||
|storemode=property | |storemode=property | ||
}} | }} | ||
+ | {{pip|pyMetaModel}} | ||
+ | = Usage = | ||
+ | <source lang='bash'> | ||
+ | mm_cmd -h | ||
+ | usage: mm_cmd [-h] [--about] [--context CONTEXT] [--copyright COPYRIGHT] [-d] | ||
+ | [-i INPUT] [-l] [-t TITLE] [-u] [--wikiId WIKIID] | ||
+ | |||
+ | pyMetaModel: MetaModel for Knowledge Graphs | ||
+ | |||
+ | Created by Wolfgang Fahl on 2022-11-30. | ||
+ | Copyright 2022 Wolfgang Fahl. All rights reserved. | ||
+ | |||
+ | Licensed under the Apache License 2.0 | ||
+ | http://www.apache.org/licenses/LICENSE-2.0 | ||
+ | |||
+ | Distributed on an "AS IS" basis without warranties | ||
+ | or conditions of any kind, either express or implied. | ||
+ | |||
+ | USAGE | ||
+ | |||
+ | options: | ||
+ | -h, --help show this help message and exit | ||
+ | --about show about info [default: False] | ||
+ | --context CONTEXT context to read [default: MetaModel] | ||
+ | --copyright COPYRIGHT | ||
+ | copyright message for diagrams | ||
+ | -d, --debug show debug info | ||
+ | -i INPUT, --input INPUT | ||
+ | input file | ||
+ | -l, --linkml create linkml yaml file | ||
+ | -t TITLE, --title TITLE | ||
+ | the title of a diagram | ||
+ | -u, --uml create plantuml diagram | ||
+ | --wikiId WIKIID id of the wiki to generate for [default: wiki] | ||
+ | </source> | ||
+ | |||
+ | = Overview = | ||
+ | == Mermaid == | ||
+ | {{#mermaid: | ||
+ | erDiagram | ||
+ | Context { | ||
+ | |||
+ | } | ||
+ | Property { | ||
+ | |||
+ | } | ||
+ | SMWType { | ||
+ | |||
+ | } | ||
+ | Topic { | ||
+ | |||
+ | } | ||
+ | Action { | ||
+ | |||
+ | } | ||
+ | TopicLink { | ||
+ | |||
+ | } | ||
+ | }} | ||
+ | |||
+ | == PlantUML == | ||
+ | <uml> | ||
+ | title | ||
+ | MetaModel | ||
+ | 2015-2022 Wolfgang Fahl | ||
+ | end title | ||
+ | package MetaModel { | ||
+ | Note top of Context | ||
+ | A Context groups some topics like a Namespace/Package | ||
+ | End note | ||
+ | class Context { | ||
+ | name:Text | ||
+ | since:Date | ||
+ | updated:Date | ||
+ | copyright:Text | ||
+ | master:URL | ||
+ | } | ||
+ | Note top of Property | ||
+ | a Property is a Feature/Attribute of a Topic | ||
+ | End note | ||
+ | class Property { | ||
+ | name:Text | ||
+ | label:Text | ||
+ | type:Page | ||
+ | index:Number | ||
+ | sortPos:Number | ||
+ | primaryKey:Boolean | ||
+ | mandatory:Boolean | ||
+ | namespace:Text | ||
+ | size:Number | ||
+ | uploadable:Boolean | ||
+ | defaultValue:Code | ||
+ | inputType:Text | ||
+ | allowedValues:Text | ||
+ | documentation:Text | ||
+ | values_from:Code | ||
+ | externalFormatterURI:Text | ||
+ | showInGrid:Boolean | ||
+ | isLink:Boolean | ||
+ | nullable:Boolean | ||
+ | } | ||
+ | Note top of SMW_Type | ||
+ | an SMW_Type is a data type which determines the possible values for that type e.g. a Boolean can hold true/false values while a Number can hold 3.1459 or 20. A Page can hold the name of a Wiki page see https://semantic-mediawiki.org/wiki/Help:List_of_datatypes | ||
+ | End note | ||
+ | class SMW_Type { | ||
+ | type:Text | ||
+ | documentation:Text | ||
+ | id:Text | ||
+ | helppage:URL | ||
+ | typepage:Page | ||
+ | javaType:Text | ||
+ | } | ||
+ | Note top of Topic | ||
+ | A Topic is a Concept/Class/Thing/Entity | ||
+ | End note | ||
+ | class Topic { | ||
+ | name:Text | ||
+ | pluralName:Text | ||
+ | icon:Page | ||
+ | iconUrl:Code | ||
+ | documentation:Text | ||
+ | wikiDocumentation:Text | ||
+ | defaultstoremode:Text | ||
+ | listLimit:Number | ||
+ | cargo:Boolean | ||
+ | headerTabs:Boolean | ||
+ | } | ||
+ | Note top of Action | ||
+ | An action/function/operation to be performed | ||
+ | End note | ||
+ | class Action { | ||
+ | name:Text | ||
+ | servicetype:Text | ||
+ | service:URL | ||
+ | inputtype:Text | ||
+ | input:Code | ||
+ | actionpage:Page | ||
+ | output:Text | ||
+ | engine:Text | ||
+ | author:Page | ||
+ | since:Date | ||
+ | comment:Text | ||
+ | } | ||
+ | Note top of TopicLink | ||
+ | A TopicLink links two Concepts | ||
+ | End note | ||
+ | class TopicLink { | ||
+ | name:Text | ||
+ | source:Page | ||
+ | sourceRole:Text | ||
+ | sourceMultiple:Boolean | ||
+ | sourceDocumentation:Text | ||
+ | target:Page | ||
+ | targetRole:Text | ||
+ | targetMultiple:Boolean | ||
+ | targetDocumentation:Text | ||
+ | masterDetail:Boolean | ||
+ | } | ||
+ | } | ||
+ | Topic "topic 1" -- "properties *" Property | ||
+ | Context "context 1" -- "topics *" Topic | ||
+ | Property "usedByProperties *" -- "smw_type 1" SMW_Type | ||
+ | |||
+ | ' BITPlan Corporate identity skin params | ||
+ | ' Copyright (c) 2015-2023 BITPlan GmbH | ||
+ | ' see http://wiki.bitplan.com/PlantUmlSkinParams#BITPlanCI | ||
+ | ' skinparams generated by com.bitplan.restmodelmanager | ||
+ | skinparam note { | ||
+ | BackGroundColor #FFFFFF | ||
+ | FontSize 12 | ||
+ | ArrowColor #FF8000 | ||
+ | BorderColor #FF8000 | ||
+ | FontColor black | ||
+ | FontName Technical | ||
+ | } | ||
+ | skinparam component { | ||
+ | BackGroundColor #FFFFFF | ||
+ | FontSize 12 | ||
+ | ArrowColor #FF8000 | ||
+ | BorderColor #FF8000 | ||
+ | FontColor black | ||
+ | FontName Technical | ||
+ | } | ||
+ | skinparam package { | ||
+ | BackGroundColor #FFFFFF | ||
+ | FontSize 12 | ||
+ | ArrowColor #FF8000 | ||
+ | BorderColor #FF8000 | ||
+ | FontColor black | ||
+ | FontName Technical | ||
+ | } | ||
+ | skinparam usecase { | ||
+ | BackGroundColor #FFFFFF | ||
+ | FontSize 12 | ||
+ | ArrowColor #FF8000 | ||
+ | BorderColor #FF8000 | ||
+ | FontColor black | ||
+ | FontName Technical | ||
+ | } | ||
+ | skinparam activity { | ||
+ | BackGroundColor #FFFFFF | ||
+ | FontSize 12 | ||
+ | ArrowColor #FF8000 | ||
+ | BorderColor #FF8000 | ||
+ | FontColor black | ||
+ | FontName Technical | ||
+ | } | ||
+ | skinparam classAttribute { | ||
+ | BackGroundColor #FFFFFF | ||
+ | FontSize 12 | ||
+ | ArrowColor #FF8000 | ||
+ | BorderColor #FF8000 | ||
+ | FontColor black | ||
+ | FontName Technical | ||
+ | } | ||
+ | skinparam interface { | ||
+ | BackGroundColor #FFFFFF | ||
+ | FontSize 12 | ||
+ | ArrowColor #FF8000 | ||
+ | BorderColor #FF8000 | ||
+ | FontColor black | ||
+ | FontName Technical | ||
+ | } | ||
+ | skinparam class { | ||
+ | BackGroundColor #FFFFFF | ||
+ | FontSize 12 | ||
+ | ArrowColor #FF8000 | ||
+ | BorderColor #FF8000 | ||
+ | FontColor black | ||
+ | FontName Technical | ||
+ | } | ||
+ | skinparam object { | ||
+ | BackGroundColor #FFFFFF | ||
+ | FontSize 12 | ||
+ | ArrowColor #FF8000 | ||
+ | BorderColor #FF8000 | ||
+ | FontColor black | ||
+ | FontName Technical | ||
+ | } | ||
+ | hide Circle | ||
+ | ' end of skinparams ' | ||
+ | </uml> | ||
=tickets= | =tickets= |
Latest revision as of 12:01, 8 August 2024
OsProject
OsProject | |
---|---|
id | pyMetaModel |
state | active |
owner | WolfgangFahl |
title | pyMetaModel |
url | https://github.com/WolfgangFahl/pyMetaModel |
version | 0.4.4 |
description | Migration of https://wiki.bitplan.com/index.php/MetaModel#tab=Model |
date | 2024-08-08 |
since | 2022-12-04 |
until |
Installation
pip install pyMetaModel
# alternatively if your pip is not a python3 pip
pip3 install pyMetaModel
# local install from source directory of pyMetaModel
pip install .
upgrade
pip install pyMetaModel -U
# alternatively if your pip is not a python3 pip
pip3 install pyMetaModel -U
Usage
mm_cmd -h
usage: mm_cmd [-h] [--about] [--context CONTEXT] [--copyright COPYRIGHT] [-d]
[-i INPUT] [-l] [-t TITLE] [-u] [--wikiId WIKIID]
pyMetaModel: MetaModel for Knowledge Graphs
Created by Wolfgang Fahl on 2022-11-30.
Copyright 2022 Wolfgang Fahl. All rights reserved.
Licensed under the Apache License 2.0
http://www.apache.org/licenses/LICENSE-2.0
Distributed on an "AS IS" basis without warranties
or conditions of any kind, either express or implied.
USAGE
options:
-h, --help show this help message and exit
--about show about info [default: False]
--context CONTEXT context to read [default: MetaModel]
--copyright COPYRIGHT
copyright message for diagrams
-d, --debug show debug info
-i INPUT, --input INPUT
input file
-l, --linkml create linkml yaml file
-t TITLE, --title TITLE
the title of a diagram
-u, --uml create plantuml diagram
--wikiId WIKIID id of the wiki to generate for [default: wiki]
Overview
Mermaid
PlantUML
![](/images/wiki/diagrams/Diagrams_e53b34190e483c72daca306f6fd34941.png)