public class RepositoryDirectory extends Object implements RepositoryDirectoryInterface
| Modifier and Type | Field and Description |
|---|---|
static String |
DIRECTORY_SEPARATOR |
| Constructor and Description |
|---|
RepositoryDirectory()
Create an empty repository directory.
|
RepositoryDirectory(RepositoryDirectoryInterface parent,
String directoryname)
Create a new sub-directory in a certain other directory.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSubdirectory(RepositoryDirectoryInterface subdir)
Add a subdirectory to this directory.
|
void |
clear() |
RepositoryDirectory |
findChild(String name) |
RepositoryDirectory |
findDirectory(ObjectId id_directory)
Find the sub-directory with a certain ID
|
RepositoryDirectory |
findDirectory(String path)
Find a directory using the path to the directory with file.separator between the dir-names.
|
RepositoryDirectory |
findDirectory(String[] path)
Find the directory by following the path of strings
|
RepositoryDirectoryInterface |
findRoot()
Find the root of the directory tree starting from this directory.
|
List<RepositoryDirectoryInterface> |
getChildren()
Returns a list of child directories
|
ObjectId[] |
getDirectoryIDs()
Get all the directory-id in this directory and the subdirectories.
|
String |
getName()
Get the name of this directory...
|
int |
getNrSubdirectories()
Counts the number of subdirectories in this directory.
|
ObjectId |
getObjectId()
Get the database ID in the repository for this object.
|
RepositoryDirectoryInterface |
getParent()
get the parent directory for this directory.
|
String |
getPath()
Describe the complete path to ( and including) this directory, separated by the
RepositoryDirectory.DIRECTORY_SEPARATOR property (slash).
|
String[] |
getPathArray()
Describe the complete path to ( and including) this directory, as an array of strings.
|
String |
getPathObjectCombination(String transName) |
List<RepositoryElementMetaInterface> |
getRepositoryObjects()
Returns a list of child files
|
RepositoryDirectory |
getSubdirectory(int i)
Get a subdirectory on a certain position.
|
String |
getXML()
Return the description of this directory & the subdirectories in XML.
|
String |
getXML(int level) |
boolean |
isRoot()
Check whether or not this is the root of the directory trees.
|
boolean |
isVisible()
If true, this directory should be shown in UIs.
|
boolean |
loadXML(Node repdirnode)
Load the directory & subdirectories from XML
|
void |
setChildren(List<RepositoryDirectoryInterface> children)
sets the list of child directories
|
void |
setName(String directoryname)
Set the directory name (rename)
|
void |
setObjectId(ObjectId id)
Set the database ID for this object in the repository.
|
void |
setParent(RepositoryDirectoryInterface parent)
Change the parent of this directory.
|
void |
setRepositoryObjects(List<RepositoryElementMetaInterface> repositoryObjects)
sets the list of child files
|
void |
setVisible(boolean visible) |
String |
toString() |
public static final String DIRECTORY_SEPARATOR
public RepositoryDirectory(RepositoryDirectoryInterface parent, String directoryname)
parent - The directory to create the sub-directory indirectoryname - The name of the new directory.public RepositoryDirectory()
public List<RepositoryDirectoryInterface> getChildren()
RepositoryDirectoryInterfacegetChildren in interface RepositoryDirectoryInterfacepublic void setChildren(List<RepositoryDirectoryInterface> children)
RepositoryDirectoryInterfacesetChildren in interface RepositoryDirectoryInterfacechildren - list of child directoriespublic List<RepositoryElementMetaInterface> getRepositoryObjects()
RepositoryDirectoryInterfacegetRepositoryObjects in interface RepositoryDirectoryInterfacepublic void setRepositoryObjects(List<RepositoryElementMetaInterface> repositoryObjects)
RepositoryDirectoryInterfacesetRepositoryObjects in interface RepositoryDirectoryInterfacerepositoryObjects - list of child filespublic void clear()
clear in interface RepositoryDirectoryInterfacepublic ObjectId getObjectId()
getObjectId in interface RepositoryObjectInterfacepublic void setObjectId(ObjectId id)
setObjectId in interface RepositoryDirectoryInterfaceid - the database ID for this object in the repository.public void setParent(RepositoryDirectoryInterface parent)
setParent in interface RepositoryDirectoryInterfaceparent - The new parent of this directory.public RepositoryDirectoryInterface getParent()
getParent in interface RepositoryDirectoryInterfacepublic void setName(String directoryname)
setName in interface RepositoryDirectoryInterfacedirectoryname - The new directory namepublic String getName()
getName in interface RepositoryObjectInterfacepublic boolean isRoot()
isRoot in interface RepositoryDirectoryInterfacepublic String getPath()
getPath in interface RepositoryDirectoryInterfacepublic String[] getPathArray()
getPathArray in interface RepositoryDirectoryInterfacepublic void addSubdirectory(RepositoryDirectoryInterface subdir)
addSubdirectory in interface RepositoryDirectoryInterfacesubdir - The subdirectory to add.public int getNrSubdirectories()
getNrSubdirectories in interface RepositoryDirectoryInterfacepublic RepositoryDirectory getSubdirectory(int i)
getSubdirectory in interface RepositoryDirectoryInterfacei - The subdirectory positionpublic RepositoryDirectory findDirectory(String[] path)
findDirectory in interface RepositoryDirectoryInterfacepath - The path to the directory we're looking for.public RepositoryDirectory findDirectory(String path)
findDirectory in interface RepositoryDirectoryInterfacepath - The path to the directorypublic RepositoryDirectory findChild(String name)
findChild in interface RepositoryDirectoryInterfacepublic RepositoryDirectory findDirectory(ObjectId id_directory)
findDirectory in interface RepositoryDirectoryInterfaceid_directory - the directory ID to look for.public String getXML()
public String getXML(int level)
public boolean loadXML(Node repdirnode)
repdirnode - The node in which the Repository directory information resides.public ObjectId[] getDirectoryIDs()
getDirectoryIDs in interface RepositoryDirectoryInterfacepublic RepositoryDirectoryInterface findRoot()
findRoot in interface RepositoryDirectoryInterfacepublic String getPathObjectCombination(String transName)
getPathObjectCombination in interface RepositoryDirectoryInterfacepublic boolean isVisible()
RepositoryDirectoryInterfaceisVisible in interface RepositoryDirectoryInterfacepublic void setVisible(boolean visible)
Copyright © 2020 Hitachi Vantara. All rights reserved.