@Override public CQIEImpl clone() { Function copyHead = (Function)head.clone(); List<Function> copyBody = new ArrayList<Function>(body.size() + 10); for (Function atom : body) { if (atom != null) { copyBody.add((Function) atom.clone()); } } CQIEImpl newquery = new CQIEImpl(copyHead, copyBody); newquery.rehash = this.rehash; newquery.string = this.string; newquery.hash = this.hash; return newquery; }
@Override public OBDAMappingAxiom clone() { List<Function> newbody = new ArrayList<>(targetQuery.size()); for (Function f : targetQuery) newbody.add((Function)f.clone()); OBDAMappingAxiom clone = new RDBMSMappingAxiomImpl(this.getId(), sourceQuery.clone(), newbody); return clone; }