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

Method duplicate

src/main/java/gate/Factory.java:591–600  ·  view source on GitHub ↗

Create a duplicate of the given resource. A duplicate is a an independent copy of the resource that has the same name and the same behaviour. It does not necessarily have the same concrete class as the original, but if the original resource implements any of the following interface

(Resource res)

Source from the content-addressed store, hash-verified

589 * constructing the duplicate.
590 */
591 public static Resource duplicate(Resource res)
592 throws ResourceInstantiationException {
593 DuplicationContext ctx = new DuplicationContext();
594 try {
595 return duplicate(res, ctx);
596 } finally {
597 // de-activate the context
598 ctx.active = false;
599 }
600 }
601
602 private static long dupIndex = 0;
603

Callers 3

defaultDuplicateMethod · 0.95
duplicateMethod · 0.95
duplicateMethod · 0.95

Calls 11

defaultDuplicateMethod · 0.95
newFeatureMapMethod · 0.95
getNameMethod · 0.65
getMethod · 0.65
duplicateMethod · 0.65
getValueMethod · 0.65
getKeyMethod · 0.65
containsKeyMethod · 0.45
putMethod · 0.45
entrySetMethod · 0.45

Tested by

no test coverage detected