Create a new transient Document from a URL.
(URL sourceUrl)
| 479 | |
| 480 | /** Create a new transient Document from a URL. */ |
| 481 | public static Document newDocument(URL sourceUrl) |
| 482 | throws ResourceInstantiationException { |
| 483 | FeatureMap parameterValues = newFeatureMap(); |
| 484 | parameterValues.put(Document.DOCUMENT_URL_PARAMETER_NAME, sourceUrl); |
| 485 | return (Document)createResource("gate.corpora.DocumentImpl", |
| 486 | parameterValues); |
| 487 | } // newDocument(URL) |
| 488 | |
| 489 | /** Create a new transient Document from a URL and an encoding. */ |
| 490 | public static Document newDocument(URL sourceUrl, String encoding) |