程序包 org.xmeta.util
类 UtilThing
java.lang.Object
org.xmeta.util.UtilThing
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static voidchangeCoder(Thing thing, String coder) 改变一个模型的编码格式。static ThinggetQuoteThing(Thing thing, String attribute) 返回引用的模型,如果属性就不存在,那么就找根模型下的子模型。static ThinggetSelfQuoteThing(Thing thing, String attribute) 返回只会连接到同一个根模型下的子模型,用在只会在模型内部连接的情况。static ThinggetThingFromAttributeOrChild(Thing thing, String attributeName, String childThingPath) 通过模型属性获取模型定义的模型,或者通过指定的子模型的第一个子节点获取定义的模型。static ThinggetThingFromAttributeOrChilds(Thing thing, String attributeName, String childThingPath) 通过模型属性获取模型定义的模型,或者通过指定的子模型的第一个子节点获取定义的模型。static ThinggetThingIfNotExistsCreate(String path, String thingManager, String descriptorForCreate) 获取模型,如果不存在就创建一个。static ThinggetThingIfNotExistsCreate(String path, String thingManager, Thing forReplace) 获取模型,如果不存在就用已有的模型创建一个。static booleanisDescriptorEquals(Thing descriptorThing, String descriptor) 判断一个模型作为描述者时是否是给定的类型,即判断这个模型的路径以及所有继承模型的路径是否是指定的descritpor。static booleanisDescriptorEquals1(String descriptorFor, String descriptor)
-
构造器详细资料
-
UtilThing
public UtilThing()
-
-
方法详细资料
-
getThingFromAttributeOrChilds
public static Thing getThingFromAttributeOrChilds(Thing thing, String attributeName, String childThingPath) 通过模型属性获取模型定义的模型,或者通过指定的子模型的第一个子节点获取定义的模型。- 参数:
thing- 模型attributeName- 属性名childThingPath- 子模型路径- 返回:
- 模型
-
getThingFromAttributeOrChild
public static Thing getThingFromAttributeOrChild(Thing thing, String attributeName, String childThingPath) 通过模型属性获取模型定义的模型,或者通过指定的子模型的第一个子节点获取定义的模型。- 参数:
thing- 模型attributeName- 属性名childThingPath- 子模型路径- 返回:
- 模型
-
isDescriptorEquals
判断一个模型作为描述者时是否是给定的类型,即判断这个模型的路径以及所有继承模型的路径是否是指定的descritpor。- 参数:
descriptorThing- 描述者模型descriptor- 描述者- 返回:
- 是否
-
isDescriptorEquals1
-
getThingIfNotExistsCreate
public static Thing getThingIfNotExistsCreate(String path, String thingManager, String descriptorForCreate) 获取模型,如果不存在就创建一个。- 参数:
path- 路径thingManager- 模型管理器descriptorForCreate- 描述者- 返回:
- 模型
-
getThingIfNotExistsCreate
获取模型,如果不存在就用已有的模型创建一个。- 参数:
path- 路径thingManager- 模型管理器forReplace- 是否覆盖- 返回:
- 模型
-
getQuoteThing
返回引用的模型,如果属性就不存在,那么就找根模型下的子模型。如果是子模型,那么替换路径。- 参数:
thing-attribute-- 返回:
-
getSelfQuoteThing
返回只会连接到同一个根模型下的子模型,用在只会在模型内部连接的情况。- 参数:
thing- 模型attribute- 改模型的属性名- 返回:
- 所连接的模型
-
changeCoder
改变一个模型的编码格式。- 参数:
thing-coder-
-