Class Path
- java.lang.Object
-
- org.apache.iotdb.tsfile.read.common.Path
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<Path>
public class Path extends java.lang.Object implements java.io.Serializable, java.lang.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(java.lang.String pathSc)this constructor doesn't split the path, only useful for table header.Path(java.lang.String pathSc, boolean needSplit)Path(java.lang.String device, java.lang.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(java.nio.ByteBuffer byteBuffer)booleanequals(java.lang.Object obj)booleanequals(java.lang.String obj)intgetColumnNum()return the column contained by this pathjava.lang.StringgetDevice()java.lang.StringgetFullPath()java.lang.StringgetFullPathWithAlias()java.lang.StringgetMeasurement()inthashCode()voidserialize(java.io.OutputStream stream)voidserialize(java.nio.ByteBuffer byteBuffer)voidserialize(PublicBAOS stream)protected voidserializeWithoutType(java.io.OutputStream stream)protected voidserializeWithoutType(java.nio.ByteBuffer byteBuffer)protected voidserializeWithoutType(PublicBAOS stream)voidsetMeasurement(java.lang.String measurement)java.lang.StringtoString()
-
-
-
Constructor Detail
-
Path
public Path()
-
Path
public Path(java.lang.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(java.lang.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(java.lang.String device, java.lang.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 java.lang.String getFullPath()
-
getDevice
public java.lang.String getDevice()
-
getMeasurement
public java.lang.String getMeasurement()
-
getFullPathWithAlias
public java.lang.String getFullPathWithAlias()
-
setMeasurement
public void setMeasurement(java.lang.String measurement)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
equals
public boolean equals(java.lang.String obj)
-
compareTo
public int compareTo(Path path)
- Specified by:
compareToin interfacejava.lang.Comparable<Path>
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
clone
public Path clone()
- Overrides:
clonein classjava.lang.Object
-
getColumnNum
public int getColumnNum()
return the column contained by this path
-
serialize
public void serialize(java.nio.ByteBuffer byteBuffer)
-
serialize
public void serialize(java.io.OutputStream stream) throws java.io.IOException- Throws:
java.io.IOException
-
serialize
public void serialize(PublicBAOS stream) throws java.io.IOException
- Throws:
java.io.IOException
-
serializeWithoutType
protected void serializeWithoutType(java.nio.ByteBuffer byteBuffer)
-
serializeWithoutType
protected void serializeWithoutType(java.io.OutputStream stream) throws java.io.IOException- Throws:
java.io.IOException
-
serializeWithoutType
protected void serializeWithoutType(PublicBAOS stream) throws java.io.IOException
- Throws:
java.io.IOException
-
deserialize
public static Path deserialize(java.nio.ByteBuffer byteBuffer)
-
-