- Author
- Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g
Definition at line 35 of file FileDocument.java.
◆ FileDocument()
Creates a new instance of FileDocument
Definition at line 42 of file FileDocument.java.
44 this.docsRoot = docsRoot;
45 this.parentDoc = parentDoc;
46 this.level = (parentDoc !=
null ? parentDoc.
getLevel() + 1 : 0);
◆ getCanDelete()
boolean org.turro.elephant.documents.FileDocument.getCanDelete |
( |
| ) |
|
◆ getCanDelFolder()
boolean org.turro.elephant.documents.FileDocument.getCanDelFolder |
( |
| ) |
|
◆ getCanNew()
boolean org.turro.elephant.documents.FileDocument.getCanNew |
( |
| ) |
|
◆ getCanNewFolder()
boolean org.turro.elephant.documents.FileDocument.getCanNewFolder |
( |
| ) |
|
◆ getDocumentsRoot()
DocumentsRoot org.turro.elephant.documents.FileDocument.getDocumentsRoot |
( |
| ) |
|
◆ getExtension()
String org.turro.elephant.documents.FileDocument.getExtension |
( |
| ) |
|
Definition at line 203 of file FileDocument.java.
204 String name = getName();
205 int p = name.lastIndexOf(
".");
206 if(p > -1)
return name.substring(p + 1).toLowerCase();
◆ getFormattedName()
String org.turro.elephant.documents.FileDocument.getFormattedName |
( |
| ) |
|
Definition at line 134 of file FileDocument.java.
135 String result = isFile() ? null :
readConfig(
"root.name",
false);
138 String tmp = getName();
139 if(tmp.startsWith(
".")) tmp = tmp.substring(1);
140 int p = tmp.lastIndexOf(
".");
141 if(p > -1) tmp = tmp.substring(0, p);
142 String s[] = tmp.split(
"\\_");
143 for(
int i = 0; i < s.length; i++) {
145 if(result.length() > 0) result +=
" - ";
147 if(s[i].matches(
"[0-9]*")) {
148 switch(s[i].length()) {
169 result += (tmp ==
null ? s[i] : tmp);
173 if(result ==
null) result = getName();
174 if(isFile() &&
"true".equals(
readConfig(
"file.size"))) {
DocumentsBean getDocumentsBean()
String readConfig(String property)
String parseValue(String type, String outFormat, Object value)
String parseString(String type, String inFormat, String outFormat, String value)
◆ getFormattedPath()
String org.turro.elephant.documents.FileDocument.getFormattedPath |
( |
| ) |
|
Definition at line 180 of file FileDocument.java.
184 result = p.getFormattedName() +
" / " + result;
185 p = p.getParentDoc();
FileDocument(DocumentsRoot docsRoot, FileDocument parentDoc, String pathName)
FileDocument getParentDoc()
◆ getLevel()
int org.turro.elephant.documents.FileDocument.getLevel |
( |
| ) |
|
◆ getListDocuments()
FileDocument [] org.turro.elephant.documents.FileDocument.getListDocuments |
( |
| ) |
|
Definition at line 77 of file FileDocument.java.
79 if(children ==
null) {
80 Set s =
new TreeSet(
new FileComparator());
82 File[] fs = listFiles();
83 for(
int i = 0; i < fs.length; i++) {
84 if(!fs[i].getName().startsWith(
".")) {
86 String role = tmp.readConfig(
"root.role",
false);
IConstructor getConstructor()
boolean isInRole(String role)
◆ getListFolders()
FileDocument [] org.turro.elephant.documents.FileDocument.getListFolders |
( |
| ) |
|
Definition at line 98 of file FileDocument.java.
100 Set s =
new TreeSet(
new FileComparator());
102 File[] fs = listFiles();
103 for(
int i = 0; i < fs.length; i++) {
104 if(!fs[i].getName().startsWith(
".") && fs[i].isDirectory()) {
105 tmp =
new FileDocument(docsRoot,
this, fs[i].getPath());
106 String role = tmp.readConfig(
"root.role",
false);
◆ getNotValidated()
FileDocument [] org.turro.elephant.documents.FileDocument.getNotValidated |
( |
| ) |
|
Definition at line 116 of file FileDocument.java.
118 Set s =
new TreeSet(
new FileComparator());
120 File[] fs = listFiles();
121 for(
int i = 0; i < fs.length; i++) {
122 if(fs[i].isDirectory() || (fs[i].isHidden() && !
".docs.properties".equals(fs[i].getName()))) {
123 tmp =
new FileDocument(docsRoot,
this, fs[i].getPath());
124 String role = tmp.readConfig(
"root.role",
false);
◆ getParentDoc()
FileDocument org.turro.elephant.documents.FileDocument.getParentDoc |
( |
| ) |
|
◆ getRelativeURL()
String org.turro.elephant.documents.FileDocument.getRelativeURL |
( |
| ) |
|
Definition at line 190 of file FileDocument.java.
193 }
catch (UnsupportedEncodingException ex) {
194 Logger.getLogger(
FileDocument.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
null), ex);
String getRelativePath(String path)
◆ getSomethingToShow()
boolean org.turro.elephant.documents.FileDocument.getSomethingToShow |
( |
| ) |
|
◆ getUniqueId()
String org.turro.elephant.documents.FileDocument.getUniqueId |
( |
| ) |
|
◆ readConfig() [1/2]
String org.turro.elephant.documents.FileDocument.readConfig |
( |
String |
property | ) |
|
◆ readConfig() [2/2]
String org.turro.elephant.documents.FileDocument.readConfig |
( |
String |
property, |
|
|
boolean |
moveUp |
|
) |
| |
Definition at line 218 of file FileDocument.java.
219 String result =
null;
220 File startPoint =
this;
226 result = props.getProperty(property);
228 if(moveUp && result ==
null) {
Properties getPropertiesFile(String file)
String readRootConfig(String property)
The documentation for this class was generated from the following file: