@Preview(value="3.0") public class Chain extends Object
| Constructor and Description |
|---|
Chain(String id) |
Chain(String id,
String title) |
Chain(String id,
String title,
String driver) |
| Modifier and Type | Method and Description |
|---|---|
void |
addNode(NodeDecl nodeDecl)
添加节点
|
protected Map<String,Object> |
buildDom() |
void |
check()
校验
|
String |
getDriver()
获取驱动器
|
String |
getId()
获取标识
|
List<Link> |
getLinks()
获取所有连接
|
Object |
getMeta(String key)
获取元数据
|
Object |
getMetaOrDefault(String key,
Object def)
获取元数据或默认
|
Map<String,Object> |
getMetas()
获取元数据
|
Node |
getNode(String id)
获取节点
|
Map<String,Node> |
getNodes()
获取所有节点
|
Node |
getStart()
获取起始节点
|
String |
getTitle()
获取显示标题
|
static Chain |
parseByDom(org.noear.snack.ONode dom)
解析配置文档模型
|
static Chain |
parseByText(String text)
解析配置文本
|
static Chain |
parseByUri(String uri)
解析配置文件
|
String |
toJson()
转为 json
|
String |
toYaml()
转为 yaml
|
public Chain(String id)
public String getId()
public String getTitle()
public String getDriver()
public Node getStart()
public void addNode(NodeDecl nodeDecl)
public void check()
public static Chain parseByText(String text)
text - 配置文本(支持 yml, json 格式)public static Chain parseByDom(org.noear.snack.ONode dom)
dom - 配置文档模型public String toYaml()
public String toJson()
Copyright © 2025. All rights reserved.