|
Ontimize Document Management 0.035EN | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ontimize.dms.ODMSDocument
public class ODMSDocument
| Field Summary | |
|---|---|
protected java.io.File |
attachment
|
protected java.lang.String |
base
|
static java.lang.String |
CONVERSION_PROPERTY_KEY
|
protected java.lang.String |
file
|
protected java.util.Map |
info
|
static java.lang.String |
INVALID_CONVERT_EXTENDED_KEY
|
static java.lang.String |
INVALID_CONVERT_KEY
|
static java.lang.String |
INVALID_KEY
|
static java.lang.String |
INVALID_KEY_SEPARATOR
|
protected static int |
invalidConvertExtend
|
protected static java.util.List |
invalidConvertList
|
protected static java.lang.String |
invalidConvertString
|
protected static java.util.List |
invalidList
|
protected static java.lang.String |
invalidString
|
protected boolean |
leaf
|
protected Document |
link
|
static java.lang.String |
MSG_CHECK_FILE_LENGTH
|
static java.lang.String |
MSG_CHECK_FILE_LOCKED
|
static java.lang.String |
MSG_CHECK_FILE_NAME
|
static java.lang.String |
MSG_CHECK_PATH_INVALID
|
static java.lang.String |
MSG_INIT_CONTEXT_NULL
|
static java.lang.String |
MSG_INIT_NODE_EMPTY
|
static java.lang.String |
MSG_INIT_NODE_NULL
|
protected java.lang.String |
name
|
protected java.lang.String |
path
|
static java.lang.String |
PROPERTIES
|
static char |
SEPARATOR_BAR_CHAR
|
static char |
SEPARATOR_INV_CHAR
|
| Fields inherited from interface com.ontimize.dms.Document |
|---|
BASE, BLANK, CHILDREN, COMMA, CONTENT, DATE_INSERT, DATE_UPDATE, DEEP, DESCRIPTION, DOCUMENT, FIELDS, FILE, LENGTH, LINK, LINK_TARGET, MAX_LENGTH, MAX_NUMBER, NAME, NODE_STATUS, NODE_STATUS_DATE, NODE_STATUS_USER, PATH, POINT, SEPARATOR_ASTERISK, SEPARATOR_BLANK, SEPARATOR_FILE, SEPARATOR_PATH, SEPARATOR_VERSION, STREAM, STREAM_VERSION, THUMBNAIL, TITLE, TYPE, TYPE_BASE, TYPE_DIR, TYPE_FILE, TYPE_KEYS, TYPE_LINK, USER_INSERT, USER_UPDATE |
| Constructor Summary | |
|---|---|
ODMSDocument()
|
|
ODMSDocument(ContextValues context,
java.util.Map node)
|
|
ODMSDocument(Document parent,
java.lang.String name)
Construct a new Document with the parent base and parent path
(path and name) and the given name. |
|
ODMSDocument(Document base,
java.lang.String path,
java.io.File attachment)
|
|
ODMSDocument(java.io.File file,
java.lang.String base,
java.lang.String name)
|
|
ODMSDocument(java.lang.String base,
java.lang.String path,
java.lang.String name)
|
|
ODMSDocument(java.lang.String base,
java.lang.String path,
java.lang.String name,
java.lang.String file)
|
|
| Method Summary | |
|---|---|
protected void |
check(java.lang.StringBuffer target,
java.io.File file)
|
static boolean |
check(java.lang.String base,
java.lang.String name)
|
protected void |
checkLength(java.lang.String target,
java.io.File file)
|
protected static boolean |
checkLength(java.lang.String target,
java.lang.String name)
|
static void |
checkLock(java.io.File file)
Checks if the file is non locked for read. |
protected static void |
checkName(java.io.File file)
|
static java.lang.String |
checkName(java.lang.String name)
Check the directory or file name. |
static java.lang.String |
checkPath(EntityResult er)
Checks if the model has the same path. |
protected static java.lang.String |
checkUnique(EntityResult er,
java.lang.String key)
|
protected java.lang.Object |
clone()
|
protected boolean |
compare(java.lang.String s1,
java.lang.String s2)
|
int |
compareTo(java.lang.Object o)
|
protected static java.lang.String |
convertInvalidASCII2String(java.lang.String string)
|
protected static java.lang.String |
convertInvalidString2ASCII(java.lang.String string)
|
DocumentList |
create(java.io.File[] files)
Creates a Document list from the given files. |
protected static java.lang.String |
createASCII(char c)
|
protected static java.lang.String |
createJoinedPath(Document base,
java.lang.String path)
|
protected void |
createList(DocumentList list,
java.lang.String current,
java.lang.StringBuffer base,
java.io.File file)
|
Document |
deepClone()
Creates a internal clone |
int |
depth()
|
boolean |
equals(java.lang.Object object)
|
Document |
flatten()
Create a Document with path, name and filename. |
java.io.File |
getAttachedFile()
Returns the attached file to this document. |
java.util.Map |
getAttachedInfo()
|
Document |
getAttachedLink()
|
java.lang.String |
getBase()
Document base string. |
java.io.File |
getCanonicalFile(java.io.File source)
Returns the file from the given source. |
java.io.File |
getCanonicalFile(java.lang.String source)
Returns the file from the given source. |
java.lang.String |
getCanonicalPath()
|
java.lang.String |
getCanonicalPath(java.lang.Number version)
Returns the complete internal path document |
java.lang.String |
getCanonicalPath(java.lang.String keys)
|
java.lang.String |
getExtension()
|
java.lang.String |
getFile()
|
java.lang.String |
getInternalPath()
|
static int |
getInvalidConvertExtend()
|
static java.util.List |
getInvalidConvertList()
|
static java.lang.String |
getInvalidConvertString()
|
static java.util.List |
getInvalidList()
|
static Document[] |
getLinks(Document[] documents)
|
java.util.Map |
getMap()
|
java.lang.String |
getName()
|
Document |
getParent()
|
java.lang.String |
getPath()
|
java.lang.String |
getPath(java.lang.String keys)
|
java.lang.String |
getRelativePath()
Returns the internal path without the base. |
static boolean |
hasEmptyLinks(Document[] documents)
|
boolean |
hasFile()
|
boolean |
isEmpty()
Check if any field is empty. |
protected static boolean |
isInvalidChar(char c)
|
boolean |
isLeaf()
Returns true if this document is a ending node. |
boolean |
isLink()
|
boolean |
isNull()
If the current document path is null. |
int |
length()
Returns the base + path + name length. |
static java.lang.String |
parse(java.lang.String path)
|
protected static java.lang.String |
parse(java.lang.String string,
boolean required)
|
Document |
plain()
|
void |
setAttachedInfo(java.util.Map info)
|
void |
setAttachmentFile(java.io.File attachment)
|
void |
setBase(java.lang.String base)
|
void |
setFile(java.lang.String file)
|
void |
setKeys(java.lang.String keys)
|
void |
setLink(Document link)
|
void |
setName(java.lang.String name)
|
protected void |
setPath(java.lang.String path)
|
boolean |
startsWith(Document d)
|
boolean |
startsWith(Document d,
int level)
|
boolean |
startsWith(java.lang.String string)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String CONVERSION_PROPERTY_KEY
public static final java.lang.String PROPERTIES
public static final java.lang.String INVALID_KEY
public static final java.lang.String INVALID_CONVERT_KEY
public static final java.lang.String INVALID_CONVERT_EXTENDED_KEY
public static final java.lang.String INVALID_KEY_SEPARATOR
public static final java.lang.String MSG_INIT_CONTEXT_NULL
public static final java.lang.String MSG_INIT_NODE_NULL
public static final java.lang.String MSG_INIT_NODE_EMPTY
public static final java.lang.String MSG_CHECK_FILE_LENGTH
public static final java.lang.String MSG_CHECK_FILE_NAME
public static final java.lang.String MSG_CHECK_FILE_LOCKED
public static final java.lang.String MSG_CHECK_PATH_INVALID
public static final char SEPARATOR_INV_CHAR
public static final char SEPARATOR_BAR_CHAR
protected static java.lang.String invalidString
protected static java.util.List invalidList
protected static java.lang.String invalidConvertString
protected static java.util.List invalidConvertList
protected static int invalidConvertExtend
protected java.lang.String base
protected java.lang.String path
protected java.lang.String name
protected java.lang.String file
protected Document link
protected boolean leaf
protected java.io.File attachment
protected java.util.Map info
| Constructor Detail |
|---|
public ODMSDocument()
public ODMSDocument(Document parent,
java.lang.String name)
Construct a new Document with the parent base and parent path
(path and name) and the given name.
parent - Documentname - of the child.
public ODMSDocument(Document base,
java.lang.String path,
java.io.File attachment)
public ODMSDocument(java.io.File file,
java.lang.String base,
java.lang.String name)
public ODMSDocument(ContextValues context,
java.util.Map node)
public ODMSDocument(java.lang.String base,
java.lang.String path,
java.lang.String name)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public ODMSDocument(java.lang.String base,
java.lang.String path,
java.lang.String name,
java.lang.String file)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException| Method Detail |
|---|
protected static java.lang.String createJoinedPath(Document base,
java.lang.String path)
public static java.lang.String parse(java.lang.String path)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
protected static java.lang.String parse(java.lang.String string,
boolean required)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionprotected static java.lang.String createASCII(char c)
protected static boolean isInvalidChar(char c)
protected static java.lang.String convertInvalidString2ASCII(java.lang.String string)
protected static java.lang.String convertInvalidASCII2String(java.lang.String string)
public java.lang.String getBase()
DocumentDocument base string. Can't be null.
getBase in interface Documentpublic java.lang.String getName()
getName in interface Documentpublic java.lang.String getFile()
getFile in interface Documentpublic java.lang.String getExtension()
getExtension in interface Documentpublic java.lang.String getPath()
getPath in interface Documentpublic java.lang.String getPath(java.lang.String keys)
getPath in interface Documentpublic java.lang.String getInternalPath()
getInternalPath in interface Documentpublic Document getParent()
getParent in interface Documentpublic java.lang.String getRelativePath()
DocumentReturns the internal path without the base.
getRelativePath in interface Documentpublic java.lang.String getCanonicalPath()
getCanonicalPath in interface Documentpublic java.lang.String getCanonicalPath(java.lang.String keys)
getCanonicalPath in interface Documentpublic java.lang.String getCanonicalPath(java.lang.Number version)
DocumentReturns the complete internal path document
getCanonicalPath in interface Documentversion - Version number.
public java.io.File getCanonicalFile(java.lang.String source)
DocumentReturns the file from the given source.
getCanonicalFile in interface Documentsource - Source path.
public java.io.File getCanonicalFile(java.io.File source)
DocumentReturns the file from the given source.
getCanonicalFile in interface Documentsource - File directory
public java.io.File getAttachedFile()
DocumentReturns the attached file to this document.
Additional Document information. Not required.
getAttachedFile in interface Documentpublic Document getAttachedLink()
getAttachedLink in interface Documentpublic java.util.Map getMap()
getMap in interface Documentpublic java.util.Map getAttachedInfo()
getAttachedInfo in interface Documentpublic Document flatten()
DocumentCreate a Document with path, name and filename.
flatten in interface Documentpublic Document plain()
plain in interface Documentpublic DocumentList create(java.io.File[] files)
DocumentCreates a Document list from the given files.
Recursive.
Current document is the base path.
create in interface Documentfiles - File array to create a Document list.
Null if the directory listing is not valid.
protected void createList(DocumentList list,
java.lang.String current,
java.lang.StringBuffer base,
java.io.File file)
public static boolean check(java.lang.String base,
java.lang.String name)
protected void check(java.lang.StringBuffer target,
java.io.File file)
throws java.io.IOException
java.io.IOException
protected void checkLength(java.lang.String target,
java.io.File file)
throws java.io.IOException
java.io.IOException
protected static void checkName(java.io.File file)
throws java.io.IOException
java.io.IOException
protected static boolean checkLength(java.lang.String target,
java.lang.String name)
public static java.util.List getInvalidConvertList()
public static java.util.List getInvalidList()
public static java.lang.String getInvalidConvertString()
public static int getInvalidConvertExtend()
public static java.lang.String checkName(java.lang.String name)
Check the directory or file name.
First check if the name starts or ends with a space.
Name can't contains only points.
Last, check the full char string searching invalid chars.
name - Directory or file name.
public static void checkLock(java.io.File file)
throws java.io.IOException
Checks if the file is non locked for read.
file - to check.
java.io.IOException
DocumentExceptionpublic static java.lang.String checkPath(EntityResult er)
Checks if the model has the same path.
protected static java.lang.String checkUnique(EntityResult er,
java.lang.String key)
public void setBase(java.lang.String base)
setBase in interface Documentpublic void setKeys(java.lang.String keys)
setKeys in interface Documentprotected void setPath(java.lang.String path)
public void setName(java.lang.String name)
setName in interface Documentpublic void setFile(java.lang.String file)
setFile in interface Documentpublic void setAttachmentFile(java.io.File attachment)
setAttachmentFile in interface Documentpublic void setLink(Document link)
setLink in interface Documentpublic void setAttachedInfo(java.util.Map info)
setAttachedInfo in interface Documentpublic boolean isNull()
DocumentIf the current document path is null.
isNull in interface Documentpublic boolean isEmpty()
DocumentCheck if any field is empty.
isEmpty in interface Documentpublic boolean isLeaf()
DocumentReturns true if this document is a ending node.
isLeaf in interface Documentpublic boolean isLink()
isLink in interface Documentpublic boolean hasFile()
hasFile in interface Documentpublic boolean startsWith(java.lang.String string)
startsWith in interface Documentpublic boolean startsWith(Document d)
startsWith in interface Document
public boolean startsWith(Document d,
int level)
startsWith in interface Documentpublic int length()
DocumentReturns the base + path + name length.
length in interface Documentpublic int depth()
depth in interface Document
protected boolean compare(java.lang.String s1,
java.lang.String s2)
public int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparablepublic boolean equals(java.lang.Object object)
equals in class java.lang.Object
protected java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic Document deepClone()
DocumentCreates a internal clone
deepClone in interface Documentpublic java.lang.String toString()
toString in class java.lang.Objectpublic static Document[] getLinks(Document[] documents)
public static boolean hasEmptyLinks(Document[] documents)
|
Ontimize Document Management | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||