if(r.getRole()!=null) metadata.add("CitedResponsiblePartyRole ",r.getRole().toString()); if(r.getIndividualName()!=null) metadata.add("CitedResponsiblePartyName ",r.getIndividualName().toString()); if(r.getOrganisationName()!=null) metadata.add("CitedResponsiblePartyOrganizationName ", r.getOrganisationName().toString()); if(r.getPositionName()!=null) metadata.add("CitedResponsiblePartyPositionName ",r.getPositionName().toString()); if(r.getContactInfo()!=null){ for(String s:r.getContactInfo().getAddress().getElectronicMailAddresses()) { metadata.add("CitedResponsiblePartyEMail ",s.toString());
private void getMetaDataContact(Metadata metadata, DefaultMetadata defaultMetaData){ CheckedArrayList<ResponsibleParty> contactSet= (CheckedArrayList<ResponsibleParty>) defaultMetaData.getContacts(); for(ResponsibleParty rparty:contactSet){ if(rparty.getRole()!=null) metadata.add("ContactRole",rparty.getRole().name()); if(rparty.getOrganisationName()!=null) metadata.add("ContactPartyName-",rparty.getOrganisationName().toString()); } }
/** * Constructs a citation with the specified responsible party. This convenience constructor * initialize the citation title to the first non-null of the following properties: {@linkplain * ResponsibleParty#getOrganisationName organisation name}, {@linkplain * ResponsibleParty#getPositionName position name} or {@linkplain * ResponsibleParty#getIndividualName individual name}. * * @since 2.2 */ public CitationImpl(final ResponsibleParty party) { InternationalString title = party.getOrganisationName(); if (title == null) { title = party.getPositionName(); if (title == null) { String name = party.getIndividualName(); if (name != null) { title = new SimpleInternationalString(name); } } } setTitle(title); getCitedResponsibleParties().add(party); }
/** * 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 (!canShare(responsibility.getOrganisationName(), organisationName) || !canShare(responsibility.getIndividualName(), individualName))
xhtmlContentHandler.startElement("h3"); xhtmlContentHandler.newline(); xhtmlContentHandler.characters("CitedResponsiblePartyRole " + r.getRole().toString()); xhtmlContentHandler.characters("CitedResponsiblePartyName " + r.getIndividualName().toString()); xhtmlContentHandler.endElement("h3"); xhtmlContentHandler.newline();
/** * Constructs a new instance initialized with the values from the specified metadata object. * This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the * given object are not recursively copied. * * @param object The metadata to copy values from, or {@code null} if none. * * @see #castOrCopy(ResponsibleParty) */ public DefaultResponsibleParty(final ResponsibleParty object) { super(object); if (object != null && !(object instanceof DefaultResponsibility)) { setIndividualName(object.getIndividualName()); setOrganisationName(object.getOrganisationName()); } }
/** * Bridge constructor for {@link DefaultResponsibleParty#DefaultResponsibleParty(ResponsibleParty)}. */ DefaultResponsibility(final ResponsibleParty object) { super(object); if (object != null) { this.role = object.getRole(); if (object instanceof DefaultResponsibility) { final DefaultResponsibility c = (DefaultResponsibility) object; this.extents = copyCollection(c.getExtents(), Extent.class); this.parties = copyCollection(c.getParties(), AbstractParty.class); } } }
/** * 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 resource The URI to the resource, or {@code null} if none. * @return Responsible party describing OGC involvement. * * @since 2.2 * * @deprecated To be replaced by a database (constants are becoming too numerous) */ @Deprecated public static ResponsibleParty OGC(final Role role, final OnlineResource resource) { final DefaultResponsibleParty ogc = new DefaultResponsibleParty(role); ogc.setOrganisationName(OGC.getOrganisationName()); if (resource != null) { final DefaultContact contact = new DefaultContact(resource); contact.freeze(); ogc.setContactInfo(contact); } ogc.freeze(); return ogc; }
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; }
/** * Constructs a citation with the specified responsible party. This convenience constructor * initialize the citation title to the first non-null of the following properties: * {@linkplain ResponsibleParty#getOrganisationName organisation name}, * {@linkplain ResponsibleParty#getPositionName position name} or * {@linkplain ResponsibleParty#getIndividualName individual name}. * * @since 2.2 */ public CitationImpl(final ResponsibleParty party) { InternationalString title = party.getOrganisationName(); if (title == null) { title = party.getPositionName(); if (title == null) { String name = party.getIndividualName(); if (name != null) { title = new SimpleInternationalString(name); } } } setTitle(title); getCitedResponsibleParties().add(party); }
assertEquals(Role.PRINCIPAL_INVESTIGATOR, responsible.getRole()); assertEquals("International Association of Oil & Gas Producers", responsible.getOrganisationName().toString()); OnlineResource resource = responsible.getContactInfo().getOnlineResource(); assertEquals("http://www.epsg.org", resource.getLinkage().toString()); assertEquals(OnLineFunction.INFORMATION, resource.getFunction());
if(d!=null && d.getDistributorContact()!=null && d.getDistributorContact().getRole()!=null) metadata.add("Distributor Contact ",d.getDistributorContact().getRole().name()); if(d!=null && d.getDistributorContact()!=null && d.getDistributorContact().getOrganisationName()!=null) metadata.add("Distributor Organization Name ",d.getDistributorContact().getOrganisationName().toString());
if (responsibility != null) { contact = responsibility.getContactInfo(); if (contact != null) { address = contact.getAddress(); if (!canShare(responsibility.getOrganisationName(), organisationName) || !canShare(responsibility.getIndividualName(), individualName))
/** * Returns the given ISO 19115 metadata as a {@code Person} instance. * This method copies the data only if needed. * * @param r the ISO 19115 metadata, or {@code null}. * @param locale the locale to use for localized strings. * @return the GPX metadata, or {@code null}. */ public static Person castOrCopy(final ResponsibleParty r, final Locale locale) { if (r == null || r instanceof Person) { return (Person) r; } final Role role = r.getRole(); final boolean isCreator = Role.ORIGINATOR.equals(role); if (isCreator || Role.AUTHOR.equals(role)) { final String name = r.getIndividualName(); if (name != null) { final Person pr = new Person(); pr.name = name; pr.isCreator = isCreator; return pr; } } return null; }
/** * Constructs a new instance initialized with the values from the specified metadata object. * This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the * given object are not recursively copied. * * @param object The metadata to copy values from, or {@code null} if none. * * @see #castOrCopy(ResponsibleParty) */ public DefaultResponsibleParty(final ResponsibleParty object) { super(object); if (object != null && !(object instanceof DefaultResponsibility)) { setIndividualName(object.getIndividualName()); setOrganisationName(object.getOrganisationName()); } }
/** * Bridge constructor for {@link DefaultResponsibleParty#DefaultResponsibleParty(ResponsibleParty)}. */ DefaultResponsibility(final ResponsibleParty object) { super(object); if (object != null) { this.role = object.getRole(); if (object instanceof DefaultResponsibility) { final DefaultResponsibility c = (DefaultResponsibility) object; this.extents = copyCollection(c.getExtents(), Extent.class); this.parties = copyCollection(c.getParties(), AbstractParty.class); } } }
/** * Returns the responsible party for the given constant. */ private static String getCitedResponsibleParty(final Citation citation) { return getSingleton(citation.getCitedResponsibleParties()).getOrganisationName().toString(Locale.US); }
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; }
} else if (metadata != null) { final DefaultIndividual individual; final String name = metadata.getIndividualName(); Contact contact = metadata.getContactInfo(); AbstractParty party; if (name != null) { individual = new DefaultIndividual(name, metadata.getPositionName(), contact); party = individual; contact = null; party = null; final InternationalString organisation = metadata.getOrganisationName(); if (organisation != null) { party = new DefaultOrganisation(organisation, null, individual, contact); return new DefaultResponsibility(metadata.getRole(), null, party);