/** * 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 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); }
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);
/** * 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); }
/** * 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); }
/** * 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); }