Package com.powsybl.afs
Class AbstractNodeBase<F>
- java.lang.Object
-
- com.powsybl.afs.AbstractNodeBase<F>
-
- Direct Known Subclasses:
Node
,ProjectNode
public abstract class AbstractNodeBase<F> extends Object
Base class for all node objects stored in an AFS tree.- Author:
- Geoffroy Jamgotchian
-
-
Field Summary
Fields Modifier and Type Field Description protected int
codeVersion
protected NodeInfo
info
protected AppStorage
storage
-
Constructor Summary
Constructors Constructor Description AbstractNodeBase(NodeInfo info, AppStorage storage, int codeVersion)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
archive(Path dir)
void
archive(Path dir, boolean useZip, boolean archiveDependencies, Map<String,List<String>> outputBlackList)
void
archive(Path dir, boolean useZip, boolean archiveDependencies, Map<String,List<String>> outputBlackList, List<String> removeTs)
void
archive(Path dir, Map<String,List<String>> outputBlackList)
void
archive(Path dir, Map<String,List<String>> outputBlackList, List<String> keepTs)
protected NodeInfo
getChildInfo(String name, String... more)
protected int
getCodeVersion()
ZonedDateTime
getCreationDate()
String
getDescription()
String
getId()
An ID uniquely identifying this node in the file system tree.ZonedDateTime
getModificationDate()
String
getName()
abstract Optional<F>
getParent()
protected Optional<NodeInfo>
getParentInfo()
abstract NodePath
getPath()
int
getVersion()
boolean
isAheadOfVersion()
boolean
isAncestorOf(AbstractNodeBase<F> node)
abstract boolean
isFolder()
void
moveTo(AbstractNodeBase<F> folder)
void
rename(String name)
void
setDescription(String description)
String
toString()
void
unarchive(Path dir)
void
unarchive(Path dir, boolean isZipped)
-
-
-
Field Detail
-
info
protected final NodeInfo info
-
storage
protected final AppStorage storage
-
codeVersion
protected int codeVersion
-
-
Constructor Detail
-
AbstractNodeBase
public AbstractNodeBase(NodeInfo info, AppStorage storage, int codeVersion)
-
-
Method Detail
-
getId
public String getId()
An ID uniquely identifying this node in the file system tree.
-
getName
public String getName()
-
getDescription
public String getDescription()
-
setDescription
public void setDescription(String description)
-
getCreationDate
public ZonedDateTime getCreationDate()
-
getModificationDate
public ZonedDateTime getModificationDate()
-
getVersion
public int getVersion()
-
getCodeVersion
protected int getCodeVersion()
-
isAheadOfVersion
public boolean isAheadOfVersion()
-
getPath
public abstract NodePath getPath()
-
isFolder
public abstract boolean isFolder()
-
moveTo
public void moveTo(AbstractNodeBase<F> folder)
-
isAncestorOf
public boolean isAncestorOf(AbstractNodeBase<F> node)
-
rename
public void rename(String name)
-
archive
public void archive(Path dir, boolean useZip, boolean archiveDependencies, Map<String,List<String>> outputBlackList, List<String> removeTs)
-
archive
public void archive(Path dir, boolean useZip, boolean archiveDependencies, Map<String,List<String>> outputBlackList)
-
unarchive
public void unarchive(Path dir, boolean isZipped)
-
archive
public void archive(Path dir, Map<String,List<String>> outputBlackList, List<String> keepTs)
-
archive
public void archive(Path dir)
-
unarchive
public void unarchive(Path dir)
-
-