未验证 提交 4cedb4e0 编写于 作者: B Boris 提交者: GitHub

Add java doc. (#1681)

* add javadoc for PartialPath

* add javadoc for Path

* Update Path.java

* add java doc
Co-authored-by: Nqiaojialin <646274302@qq.com>
上级 393a91f4
......@@ -26,7 +26,8 @@ import org.apache.iotdb.tsfile.common.constant.TsFileConstant;
import org.apache.iotdb.tsfile.read.common.Path;
/**
* A prefix path, suffix path or fullPath generated from SQL
* A prefix path, suffix path or fullPath generated from SQL.
* Usually used in the IoTDB server module
*/
public class PartialPath extends Path implements Comparable<Path> {
......@@ -36,15 +37,30 @@ public class PartialPath extends Path implements Comparable<Path> {
// alias of time series used in SELECT AS
private String tsAlias = null;
/**
* Construct the PartialPath using a String, will split the given String into String[]
* E.g., path = "root.sg.\"d.1\".\"s.1\""
* nodes = {"root", "sg", "\"d.1\"", "\"s.1\""}
*
* @param path a full String of a time series path
* @throws IllegalPathException
*/
public PartialPath(String path) throws IllegalPathException {
this.nodes = MetaUtils.splitPathToDetachedPath(path);
this.fullPath = path;
}
/**
* @param partialNodes nodes of a time series path
*/
public PartialPath(String[] partialNodes) {
nodes = partialNodes;
}
/**
* @param path path
* @param needSplit needSplit is basically false, whether need to be split to device and measurement, doesn't support escape character yet.
*/
public PartialPath(String path, boolean needSplit) {
super(path, needSplit);
}
......
......@@ -22,10 +22,11 @@ import java.io.Serializable;
import org.apache.iotdb.tsfile.common.constant.TsFileConstant;
/**
* This class define an Object named Path to represent a series in IoTDB.
* AndExpression in batch read, this definition is also used in query
* processing. Note that, Path is unmodified after a new object has been
* created.
* This class represent a time series in TsFile,
* which is usually defined by a device and a measurement.
*
* If you want to use one String such as "device1.measurement1" to init Path in TsFile API,
* please use the new Path(string, true) to split it to device and measurement.
*/
public class Path implements Serializable, Comparable<Path> {
......@@ -56,8 +57,6 @@ public class Path implements Serializable, Comparable<Path> {
}
if(!needSplit) {
fullPath = pathSc;
device = "";
measurement = pathSc;
} else {
if (pathSc.length() > 0) {
if (pathSc.charAt(pathSc.length() - 1) == TsFileConstant.DOUBLE_QUOTE) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册