MCPcopy Create free account
hub / github.com/GateNLP/gate-core / newDocument

Method newDocument

src/main/java/gate/Factory.java:481–487  ·  view source on GitHub ↗

Create a new transient Document from a URL.

(URL sourceUrl)

Source from the content-addressed store, hash-verified

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)

Callers 15

testAnnicIndexingMethod · 0.95
testAddDuplicateIDMethod · 0.95
testDocumentAdditionMethod · 0.95
doTestMethod · 0.95
testEditMethod · 0.95
testCompareToMethod · 0.95
testDocRenderMethod · 0.95
testSaveRestoreMethod · 0.95
testSimpleMethod · 0.95

Calls 4

newFeatureMapMethod · 0.95
createResourceMethod · 0.95
setSourceUrlMethod · 0.65
putMethod · 0.45

Tested by 15

testAnnicIndexingMethod · 0.76
testAddDuplicateIDMethod · 0.76
testDocumentAdditionMethod · 0.76
doTestMethod · 0.76
testEditMethod · 0.76
testCompareToMethod · 0.76
testDocRenderMethod · 0.76
testSaveRestoreMethod · 0.76
testSimpleMethod · 0.76