|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.bibalex.daf.entities.phase.PhysicalDef
public class PhysicalDef
Represents the physical section of a phase.
| Field Summary | |
|---|---|
java.util.ArrayList<PhysicalElement> |
elements
Holds the elements defined within this section |
java.lang.String |
mode
The 'Mode' property of the element. |
| Constructor Summary | |
|---|---|
PhysicalDef()
Creates a new instance of PhysicalDef. |
|
PhysicalDef(org.w3c.dom.Node node)
Creates a new instance of PhysicalDef. |
|
PhysicalDef(java.lang.String nodeRep)
Creates a new instance of PhysicalDef. |
|
| Method Summary | |
|---|---|
private void |
createElementFromNode(org.w3c.dom.Node node)
Creates the PhysicalDef element by supplying its XmlNode represenation. |
PhysicalElement[] |
getElements()
Gets the elements defined within this section. |
int |
getFilesCount(java.lang.String source,
FileHandler handler,
java.lang.String jobName)
Counts the numer of files within this PhysicalElement. Folders and Files whose ToDestination attribute equals true are counted. |
FileElement[] |
getSubFiles()
Gets the files defined within this PhaseDef. |
FolderElement[] |
getSubFolders()
Gets the folders defined within this PhaseDef. |
private int |
manageRoot(FolderElement root,
java.lang.String source,
FileHandler handler,
java.lang.String jobName)
Counts the number of files in the folder recursively. |
FolderElement |
toFolderElement()
Converts this instance into FoldeElement instance. |
java.lang.String |
toString()
Returns the string representation of this object. |
java.lang.String |
toXmlString()
Returns a String representing the PhysicalDef in xml format. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public java.lang.String mode
public java.util.ArrayList<PhysicalElement> elements
| Constructor Detail |
|---|
public PhysicalDef()
public PhysicalDef(org.w3c.dom.Node node)
throws PhaseDefinitionException
node - The Xml node that representd the element.
PhaseDefinitionException - If the given node couldn't be parsed.
public PhysicalDef(java.lang.String nodeRep)
throws PhaseDefinitionException
nodeRep - The Xml String representing this element.
PhaseDefinitionException - If the given String couldn't be parsed.| Method Detail |
|---|
private void createElementFromNode(org.w3c.dom.Node node)
throws PhaseDefinitionException
node - The Xml Node representing this element.
PhaseDefinitionException - If a child couldn't be added.public PhysicalElement[] getElements()
public FolderElement[] getSubFolders()
public FileElement[] getSubFiles()
public FolderElement toFolderElement()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toXmlString()
public int getFilesCount(java.lang.String source,
FileHandler handler,
java.lang.String jobName)
source - The source folder that correspond to the physical definition.handler - The FileHandler used to access the folder.jobName - The name of the job. This is required in case of validating the name of the file.
private int manageRoot(FolderElement root,
java.lang.String source,
FileHandler handler,
java.lang.String jobName)
root - The FolderElement to traverse.source - The physical folder that corresponds to the parent of the given FolderElement.handler - The FileHandler used to count the files.jobName - The name of the of the job folder. It is used in case of validating files names.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||