public URI getPublisher() { try { return capabilities .getService() .getContactInformation() .getContactInfo() .getOnLineResource() .getLinkage(); } catch (NullPointerException publisherNotAvailable) { } try { return new URI(serverURL.getProtocol() + ":" + serverURL.getHost()); } catch (URISyntaxException e) { } return null; }
public URI getPublisher() { try { return capabilities .getService() .getContactInformation() .getContactInfo() .getOnLineResource() .getLinkage(); } catch (NullPointerException publisherNotAvailable) { } try { return new URI(serverURL.getProtocol() + ":" + serverURL.getHost()); } catch (URISyntaxException e) { } return null; }
metadata.add("CitedResponsiblePartyPositionName ",r.getPositionName().toString()); if(r.getContactInfo()!=null){ for(String s:r.getContactInfo().getAddress().getElectronicMailAddresses()) { metadata.add("CitedResponsiblePartyEMail ",s.toString());
final DefaultIndividual individual; final String name = metadata.getIndividualName(); Contact contact = metadata.getContactInfo(); AbstractParty party; if (name != null) {
/** * Tests {@link Store#getMetadata()}. * * @throws DataStoreException if en error occurred while reading the XML. */ @Test public void testMetadata() throws DataStoreException { final Metadata metadata; try (Store store = new Store(null, new StorageConnector(new StringReader(XML)))) { metadata = store.getMetadata(); assertSame("Expected cached value.", metadata, store.getMetadata()); } final ResponsibleParty resp = getSingleton(metadata.getContacts()); final Contact contact = resp.getContactInfo(); final OnlineResource resource = contact.getOnlineResource(); assertEquals(Locale.ENGLISH, metadata.getLanguage()); if (!REGRESSION) assertEquals(CharacterSet.UTF_8, metadata.getCharacterSet()); assertEquals(Role.PRINCIPAL_INVESTIGATOR, resp.getRole()); assertEquals("Apache SIS", String.valueOf(resp.getOrganisationName())); assertEquals("http://sis.apache.org", String.valueOf(resource.getLinkage())); assertEquals(OnLineFunction.INFORMATION, resource.getFunction()); } }
if (responsibility != null) { contact = responsibility.getContactInfo(); if (contact != null) { address = contact.getAddress();
if (responsibility != null) { contact = responsibility.getContactInfo(); if (contact != null) { address = contact.getAddress();
metadata.add("CitedResponsiblePartyPositionName ",r.getPositionName().toString()); if(r.getContactInfo()!=null){ for(String s:r.getContactInfo().getAddress().getElectronicMailAddresses()) { metadata.add("CitedResponsiblePartyEMail ",s.toString());
metadata.add("CitedResponsiblePartyPositionName ",r.getPositionName().toString()); if(r.getContactInfo()!=null){ for(String s:r.getContactInfo().getAddress().getElectronicMailAddresses()) { metadata.add("CitedResponsiblePartyEMail ",s.toString());
OnlineResource resource = responsible.getContactInfo().getOnlineResource(); assertEquals("http://www.epsg.org", resource.getLinkage().toString()); assertEquals(OnLineFunction.INFORMATION, resource.getFunction());
final OnlineResource onlineResource = contact.getContactInfo().getOnlineResource(); assertNotNull("onlineResource", onlineResource); assertEquals("organisationName", "Apache SIS", contact.getOrganisationName().toString());