|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.pentaho.di.repository.RepositoryDirectory
public class RepositoryDirectory
This class defines the location of a transformation, job or schema in the repository. That means that it's just an extra parameter for recognizing a transformation, job or schema. It allows for sub-directories by linking back to itself. TODO: This class is referenced in a large amount of Interfaces. We should convert it into an interface.
Field Summary | |
---|---|
static String |
DIRECTORY_SEPARATOR
|
Constructor Summary | |
---|---|
RepositoryDirectory()
Create an empty repository directory. |
|
RepositoryDirectory(RepositoryDirectoryInterface parent,
String directoryname)
Create a new sub-directory in a certain other directory. |
Method Summary | |
---|---|
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()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String DIRECTORY_SEPARATOR
Constructor Detail |
---|
public RepositoryDirectory(RepositoryDirectoryInterface parent, String directoryname)
parent
- The directory to create the sub-directory indirectoryname
- The name of the new directory.public RepositoryDirectory()
Method Detail |
---|
public List<RepositoryDirectoryInterface> getChildren()
RepositoryDirectoryInterface
getChildren
in interface RepositoryDirectoryInterface
public void setChildren(List<RepositoryDirectoryInterface> children)
RepositoryDirectoryInterface
setChildren
in interface RepositoryDirectoryInterface
children
- list of child directoriespublic List<RepositoryElementMetaInterface> getRepositoryObjects()
RepositoryDirectoryInterface
getRepositoryObjects
in interface RepositoryDirectoryInterface
public void setRepositoryObjects(List<RepositoryElementMetaInterface> repositoryObjects)
RepositoryDirectoryInterface
setRepositoryObjects
in interface RepositoryDirectoryInterface
repositoryObjects
- list of child filespublic void clear()
clear
in interface RepositoryDirectoryInterface
public ObjectId getObjectId()
getObjectId
in interface RepositoryObjectInterface
public void setObjectId(ObjectId id)
setObjectId
in interface RepositoryDirectoryInterface
id
- the database ID for this object in the repository.public void setParent(RepositoryDirectoryInterface parent)
setParent
in interface RepositoryDirectoryInterface
parent
- The new parent of this directory.public RepositoryDirectoryInterface getParent()
getParent
in interface RepositoryDirectoryInterface
public void setName(String directoryname)
setName
in interface RepositoryDirectoryInterface
directoryname
- The new directory namepublic String getName()
getName
in interface RepositoryObjectInterface
public boolean isRoot()
isRoot
in interface RepositoryDirectoryInterface
public String getPath()
getPath
in interface RepositoryDirectoryInterface
public String[] getPathArray()
getPathArray
in interface RepositoryDirectoryInterface
public void addSubdirectory(RepositoryDirectoryInterface subdir)
addSubdirectory
in interface RepositoryDirectoryInterface
subdir
- The subdirectory to add.public int getNrSubdirectories()
getNrSubdirectories
in interface RepositoryDirectoryInterface
public RepositoryDirectory getSubdirectory(int i)
getSubdirectory
in interface RepositoryDirectoryInterface
i
- The subdirectory position
public RepositoryDirectory findDirectory(String[] path)
findDirectory
in interface RepositoryDirectoryInterface
path
- The path to the directory we're looking for.
public RepositoryDirectory findDirectory(String path)
findDirectory
in interface RepositoryDirectoryInterface
path
- The path to the directory
public RepositoryDirectory findChild(String name)
findChild
in interface RepositoryDirectoryInterface
public RepositoryDirectory findDirectory(ObjectId id_directory)
findDirectory
in interface RepositoryDirectoryInterface
id_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 RepositoryDirectoryInterface
public RepositoryDirectoryInterface findRoot()
findRoot
in interface RepositoryDirectoryInterface
public String toString()
toString
in class Object
public String getPathObjectCombination(String transName)
getPathObjectCombination
in interface RepositoryDirectoryInterface
public boolean isVisible()
RepositoryDirectoryInterface
isVisible
in interface RepositoryDirectoryInterface
public void setVisible(boolean visible)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |