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()); } }
/** * Returns the role that matches the given string, or returns a new one if none match it. * * @param code The name of the code to fetch or to create. * @return A code matching the given name. */ public static Role valueOf(String code) { return valueOf(Role.class, code); } }
/** Returns the list of enumerations of the same kind than this enum. */ public Role[] family() { return values(); }
/** * Returns the Role that matches the given string, or returns a * new one if none match it. */ public static Role valueOf(String code) { if (code == null) { return null; } synchronized (VALUES) { Iterator iter = VALUES.iterator(); while (iter.hasNext()) { Role type = (Role) iter.next(); if (code.equalsIgnoreCase(type.name())) { return type; } } return new Role(code); } } }
xhtmlContentHandler.startElement("h3"); xhtmlContentHandler.newline(); xhtmlContentHandler.characters("CitedResponsiblePartyRole " + r.getRole().toString()); xhtmlContentHandler.characters("CitedResponsiblePartyName " + r.getIndividualName().toString()); xhtmlContentHandler.endElement("h3");
/** * 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; }
for(ResponsibleParty r:responsiblePartyArrayList){ if(r.getRole()!=null) metadata.add("CitedResponsiblePartyRole ",r.getRole().toString()); if(r.getIndividualName()!=null) metadata.add("CitedResponsiblePartyName ",r.getIndividualName().toString());
/** * Adds role, name, contact and position information for an individual or organization that is responsible * for the resource. This method can be used as an alternative to {@link #addAuthor(CharSequence)} when the * caller needs to create the responsibly party itself. * * <p>If the given {@code role} is non-null, then this method will ensure that the added party has the given * role. A copy of the given party will be created if needed (the given party will never be modified).</p> * * Storage locations are: * * <ul> * <li>{@code metadata/identificationInfo/citation/citedResponsibleParty}</li> * <li>{@code metadata/identificationInfo/citation/citedResponsibleParty/role}</li> * </ul> * * @param party the individual or organization that is responsible, or {@code null} for no-operation. * @param role the role to set, or {@code null} for leaving it unchanged. */ public final void addCitedResponsibleParty(ResponsibleParty party, final Role role) { if (party != null) { if (role != null && !role.equals(party.getRole())) { party = new DefaultResponsibleParty(party); ((DefaultResponsibility) party).setRole(role); } addIfNotPresent(citation().getCitedResponsibleParties(), party); } }
authorities.add(new SimpleGrantedAuthority("ROLE_" + role.name()));
/** * Returns the role that matches the given string, or returns a * new one if none match it. More specifically, this methods returns the first instance for * which <code>{@linkplain #name() name()}.{@linkplain String#equals equals}(code)</code> * returns {@code true}. If no existing instance is found, then a new one is created for * the given name. * * @param code the name of the code to fetch or to create. * @return a code matching the given name. */ public static Role valueOf(String code) { return valueOf(Role.class, code); } }
/** * Returns the list of enumerations of the same kind than this enum. */ public /*{Role}*/ CodeList[] family() { return values(); }
xhtmlContentHandler.startElement("h3"); xhtmlContentHandler.newline(); xhtmlContentHandler.characters("CitedResponsiblePartyRole " + r.getRole().toString()); xhtmlContentHandler.characters("CitedResponsiblePartyName " + r.getIndividualName().toString()); xhtmlContentHandler.endElement("h3");
/** * Adds role, name, contact and position information for an individual or organization that is responsible * for the resource. This method can be used as an alternative to {@link #addAuthor(CharSequence)} when the * caller needs to create the responsibly party itself. * * <p>If the given {@code role} is non-null, then this method will ensure that the added party has the given * role. A copy of the given party will be created if needed (the given party will never be modified).</p> * * Storage locations are: * * <ul> * <li>{@code metadata/identificationInfo/citation/citedResponsibleParty}</li> * <li>{@code metadata/identificationInfo/citation/citedResponsibleParty/role}</li> * </ul> * * @param party the individual or organization that is responsible, or {@code null} for no-operation. * @param role the role to set, or {@code null} for leaving it unchanged. */ public final void addCitedResponsibleParty(ResponsibleParty party, final Role role) { if (party != null) { if (role != null && !role.equals(party.getRole())) { party = new DefaultResponsibleParty(party); ((DefaultResponsibility) party).setRole(role); } addIfNotPresent(citation().getCitedResponsibleParties(), party); } }
for(Distributor d:distributorList){ 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());
/** * Returns the role that matches the given string, or returns a * new one if none match it. More specifically, this methods returns the first instance for * which <code>{@linkplain #name() name()}.{@linkplain String#equals equals}(code)</code> * returns {@code true}. If no existing instance is found, then a new one is created for * the given name. * * @param code the name of the code to fetch or to create. * @return a code matching the given name. */ public static Role valueOf(String code) { return valueOf(Role.class, code); } }
/** * Returns the list of codes of the same kind than this code list element. * Invoking this method is equivalent to invoking {@link #values()}, except that * this method can be invoked on an instance of the parent {@code CodeList} class. * * @return all code {@linkplain #values() values} for this code list. */ @Override public Role[] family() { return values(); }
xhtmlContentHandler.startElement("h3"); xhtmlContentHandler.newline(); xhtmlContentHandler.characters("CitedResponsiblePartyRole " + r.getRole().toString()); xhtmlContentHandler.characters("CitedResponsiblePartyName " + r.getIndividualName().toString()); xhtmlContentHandler.endElement("h3");
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()); } }
/** * Creates a citation with an arbitrary title, presentation form and other properties. * * @return an arbitrary citation. * * @since 0.7 */ public static DefaultCitation create() { final DefaultCitation citation = new DefaultCitation(); final DefaultInternationalString title = new DefaultInternationalString(); title.add(Locale.JAPANESE, "アンダーカレント"); title.add(Locale.ENGLISH, "Undercurrent"); citation.setTitle(title); citation.setISBN("9782505004509"); citation.setPresentationForms(Arrays.asList( PresentationForm.DOCUMENT_HARDCOPY, PresentationForm.DOCUMENT_DIGITAL)); citation.setAlternateTitles(Collections.singleton( new SimpleInternationalString("Andākarento"))); // Actually a different script of the Japanese title. final DefaultResponsibleParty author = new DefaultResponsibleParty(Role.AUTHOR); author.setParties(Collections.singleton(new DefaultIndividual("Testsuya Toyoda", null, null))); final DefaultResponsibleParty editor = new DefaultResponsibleParty(Role.valueOf("EDITOR")); editor.setParties(Collections.singleton(new DefaultOrganisation("Kōdansha", null, null, null))); editor.setExtents(Collections.singleton(Extents.WORLD)); citation.setCitedResponsibleParties(Arrays.asList(author, editor)); return citation; }
/** * Returns the list of codes of the same kind than this code list element. * Invoking this method is equivalent to invoking {@link #values()}, except that * this method can be invoked on an instance of the parent {@code CodeList} class. * * @return all code {@linkplain #values() values} for this code list. */ @Override public Role[] family() { return values(); }