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)
| 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; |
nothing calls this directly
no test coverage detected