Namespace 命名空间
目前只用于存放标准库。后期用于用户自定义文件夹。
在模块下,与模块结构类似,可以任意嵌套,但不能导入导出。
结构声明
- TS Declaration
- Java Class
- JSON Schema
interface Namespace {
"concept": "Namespace", // 产品概念
"originConcept": string, // 表示是从实体还是流程等概念产生的
"name": string, // 命名空间名称
"title": string, // 命名空间标题
"description": string, // 命名空间描述
"children": Array<Namespace>, // 命名空间列表
"processes": Array<Process>, // 流程列表
"structures": Array<Structure>, // 数据结构列表
"enums": Array<Enum>, // 枚举列表
"logics": Array<Logic>, // 逻辑列表
"functions": Array<Function>, // 函数列表
"interfaces": Array<Interface>, // 接口列表
"views": Array<View>, // 页面列表
"frontendVariables": Array<Variable>, // 变量列表
"variables": Array<Variable>, // 变量列表
"viewComponents": Array<ViewComponent>, // 页面组件列表
"processComponents": Array<ProcessComponent>, // 流程组件列表
}
class NamespaceTreeNode {
ConceptEnum concept; // 产品概念
String originConcept; // 表示是从实体还是流程等概念产生的
String name; // 命名空间名称
String title; // 命名空间标题
String description; // 命名空间描述
List<NamespaceTreeNode> children; // 命名空间列表
List<ProcessTreeNode> processes; // 流程列表
List<StructureTreeNode> structures; // 数据结构列表
List<EnumTreeNode> enums; // 枚举列表
List<LogicTreeNode> logics; // 逻辑列表
List<FunctionTreeNode> functions; // 函数列表
List<InterfaceTreeNode> interfaces; // 接口列表
List<ViewTreeNode> views; // 页面列表
List<VariableTreeNode> frontendVariables; // 变量列表
List<VariableTreeNode> variables; // 变量列表
List<ViewComponentTreeNode> viewComponents; // 页面组件列表
List<ProcessComponentTreeNode> processComponents; // 流程组件列表
}
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/Namespace",
"definitions": {
"Namespace": {
"type": "object",
"properties": {
"concept": {
"type": "string",
"const": "Namespace"
},
"originConcept": {
"type": "string"
},
"name": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"children": {
"type": "array",
"items": {
"$ref": "#/definitions/Namespace"
}
},
"processes": {
"type": "array",
"items": {
"$ref": "#/definitions/Process"
}
},
"structures": {
"type": "array",
"items": {
"$ref": "#/definitions/Structure"
}
},
"enums": {
"type": "array",
"items": {
"$ref": "#/definitions/Enum"
}
},
"logics": {
"type": "array",
"items": {
"$ref": "#/definitions/Logic"
}
},
"functions": {
"type": "array",
"items": {
"$ref": "#/definitions/Function"
}
},
"interfaces": {
"type": "array",
"items": {
"$ref": "#/definitions/Interface"
}
},
"views": {
"type": "array",
"items": {
"$ref": "#/definitions/View"
}
},
"frontendVariables": {
"type": "array",
"items": {
"$ref": "#/definitions/Variable"
}
},
"variables": {
"type": "array",
"items": {
"$ref": "#/definitions/Variable"
}
},
"viewComponents": {
"type": "array",
"items": {
"$ref": "#/definitions/ViewComponent"
}
},
"processComponents": {
"type": "array",
"items": {
"$ref": "#/definitions/ProcessComponent"
}
}
},
"required": [
"concept",
"originConcept",
"name",
"title",
"description",
"children",
"processes",
"structures",
"enums",
"logics",
"functions",
"interfaces",
"views",
"frontendVariables",
"variables",
"viewComponents",
"processComponents"
],
"additionalProperties": false
}
}
}
示例
简单示例
- JSON
- YAML
{
"concept": "Namespace",
"originConcept": null,
"name": "nasl.core",
"title": "NASL 核心语言库",
"description": "NASL 核心语言库的描述",
"children": [],
"processes": [],
"structures": [],
"enums": [],
"logics": [],
"functions": [],
"interfaces": [],
"views": [],
"frontendVariables": [],
"variables": [],
"viewComponents": [],
"processComponents": []
}
concept: Namespace
originConcept: null
name: nasl.core
title: NASL 核心语言库
description: NASL 核心语言库的描述
children: []
processes: []
structures: []
enums: []
logics: []
functions: []
interfaces: []
views: []
frontendVariables: []
variables: []
viewComponents: []
processComponents: []