public void visit(Mark mark) { Mark copy = null; copy = sf.createMark(); copy.setFill(copy(mark.getFill())); copy.setStroke(copy(mark.getStroke())); copy.setWellKnownName(copy(mark.getWellKnownName())); copy.setExternalMark(copy(mark.getExternalMark())); if (STRICT && !copy.equals(mark)) { throw new IllegalStateException("Was unable to duplicate provided Mark:" + mark); } pages.push(copy); }
mark.setExternalMark(emark);
public void testExternalMark() throws URISyntaxException { OnLineResourceImpl or = new OnLineResourceImpl(); or.setLinkage(new URI("ttf://wingdings")); ExternalMark externalMark = sf.externalMark(or, "ttf", 15); Mark mark = sf.createMark(); mark.setExternalMark(externalMark); Mark clone = visitor.copy(mark); assertCopy(mark, clone); assertCopy(mark.getExternalMark(), clone.getExternalMark()); ExternalMark emCopy = clone.getExternalMark(); assertEquals("ttf", emCopy.getFormat()); assertEquals("ttf://wingdings", emCopy.getOnlineResource().getLinkage().toASCIIString()); assertEquals(15, emCopy.getMarkIndex()); }
mark.setExternalMark(emark);