Ontimize Document Management 0.032EN

com.ontimize.dms
Interface Document

All Superinterfaces:
java.lang.Cloneable, java.lang.Comparable, java.io.Serializable
All Known Implementing Classes:
ODMSDocument

public interface Document
extends java.io.Serializable, java.lang.Comparable, java.lang.Cloneable


Field Summary
static java.lang.String BASE
           
static char BLANK
           
static java.lang.String CHILDREN
           
static char COMMA
           
static java.lang.String CONTENT
           
static java.lang.String DATE_INSERT
           
static java.lang.String DATE_UPDATE
           
static java.lang.String DEEP
           
static java.lang.String DESCRIPTION
           
static java.lang.String DOCUMENT
           
static java.lang.String FIELDS
           
static java.lang.String FILE
           
static java.lang.String LENGTH
           
static java.lang.String LINK
           
static java.lang.String LINK_TARGET
           
static int MAX_LENGTH
           
static int MAX_NUMBER
           
static java.lang.String NAME
           
static java.lang.String NODE_STATUS
           
static java.lang.String NODE_STATUS_DATE
           
static java.lang.String NODE_STATUS_USER
           
static java.lang.String PATH
           
static char POINT
           
static java.lang.String SEPARATOR_ASTERISK
           
static java.lang.String SEPARATOR_BLANK
           
static java.lang.String SEPARATOR_FILE
           
static java.lang.String SEPARATOR_PATH
           
static java.lang.String SEPARATOR_VERSION
           
static java.lang.String STREAM
           
static java.lang.String STREAM_VERSION
           
static java.lang.String THUMBNAIL
           
static java.lang.String TITLE
           
static java.lang.String TYPE
           
static java.lang.String TYPE_BASE
           
static java.lang.String TYPE_DIR
           
static java.lang.String TYPE_FILE
           
static java.lang.String TYPE_KEYS
           
static java.lang.String TYPE_LINK
           
static java.lang.String USER_INSERT
           
static java.lang.String USER_UPDATE
           
 
Method Summary
 DocumentList create(java.io.File[] files)
          Creates a Document list from the given files.
 Document deepClone()
          Creates a internal clone
 int depth()
           
 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()
           
 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.
 boolean hasFile()
           
 boolean isEmpty()
          Check if any field is empty.
 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.
 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)
           
 boolean startsWith(Document d)
           
 boolean startsWith(Document d, int level)
           
 boolean startsWith(java.lang.String string)
           
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

DOCUMENT

static final java.lang.String DOCUMENT
See Also:
Constant Field Values

FIELDS

static final java.lang.String FIELDS
See Also:
Constant Field Values

CHILDREN

static final java.lang.String CHILDREN
See Also:
Constant Field Values

DEEP

static final java.lang.String DEEP
See Also:
Constant Field Values

BASE

static final java.lang.String BASE
See Also:
Constant Field Values

PATH

static final java.lang.String PATH
See Also:
Constant Field Values

NAME

static final java.lang.String NAME
See Also:
Constant Field Values

FILE

static final java.lang.String FILE
See Also:
Constant Field Values

LINK

static final java.lang.String LINK
See Also:
Constant Field Values

LINK_TARGET

static final java.lang.String LINK_TARGET
See Also:
Constant Field Values

TITLE

static final java.lang.String TITLE
See Also:
Constant Field Values

DESCRIPTION

static final java.lang.String DESCRIPTION
See Also:
Constant Field Values

THUMBNAIL

static final java.lang.String THUMBNAIL
See Also:
Constant Field Values

CONTENT

static final java.lang.String CONTENT
See Also:
Constant Field Values

TYPE

static final java.lang.String TYPE
See Also:
Constant Field Values

LENGTH

static final java.lang.String LENGTH
See Also:
Constant Field Values

USER_INSERT

static final java.lang.String USER_INSERT
See Also:
Constant Field Values

DATE_INSERT

static final java.lang.String DATE_INSERT
See Also:
Constant Field Values

USER_UPDATE

static final java.lang.String USER_UPDATE
See Also:
Constant Field Values

DATE_UPDATE

static final java.lang.String DATE_UPDATE
See Also:
Constant Field Values

NODE_STATUS

static final java.lang.String NODE_STATUS
See Also:
Constant Field Values

NODE_STATUS_USER

static final java.lang.String NODE_STATUS_USER
See Also:
Constant Field Values

NODE_STATUS_DATE

static final java.lang.String NODE_STATUS_DATE
See Also:
Constant Field Values

STREAM

static final java.lang.String STREAM
See Also:
Constant Field Values

