sidif package¶
Submodules¶
sidif.sidif module¶
Created on 06.11.2020
@author: wf
-
class
sidif.sidif.
DataInterchange
[source]¶ Bases:
object
a data interchange
-
addSchemaFromDict
(pDict, context, parent, parentName)[source]¶ add schema information from the given dict
-
toDictOfDicts
()[source]¶ convert me to a dict of dicts following the “it” semantics
e.g.
JohnDoe isA Person "John" is firstName of it "Doe" is lastName of it 35 is age of it
will have a pseudo - triple representation of
JohnDoe isA Person John firstName it Doe lastName it 35 age it
leading to a dict
{ 'JohnDoe': { 'isA': Person, 'firstName': John, 'lastName': 'Doe' 'age': 35 } }
- Returns
the dict of dicts representation of the triples found
- Return type
dict
-
-
class
sidif.sidif.
SiDIFParser
(showErrors=True, debug=False)[source]¶ Bases:
object
Parser for SiDIF Simple Data Interchange Format see http://wiki.bitplan.com/index.php/SiDIF
-
convertToTriple
(tokenStr, location, group)[source]¶ convert the given token to a triple
- Parameters
tokenStr (str) – the token string
location (object) – location of the parse process
group (ParseResults) – the expected triple defining group
-
handleStringLiteral
(_tokenStr, _location, tokens)[source]¶ handle string literals
- Parameters
tokens (ParseResults) – the tokens for the literal
-
parseText
(sidif, title=None)[source]¶ parse the given sidif text
- Parameters
sidif (str) – the SiDIF text to be parsed
- Returns
ParseResult from pyParsing and error - one of these should be None
- Return type
tuple
-
parseUrl
(url, title=None)[source]¶ parse the sidif text from the given url
- Parameters
url (str) – the url to read the SiDIF text from
-
parseWithGrammar
(grammar, text, title=None)[source]¶ parse the given text with the given grammar optionally labeling the parse with the given title
- Parameters
grammar (object) – a pyparsing grammar
text (str) – the text to be parsed
title (str) – optional title
-
sidif.uml module¶
Created on 2020-11-12
@author: wf
-
class
sidif.uml.
PlantUml
(copyRight=None, title=None, debug=False, withSkin=True)[source]¶ Bases:
object
classdocs
-
skinparams
= "\n' BITPlan Corporate identity skin params\n' Copyright (c) 2015-2020 BITPlan GmbH\n' see http://wiki.bitplan.com/PlantUmlSkinParams#BITPlanCI\n' skinparams generated by com.bitplan.restmodelmanager\nskinparam note {\n BackGroundColor #FFFFFF\n FontSize 12\n ArrowColor #FF8000\n BorderColor #FF8000\n FontColor black\n FontName Technical\n}\nskinparam component {\n BackGroundColor #FFFFFF\n FontSize 12\n ArrowColor #FF8000\n BorderColor #FF8000\n FontColor black\n FontName Technical\n}\nskinparam package {\n BackGroundColor #FFFFFF\n FontSize 12\n ArrowColor #FF8000\n BorderColor #FF8000\n FontColor black\n FontName Technical\n}\nskinparam usecase {\n BackGroundColor #FFFFFF\n FontSize 12\n ArrowColor #FF8000\n BorderColor #FF8000\n FontColor black\n FontName Technical\n}\nskinparam activity {\n BackGroundColor #FFFFFF\n FontSize 12\n ArrowColor #FF8000\n BorderColor #FF8000\n FontColor black\n FontName Technical\n}\nskinparam classAttribute {\n BackGroundColor #FFFFFF\n FontSize 12\n ArrowColor #FF8000\n BorderColor #FF8000\n FontColor black\n FontName Technical\n}\nskinparam interface {\n BackGroundColor #FFFFFF\n FontSize 12\n ArrowColor #FF8000\n BorderColor #FF8000\n FontColor black\n FontName Technical\n}\nskinparam class {\n BackGroundColor #FFFFFF\n FontSize 12\n ArrowColor #FF8000\n BorderColor #FF8000\n FontColor black\n FontName Technical\n}\nskinparam object {\n BackGroundColor #FFFFFF\n FontSize 12\n ArrowColor #FF8000\n BorderColor #FF8000\n FontColor black\n FontName Technical\n}\nhide Circle\n' end of skinparams '\n"¶
-