/** Creates an on line resource initialized to the given URI. */ public OnLineResourceImpl(final URI linkage) { setLinkage(linkage); }
public OnLineResource getOnlineResource() { if (online == null) { OnLineResourceImpl impl = new OnLineResourceImpl(); try { impl.setLinkage(new URI(uri)); } catch (URISyntaxException e) { throw new IllegalArgumentException(e); } online = impl; } return online; }
/** * Creates an on line resource initialized to the given URI. This method is private for now * since, if this constructor was public, some users may expect a string argument to be for the * description text instead. Furthermore, a public method should not catch the {@link * URISyntaxException} and should not set a function. */ private OnLineResourceImpl(final String linkage) { try { setLinkage(new URI(linkage)); } catch (URISyntaxException exception) { throw new IllegalArgumentException(exception); } setFunction(OnLineFunction.INFORMATION); }
/** * Creates an on line resource initialized to the given URI. */ public OnLineResourceImpl(final URI linkage) { setLinkage(linkage); }
/** * Creates an on line resource initialized to the given URI. */ public OnLineResourceImpl(final URI linkage) { setLinkage(linkage); }
public OnLineResource getOnlineResource() { if(online == null) { OnLineResourceImpl impl = new OnLineResourceImpl(); try { impl.setLinkage(new URI(uri)); } catch (URISyntaxException e) { throw new IllegalArgumentException(e); } online = impl; } return online; }
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()); }
/** * Creates an on line resource initialized to the given URI. * This method is private for now since, if this constructor was public, some * users may expect a string argument to be for the description text instead. * Furthermore, a public method should not catch the {@link URISyntaxException} * and should not set a function. */ private OnLineResourceImpl(final String linkage) { try { setLinkage(new URI(linkage)); } catch (URISyntaxException exception) { throw new IllegalArgumentException(exception); } setFunction(OnLineFunction.INFORMATION); }
/** * Creates an on line resource initialized to the given URI. * This method is private for now since, if this constructor was public, some * users may expect a string argument to be for the description text instead. * Furthermore, a public method should not catch the {@link URISyntaxException} * and should not set a function. */ private OnLineResourceImpl(final String linkage) { try { setLinkage(new URI(linkage)); } catch (URISyntaxException exception) { // Should never happen. TODO: chain the exception in J2SE 1.5. throw new IllegalArgumentException(/*exception*/); } setFunction(OnLineFunction.INFORMATION); }
OnLineResourceImpl updatedOnlineResource = new OnLineResourceImpl(); URI uri = new URI(currentValue); updatedOnlineResource.setLinkage(uri); externalGraphic.setOnlineResource(updatedOnlineResource);