程序包 org.xmeta
类 Path
- java.lang.Object
-
- org.xmeta.Path
-
public class Path extends Object
事物的路径,把路径整字符串分解成小单元,用作缓存,不用每次都执行分解的方法。
路径的规则<package>.<thingName>/<childPath1>/<childPath2>.../<childPathn> 包的路径,比如 com xmeta.core 事物的路径,比如 xmeta.core.things.MetaThing 子节点的路径规则: /@thingId //取标识为thingId的子事物 /%name //取事物名为name的子事物,只取第一个 /#attributeId //取属性名为attributeId的事物属性 /!resourceId //调用事物的getResource(resourceId)方法获取资源 /thingName$index //取事物名为thingName的第index个子事物 /thingName@thingId //取事物名为thingName且标识为thingId的子事物 /thingName@ //取事物名为thingName的所有子事物- 作者:
- zhangyuxiang
-
-
字段概要
字段 修饰符和类型 字段 说明 static byteTYPE_ATTRIBUTEstatic byteTYPE_CATEGORYstatic byteTYPE_CATEGORY_OR_THINGstatic byteTYPE_CHILD_THINGstatic byteTYPE_CHILD_THING_AT_INDEXstatic byteTYPE_CHILD_THING_BY_NAMEstatic byteTYPE_CHILD_THING_OR_INDEXstatic byteTYPE_CHILD_THINGSstatic byteTYPE_RESOURCE_IDstatic byteTYPE_THING
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 StringgetAttributeName()PathgetChildPath()shortgetIndex()StringgetPath()StringgetThingId()StringgetThingName()bytegetType()static PathparseChildPath(String path, String childPath)分析子节点。static PathparseOldChildPath(String path, String childPath)分析旧规则的子路径。voidsetType(byte type)StringtoString()
-
-
-
字段详细资料
-
TYPE_CATEGORY
public static final byte TYPE_CATEGORY
- 另请参阅:
- 常量字段值
-
TYPE_THING
public static final byte TYPE_THING
- 另请参阅:
- 常量字段值
-
TYPE_ATTRIBUTE
public static final byte TYPE_ATTRIBUTE
- 另请参阅:
- 常量字段值
-
TYPE_CHILD_THINGS
public static final byte TYPE_CHILD_THINGS
- 另请参阅:
- 常量字段值
-
TYPE_CHILD_THING_AT_INDEX
public static final byte TYPE_CHILD_THING_AT_INDEX
- 另请参阅:
- 常量字段值
-
TYPE_CATEGORY_OR_THING
public static final byte TYPE_CATEGORY_OR_THING
- 另请参阅:
- 常量字段值
-
TYPE_CHILD_THING
public static final byte TYPE_CHILD_THING
- 另请参阅:
- 常量字段值
-
TYPE_CHILD_THING_OR_INDEX
public static final byte TYPE_CHILD_THING_OR_INDEX
- 另请参阅:
- 常量字段值
-
TYPE_CHILD_THING_BY_NAME
public static final byte TYPE_CHILD_THING_BY_NAME
- 另请参阅:
- 常量字段值
-
TYPE_RESOURCE_ID
public static final byte TYPE_RESOURCE_ID
- 另请参阅:
- 常量字段值
-
-
构造器详细资料
-
Path
public Path(String pathStr)
-
-
方法详细资料
-
parseChildPath
public static Path parseChildPath(String path, String childPath)
分析子节点。- 参数:
path- 路径childPath- 子路径- 返回:
- 路径
-
parseOldChildPath
public static Path parseOldChildPath(String path, String childPath)
分析旧规则的子路径。- 参数:
path- 路径childPath- 子路径- 返回:
- 路径
-
getPath
public String getPath()
-
getType
public byte getType()
-
getIndex
public short getIndex()
-
getChildPath
public Path getChildPath()
-
getThingName
public String getThingName()
-
getAttributeName
public String getAttributeName()
-
getThingId
public String getThingId()
-
setType
public void setType(byte type)
-
-