SMACS

smacs.xngr.browser.document
Interface DocumentProperties

All Known Implementing Classes:
DocumentPropertiesXml

public interface DocumentProperties

The base interface for the document properties. Derived from the original properties/DocumentProperties which is now an implementation of it.

Author:
Edwin Dankert

Method Summary
 Element getElement()
          Returns the dom4j Element representation of this document.
 String getLocation()
          Returns the location of the document.
 String getName()
          Returns the name of the document.
 URL getURL()
          Returns the URL of the document.
 DocumentProperties newDocumentProperties(Element element)
          Constructor for the document properties.
 DocumentProperties newDocumentProperties(URL location, boolean validate)
          Constructor for the document properties.
 DocumentProperties newDocumentProperties(URL location, String name, boolean validate)
          Constructor for the document properties.
 void setName(String name)
          Sets the name of the document.
 void setURL(URL url)
          Sets the URL of the document.
 void setValidate(boolean enabled)
          Sets wether this document should be validated.
 boolean validate()
          Returns wether this document should be validated.
 

Method Detail

newDocumentProperties

public DocumentProperties newDocumentProperties(Element element)
Constructor for the document properties.

Parameters:
element - the element that contains the name and location of the document.

newDocumentProperties

public DocumentProperties newDocumentProperties(URL location,
                                                boolean validate)
Constructor for the document properties.

Parameters:
location - the URL of the document.
validate - validate when opening the document.

newDocumentProperties

public DocumentProperties newDocumentProperties(URL location,
                                                String name,
                                                boolean validate)
Constructor for the document properties.

Parameters:
location - the URL of the document.
name - the name of the document.
validate - validate when opening the document.

getURL

public URL getURL()
Returns the URL of the document.

Returns:
the location.

setURL

public void setURL(URL url)
Sets the URL of the document.

Parameters:
url - the document URL (The param should not be null!).

getLocation

public String getLocation()
Returns the location of the document.

Returns:
the location.

getName

public String getName()
Returns the name of the document.

Returns:
the name.

setName

public void setName(String name)
Sets the name of the document.


validate

public boolean validate()
Returns wether this document should be validated.

Returns:
true when the document should be validated.

setValidate

public void setValidate(boolean enabled)
Sets wether this document should be validated.

Parameters:
enabled - true when the document should be validated.

getElement

public Element getElement()
Returns the dom4j Element representation of this document.

Returns:
the element.

SMACS