Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

dr.davmgr.protocol
Class DefaultUrls  view DefaultUrls download DefaultUrls.java

java.lang.Object
  extended bydr.davmgr.protocol.DefaultUrls
All Implemented Interfaces:
java.lang.Comparable, Urls

public class DefaultUrls
extends java.lang.Object
implements Urls


Field Summary
protected  java.util.Hashtable attributes
           
protected  java.util.Vector childUrls
           
protected  boolean collection
           
protected  boolean lockable
           
protected  boolean locked
           
protected  Urls parent
           
protected  ProtocolHandler protocolHandler
           
protected  boolean read
           
protected  boolean readable
           
protected  boolean reading
           
protected  boolean writeable
           
 
Fields inherited from interface dr.davmgr.protocol.Urls
A_COLLECTION, A_FILENAME, A_LASTMODIFIED, A_LOCKABLE, A_LOCKED, A_MIMETYPE, A_READ, A_READABLE, A_URL, A_WRITEABLE
 
Constructor Summary
DefaultUrls()
           
 
Method Summary
 void addAttribute(java.lang.String attribute, java.lang.Object value)
           
 void addChildUrls(Urls urls)
           
 int compareTo(java.lang.Object o)
          Compares this object with another, and returns a numerical result based on the comparison.
 java.util.List getAll()
          Returns a list of all children.
 java.lang.Object getAttribute(java.lang.Object attribute)
          Shorthand returns a attribute.
 java.util.Hashtable getAttributes()
          Returns attributes of the Urls object.
 java.util.List getCollections()
          Returns a list of all child collections.
 java.lang.String getFilename()
          Returns the filename of the Urls object.
 java.util.List getFiles()
          Returns a list of all child files.
 long getLastModified()
          Returns last modification date of the Urls object.
 dr.mime.MIMEType getMIMEType()
          Returns a MIMEType instance.
 Urls getParent()
          Returns parent Urls object.
 ProtocolHandler getProtocolHandler()
          Returns protocol handler (shorthand).
 java.net.URL getURL()
          Returns URL instance.
 boolean isCollection()
          Checks collection flag.
 boolean isLeaf()
          Checks collection state.
 boolean isLockable()
          Checks lockable flag.
 boolean isLocked()
          Checks lock flag.
 boolean isRead()
          Checks read flag.
 boolean isReadable()
          Checks readable flag.
 boolean isReading()
          Checks reading flag.
 boolean isWriteable()
          Checks writeable flag.
 boolean removeChildUrls(Urls urls)
           
 void setAttributes(java.util.Hashtable attributes)
           
 void setChildUrls(java.util.Vector childUrls)
           
 void setCollection(boolean collection)
           
 void setFilename(java.lang.String filename)
           
 void setLastModified(long lastModified)
           
 void setLockable(boolean lockable)
           
 void setLocked(boolean locked)
           
 void setMIMEType(dr.mime.MIMEType mimeType)
           
 void setParent(Urls parent)
           
 void setProtocolHandler(ProtocolHandler protocolHandler)
           
 void setRead(boolean read)
           
 void setReadable(boolean readable)
           
 void setReading(boolean reading)
           
 void setUnread()
          Sets Urls object as unread.
 void setURL(java.net.URL url)
           
 void setWriteable(boolean writeable)
           
 java.lang.String toString()
          Returns a string representation of the Urls object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

attributes

protected java.util.Hashtable attributes

collection

protected boolean collection

read

protected boolean read

writeable

protected boolean writeable

readable

protected boolean readable

locked

protected boolean locked

lockable

protected boolean lockable

childUrls

protected java.util.Vector childUrls

parent

protected Urls parent

protocolHandler

protected ProtocolHandler protocolHandler

reading

protected boolean reading
Constructor Detail

DefaultUrls

public DefaultUrls()
Method Detail

getURL

public java.net.URL getURL()
Description copied from interface: Urls
Returns URL instance.

Specified by:
getURL in interface Urls

getFilename

public java.lang.String getFilename()
Description copied from interface: Urls
Returns the filename of the Urls object.

Specified by:
getFilename in interface Urls

getLastModified

public long getLastModified()
Description copied from interface: Urls
Returns last modification date of the Urls object.

Specified by:
getLastModified in interface Urls

getMIMEType

public dr.mime.MIMEType getMIMEType()
Description copied from interface: Urls
Returns a MIMEType instance.

Specified by:
getMIMEType in interface Urls

getAttributes

