private PEltype copy(PEltype p) { List<Object> styles = new ArrayList<>(p.getStyle()); Object region = p.getRegion(); p.getStyle().clear(); p.setRegion(null); PEltype targetP = deepCopy(p, PEltype.class, TTML_PACKAGES); p.getStyle().addAll(styles); p.setRegion(region); targetP.getStyle().addAll(styles); targetP.setRegion(region); return targetP; }