generated.docs.javadoc.org.eclipse.dawnsci.analysis.tree.impl.TreeImpl.html Maven / Gradle / Ivy
TreeImpl (h5jan API)
org.eclipse.dawnsci.analysis.tree.impl
Class TreeImpl
- java.lang.Object
-
- org.eclipse.dawnsci.analysis.tree.impl.TreeImpl
-
- All Implemented Interfaces:
- java.io.Serializable, Tree
- Direct Known Subclasses:
- TreeFileImpl
public class TreeImpl
extends java.lang.Object
implements Tree, java.io.Serializable
A tree has a link to the top group node
- See Also:
- Serialized Form
-
-
Field Summary
Fields
Modifier and Type
Field and Description
protected java.lang.String
host
protected static long
serialVersionUID
protected java.net.URI
source
-
Fields inherited from interface org.eclipse.dawnsci.analysis.api.tree.Tree
FILE_STARTER, HOST_SEPARATOR, ROOT
-
Constructor Summary
Constructors
Constructor and Description
TreeImpl(long oid,
java.net.URI uri)
Construct a tree with given object ID and URI
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
static java.lang.String
canonicalizePath(java.lang.String pathname)
Remove ".." and "." from pathname
NodeLink
findNodeLink(java.lang.String pathname)
GroupNode
getGroupNode()
java.lang.String
getHostname()
long
getID()
NodeLink
getNodeLink()
java.net.URI
getSourceURI()
void
setGroupNode(GroupNode g)
Set root group node
void
setHostname(java.lang.String hostname)
Set name of host that holds file
java.lang.String
toString()
-
-
Field Detail
-
serialVersionUID
protected static final long serialVersionUID
- See Also:
- Constant Field Values
-
source
protected final java.net.URI source
-
host
protected java.lang.String host
-
Constructor Detail
-
TreeImpl
public TreeImpl(long oid,
java.net.URI uri)
Construct a tree with given object ID and URI
- Parameters:
oid
- object ID
uri
- (can be null)
-
Method Detail
-
getSourceURI
public java.net.URI getSourceURI()
- Specified by:
getSourceURI
in interface Tree
- Returns:
- source URI
-
setHostname
public void setHostname(java.lang.String hostname)
Description copied from interface: Tree
Set name of host that holds file
- Specified by:
setHostname
in interface Tree
-
getHostname
public java.lang.String getHostname()
- Specified by:
getHostname
in interface Tree
- Returns:
- hostname (can be null for localhost)
-
getGroupNode
public GroupNode getGroupNode()
- Specified by:
getGroupNode
in interface Tree
- Returns:
- root group node
-
setGroupNode
public void setGroupNode(GroupNode g)
Description copied from interface: Tree
Set root group node
- Specified by:
setGroupNode
in interface Tree
-
getNodeLink
public NodeLink getNodeLink()
- Specified by:
getNodeLink
in interface Tree
- Returns:
- link to root group
-
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
-
findNodeLink
public NodeLink findNodeLink(java.lang.String pathname)
- Specified by:
findNodeLink
in interface Tree
- Returns:
- node link to given path (needs to be absolute) or null if not found
-
canonicalizePath
public static java.lang.String canonicalizePath(java.lang.String pathname)
Remove ".." and "." from pathname
- Parameters:
pathname
-
- Returns:
- canonical form of pathname