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

Method duplicate

src/main/java/gate/corpora/CorpusImpl.java:739–747  ·  view source on GitHub ↗

Custom duplication for a corpus - duplicate this corpus in the usual way, then duplicate the documents in this corpus and add them to the duplicate.

(Factory.DuplicationContext ctx)

Source from the content-addressed store, hash-verified

737 * to the duplicate.
738 */
739 @Override
740 public Resource duplicate(Factory.DuplicationContext ctx)
741 throws ResourceInstantiationException {
742 Corpus newCorpus = (Corpus)Factory.defaultDuplicate(this, ctx);
743 for(Document d : this) {
744 newCorpus.add((Document)Factory.duplicate(d, ctx));
745 }
746 return newCorpus;
747 }
748
749 /** Freeze the serialization UID. */
750 static final long serialVersionUID = -1113142759053898456L;

Callers

nothing calls this directly

Calls 3

defaultDuplicateMethod · 0.95
duplicateMethod · 0.95
addMethod · 0.65

Tested by

no test coverage detected