net.sourceforge.ganttproject.document
Class DocumentCreator

java.lang.Object
  |
  +--net.sourceforge.ganttproject.document.DocumentCreator

public class DocumentCreator
extends java.lang.Object

This is a helper class, to create new instances of Document easily. It chooses the correct implementation based on the given path.

Author:
Michael Haeusler (michael at akatose.de)

Constructor Summary
DocumentCreator()
           
 
Method Summary
static Document createDocument(java.lang.String path)
          Creates an URLDocument if path starts with "http://" or "https://"; creates a FileDocument otherwise.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentCreator

public DocumentCreator()
Method Detail

createDocument

public static Document createDocument(java.lang.String path)
Creates an URLDocument if path starts with "http://" or "https://"; creates a FileDocument otherwise.

Parameters:
path - path to the document
Returns:
an implementation of the interface Document


${copyright}