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 a responsible party metadata entry for OGC involvement. The organisation name is * automatically set to "Open Geospatial Consortium". * * @param role The OGC role (point of contact, owner, etc.) for a resource. * @param function The OGC function (information, download, etc.) for a resource. * @param onlineResource The URI to the resource. * @return Responsible party describing OGC involvement. */ public static ResponsibleParty OGC( final Role role, final OnLineFunction function, final URI onlineResource) { final OnLineResourceImpl resource = new OnLineResourceImpl(onlineResource); resource.setFunction(function); resource.freeze(); return OGC(role, resource); }
/** Set the name of an application profile that can be used with the online resource. */ public synchronized void setApplicationProfile(final String newValue) { checkWritePermission(); applicationProfile = newValue; }
/** * 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); }
public GraphicBuilder externalGraphic(URL onlineResource, String format) { unset = false; ExternalGraphicBuilder builder = externalGraphic(); try { builder.format(format).resource(new OnLineResourceImpl(onlineResource.toURI())); } catch (URISyntaxException e) { throw new RuntimeException("Failed to build URI from URL", e); } return this; }
try { final URI uri = new URI(bundle.getString("DocURL")); final OnLineResourceImpl resource = new OnLineResourceImpl(uri); resource.setFunction(OnLineFunction.INFORMATION); resource.setDescription(description); final CitationImpl citation = new CitationImpl(authority); final Collection<ResponsibleParty> parties = citation.getCitedResponsibleParties();
/** Creates an on line resource initialized to the given URI. */ public OnLineResourceImpl(final URI linkage) { setLinkage(linkage); }
emark = styleFactory.externalMark( new OnLineResourceImpl((URI) node.getChildValue("OnlineResource")), format, markIndex);
/** * 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); }
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 a responsible party metadata entry for OGC involvement. * The organisation name is automatically set to "Open Geospatial Consortium". * * @param role The OGC role (point of contact, owner, etc.) for a resource. * @param function The OGC function (information, download, etc.) for a resource. * @param onlineResource The URI to the resource. * @return Responsible party describing OGC involvement. */ public static ResponsibleParty OGC(final Role role, final OnLineFunction function, final URI onlineResource) { final OnLineResourceImpl resource = new OnLineResourceImpl(onlineResource); resource.setFunction(function); resource.freeze(); return OGC(role, resource); }
public void testFeatureStyleImplCopy() throws Exception { // create FeatureTypeStyleImpl FeatureTypeStyle fts = new FeatureTypeStyleImpl(); assertNull(fts.getTransformation()); assertNull(fts.getOnlineResource()); // Create OnlineResource and transformation OnLineResource impl = new OnLineResourceImpl(); Expression style = filterFactory.literal("square"); // set OnlineResource and transformation fts.setTransformation(style); fts.setOnlineResource(impl); // test if set assertEquals(fts.getTransformation(), filterFactory.literal("square")); assertEquals(fts.getOnlineResource(), new OnLineResourceImpl()); // create copy fts2 from fts FeatureTypeStyleImpl fts2 = new FeatureTypeStyleImpl(fts); // test if values are equal and thus copied assertEquals(fts.getTransformation(), fts2.getTransformation()); assertEquals(fts.getOnlineResource(), fts2.getOnlineResource()); } }
/** * 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); }
/** * Creates an on line resource initialized to the given URI. */ public OnLineResourceImpl(final URI linkage) { setLinkage(linkage); }
/** Set the detailed text description of what the online resource is/does. */ public synchronized void setDescription(final InternationalString newValue) { checkWritePermission(); description = newValue; }
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 a responsible party metadata entry for OGC involvement. * The organisation name is automatically set to "Open Geospatial Consortium". * * @param role The OGC role (point of contact, owner, etc.) for a resource. * @param function The OGC function (information, download, etc.) for a resource. * @param onlineResource The URI to the resource. * @return Responsible party describing OGC involvement. */ public static ResponsibleParty OGC(final Role role, final OnLineFunction function, final URI onlineResource) { final OnLineResourceImpl resource = new OnLineResourceImpl(onlineResource); resource.setFunction(function); resource.freeze(); return OGC(role, resource); }
public void testFeatureTypeStyle() throws Exception { FeatureTypeStyle fts = sf.createFeatureTypeStyle(); fts.setFeatureTypeName("feature-type"); fts.getOptions().put("key", "value"); Rule rule1; rule1 = sf.createRule(); rule1.setName("rule1"); rule1.setFilter(ff.id(Collections.singleton(ff.featureId("FID")))); Rule rule2 = sf.createRule(); rule2.setIsElseFilter(true); rule2.setName("rule2"); fts.addRule(rule1); fts.addRule(rule2); fts.accept(visitor); FeatureTypeStyle clone = (FeatureTypeStyle) visitor.getCopy(); // assertClone(fts, clone); assertEqualsContract(fts, clone); rule1 = sf.createRule(); rule1.setName("rule1"); rule1.setFilter(ff.id(Collections.singleton(ff.featureId("FID")))); FeatureTypeStyle notEq = sf.createFeatureTypeStyle(); notEq.setName("fts-not-equal"); notEq.addRule(rule1); assertEqualsContract(clone, notEq, fts); fts.setTransformation(ff.literal("transformation")); fts.setOnlineResource(new OnLineResourceImpl()); fts.accept(visitor); clone = (FeatureTypeStyle) visitor.getCopy(); assertEqualsContract(fts, clone); }
/** * Set the name of the online resource. * * @since 2.4 */ public synchronized void setName(final String newValue) { checkWritePermission(); name = newValue; }