STREAM_VERSION

static final java.lang.String STREAM_VERSION
See Also:
Constant Field Values

TYPE_BASE

static final java.lang.String TYPE_BASE
See Also:
Constant Field Values

TYPE_KEYS

static final java.lang.String TYPE_KEYS
See Also:
Constant Field Values

TYPE_FILE

static final java.lang.String TYPE_FILE
See Also:
Constant Field Values

TYPE_LINK

static final java.lang.String TYPE_LINK
See Also:
Constant Field Values

TYPE_DIR

static final java.lang.String TYPE_DIR
See Also:
Constant Field Values

SEPARATOR_BLANK

static final java.lang.String SEPARATOR_BLANK
See Also:
Constant Field Values

SEPARATOR_PATH

static final java.lang.String SEPARATOR_PATH
See Also:
Constant Field Values

SEPARATOR_FILE

static final java.lang.String SEPARATOR_FILE
See Also:
Constant Field Values

SEPARATOR_VERSION

static final java.lang.String SEPARATOR_VERSION
See Also:
Constant Field Values

SEPARATOR_ASTERISK

static final java.lang.String SEPARATOR_ASTERISK
See Also:
Constant Field Values

COMMA

static final char COMMA
See Also:
Constant Field Values

BLANK

static final char BLANK
See Also:
Constant Field Values

POINT

static final char POINT
See Also:
Constant Field Values

MAX_LENGTH

static final int MAX_LENGTH
See Also:
Constant Field Values

MAX_NUMBER

static final int MAX_NUMBER
See Also:
Constant Field Values
Method Detail

getBase

java.lang.String getBase()

Document base string. Can't be null.

Returns:
Base string.

getPath

java.lang.String getPath()

getPath

java.lang.String getPath(java.lang.String keys)

getInternalPath

java.lang.String getInternalPath()

getName

java.lang.String getName()

getFile

java.lang.String getFile()

getExtension

java.lang.String getExtension()

getParent

Document getParent()

getRelativePath

java.lang.String getRelativePath()

Returns the internal path without the base.


getCanonicalPath

java.lang.String getCanonicalPath()

getCanonicalPath

java.lang.String getCanonicalPath(java.lang.String keys)

getCanonicalPath

java.lang.String getCanonicalPath(java.lang.Number version)

Returns the complete internal path document

Parameters:
version - Version number.
Returns:
String with the internal path.

getCanonicalFile

java.io.File getCanonicalFile(java.lang.String source)

Returns the file from the given source.

Parameters:
source - Source path.
Returns:
File from the given source.

getCanonicalFile

java.io.File getCanonicalFile(java.io.File source)

Returns the file from the given source.

Parameters:
source - File directory
Returns:
File from the given source.

getAttachedFile

java.io.File getAttachedFile()

Returns the attached file to this document.

Additional Document information. Not required.

Returns:
Attached file to this document.

getAttachedLink

Document getAttachedLink()

getAttachedInfo

java.util.Map getAttachedInfo()

getMap

java.util.Map getMap()

flatten

Document flatten()

Create a Document with path, name and filename.

Returns:
Document with path, name and file.

plain

Document plain()

create

DocumentList create(java.io.File[] files)

Creates a Document list from the given files. Recursive.

Current document is the base path.

Parameters:
files - File array to create a Document list. Null if the directory listing is not valid.
Returns:
Document list object with the valid files and invalid in the attached data.

setBase

void setBase(java.lang.String base)

setKeys

void setKeys(java.lang.String keys)

setName

void setName(java.lang.String name)

setFile

void setFile(java.lang.String file)

setLink

void setLink(Document link)

setAttachmentFile

void setAttachmentFile(java.io.File attachment)

setAttachedInfo

void setAttachedInfo(java.util.Map info)

isNull

boolean isNull()

If the current document path is null.

Returns:
True if the current document doesn't contain any valid path.

isEmpty

boolean isEmpty()

Check if any field is empty.

Returns:
True if any field is empty.

isLeaf

boolean isLeaf()

Returns true if this document is a ending node.

Returns:
True if this node is a ending node. False otherwise.

isLink

boolean isLink()

hasFile

boolean hasFile()

startsWith

boolean startsWith(java.lang.String string)

startsWith

boolean startsWith(Document d)

startsWith

boolean startsWith(Document d,
                   int level)

length

int length()

Returns the base + path + name length.

Returns:
Internal path length.

depth

int depth()

deepClone

Document deepClone()

Creates a internal clone

Returns:
Copy of the current Document.

Ontimize Document Management