Class Path
- java.lang.Object
-
- org.apache.iotdb.tsfile.read.common.Path
-
- All Implemented Interfaces:
Serializable,Comparable<Path>
public class Path extends Object implements Serializable, Comparable<Path>
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.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Path()Path(String pathSc)this constructor doesn't split the path, only useful for table header.Path(String pathSc, boolean needSplit)Path(String device, String measurement, boolean needCheck)construct a Path directly using device and measurement, no need to reformat the path
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Pathclone()intcompareTo(Path path)static Pathdeserialize(ByteBuffer byteBuffer)booleanequals(Object obj)booleanequals(String obj)intgetColumnNum()return the column contained by this pathStringgetDevice()StringgetFullPath()StringgetFullPathWithAlias()StringgetMeasurement()inthashCode()voidserialize(OutputStream stream)voidserialize(ByteBuffer byteBuffer)voidserialize(PublicBAOS stream)protected voidserializeWithoutType(OutputStream stream)protected voidserializeWithoutType(ByteBuffer byteBuffer)protected voidserializeWithoutType(PublicBAOS stream)voidsetMeasurement(String measurement)StringtoString()
-
-
-
Constructor Detail
-
Path
public Path()
-
Path
public Path(String pathSc)
this constructor doesn't split the path, only useful for table header.- Parameters:
pathSc- the path that wouldn't be split.
-
Path
public Path(String pathSc, boolean needSplit)
- Parameters:
pathSc- pathneedSplit- whether need to be split to device and measurement, doesn't support escape character yet.
-
Path
public Path(String device, String measurement, boolean needCheck)
construct a Path directly using device and measurement, no need to reformat the path- Parameters:
device- root.deviceType.d1measurement- s1 , does not contain TsFileConstant.PATH_SEPARATORneedCheck- need to validate the correctness of the path
-
-
Method Detail
-
getFullPath
public String getFullPath()
-
getDevice
public String getDevice()
-
getMeasurement
public String getMeasurement()
-
getFullPathWithAlias
public String getFullPathWithAlias()
-
setMeasurement
public void setMeasurement(String measurement)
-
equals
public boolean equals(String obj)
-
compareTo
public int compareTo(Path path)
- Specified by:
compareToin interfaceComparable<Path>
-
getColumnNum
public int getColumnNum()
return the column contained by this path
-
serialize
public void serialize(ByteBuffer byteBuffer)
-
serialize
public void serialize(OutputStream stream) throws IOException
- Throws:
IOException
-
serialize
public void serialize(PublicBAOS stream) throws IOException
- Throws:
IOException
-
serializeWithoutType
protected void serializeWithoutType(ByteBuffer byteBuffer)
-
serializeWithoutType
protected void serializeWithoutType(OutputStream stream) throws IOException
- Throws:
IOException
-
serializeWithoutType
protected void serializeWithoutType(PublicBAOS stream) throws IOException
- Throws:
IOException
-
deserialize
public static Path deserialize(ByteBuffer byteBuffer)
-
-