public java.util.Hashtable getAttributes()
Description copied from interface: Urls
Returns attributes of the Urls object.

Specified by:
getAttributes in interface Urls

getAttribute

public java.lang.Object getAttribute(java.lang.Object attribute)
Description copied from interface: Urls
Shorthand returns a attribute.

Specified by:
getAttribute in interface Urls

addAttribute

public void addAttribute(java.lang.String attribute,
                         java.lang.Object value)

isReadable

public boolean isReadable()
Description copied from interface: Urls
Checks readable flag.

Specified by:
isReadable in interface Urls

isWriteable

public boolean isWriteable()
Description copied from interface: Urls
Checks writeable flag.

Specified by:
isWriteable in interface Urls

isLockable

public boolean isLockable()
Description copied from interface: Urls
Checks lockable flag.

Specified by:
isLockable in interface Urls

isLocked

public boolean isLocked()
Description copied from interface: Urls
Checks lock flag.

Specified by:
isLocked in interface Urls

isCollection

public boolean isCollection()
Description copied from interface: Urls
Checks collection flag.

Specified by:
isCollection in interface Urls

isLeaf

public boolean isLeaf()
Description copied from interface: Urls
Checks collection state.

Specified by:
isLeaf in interface Urls

isRead

public boolean isRead()
Description copied from interface: Urls
Checks read flag.

Specified by:
isRead in interface Urls

getProtocolHandler

public ProtocolHandler getProtocolHandler()
Description copied from interface: Urls
Returns protocol handler (shorthand). return ProtocolHandler instance

Specified by:
getProtocolHandler in interface Urls

setUnread

public void setUnread()
Description copied from interface: Urls
Sets Urls object as unread. All childs are complete deleted.

Specified by:
setUnread in interface Urls

getAll

public java.util.List getAll()
Description copied from interface: Urls
Returns a list of all children.

Specified by:
getAll in interface Urls

getCollections

public java.util.List getCollections()
Description copied from interface: Urls
Returns a list of all child collections.

Specified by:
getCollections in interface Urls

getFiles

public java.util.List getFiles()
Description copied from interface: Urls
Returns a list of all child files.

Specified by:
getFiles in interface Urls

getParent

public Urls getParent()
Description copied from interface: Urls
Returns parent Urls object.

Specified by:
getParent in interface Urls

isReading

public boolean isReading()
Description copied from interface: Urls
Checks reading flag.

Specified by:
isReading in interface Urls

compareTo

public int compareTo(java.lang.Object o)
Description copied from interface: java.lang.Comparable
Compares this object with another, and returns a numerical result based on the comparison. If the result is negative, this object sorts less than the other; if 0, the two are equal, and if positive, this object sorts greater than the other. To translate this into boolean, simply perform o1.compareTo(o2) <op> 0, where op is one of <, <=, =, !=, >, or >=.

You must make sure that the comparison is mutual, ie. sgn(x.compareTo(y)) == -sgn(y.compareTo(x)) (where sgn() is defined as -1, 0, or 1 based on the sign). This includes throwing an exception in either direction if the two are not comparable; hence, compareTo(null) should always throw an Exception.

You should also ensure transitivity, in two forms: x.compareTo(y) > 0 && y.compareTo(z) > 0 implies x.compareTo(z) > 0; and x.compareTo(y) == 0 implies x.compareTo(z) == y.compareTo(z).

Specified by:
compareTo in interface java.lang.Comparable

toString

public java.lang.String toString()
Description copied from interface: Urls
Returns a string representation of the Urls object.

Specified by:
toString in interface Urls

setURL

public void setURL(java.net.URL url)

setFilename

public void setFilename(java.lang.String filename)

setLastModified

public void setLastModified(long lastModified)

setMIMEType

public void setMIMEType(dr.mime.MIMEType mimeType)

setCollection

public void setCollection(boolean collection)

setReadable

public void setReadable(boolean readable)

setWriteable

public void setWriteable(boolean writeable)

setLockable

public void setLockable(boolean lockable)

setLocked

public void setLocked(boolean locked)

setRead

public void setRead(boolean read)

addChildUrls

public void addChildUrls(Urls urls)

removeChildUrls

public boolean removeChildUrls(Urls urls)

setParent

public void setParent(Urls parent)

setProtocolHandler

public void setProtocolHandler(ProtocolHandler protocolHandler)

setAttributes

public void setAttributes(java.util.Hashtable attributes)

setChildUrls

public void setChildUrls(java.util.Vector childUrls)

setReading

public void setReading(boolean reading)