private static CONTRIBUTOR_TYPE detectContributorType(final YContributor cont) { CONTRIBUTOR_TYPE type = CONTRIBUTOR_TYPE.UNKNOWN; if (cont.isPerson()) { type = CONTRIBUTOR_TYPE.PERSON; } else if (cont.isInstitution()) { type = CONTRIBUTOR_TYPE.INSTITUTION; } return type; }
private CONTRIBUTOR_TYPE detectContributorType(final YContributor cont) { CONTRIBUTOR_TYPE type = CONTRIBUTOR_TYPE.UNKNOWN; if (cont.isPerson()) { type = CONTRIBUTOR_TYPE.PERSON; } else if (cont.isInstitution()) { type = CONTRIBUTOR_TYPE.INSTITUTION; } return type; }
private List<YContributor> authors(YElement element) { List<YContributor> result = Lists.newArrayList(); for (YContributor contributor : element.getContributors()) { if (contributor.isInstitution()) { continue; } // TODO - brać tylko autorów i współautorów??? result.add(contributor); } return result; }
private static void proceedInstitutions(YContributor yc, LinkedList<PredicateAndObject> pao) { if(yc.isInstitution()){ if (yc.getIdentity()!=null & ! yc.getIdentity().isEmpty()) pao.add(new PredicateAndObject(RelConstants.RL_IS_INSTITUTION,RelConstants.NS_INSTITUTION+yc.getIdentity())); } }
protected List<String> resolveAddresses(final YContributor contributor, final IFilteringContext filteringContext) { final List<String> addresses = new LinkedList<String>(); if (contributor.isInstitution()) { final YAttribute institution = contributor.getOneAttribute(YConstants.AT_INSTITUTION); if (institution != null) { for (final YAttribute address : institution.getAttributes(YConstants.AT_INSTITUTION_ADDRESS)) { addresses.add(detailsFilter.filter(address.getValue(), InputType.RICH_TEXT, filteringContext)); } } } return addresses; }
public EditorialOfficeInfo getEditorialOfficeInfo(AbstractElementInfo<?> abstractElementInfo) { List<YContributor> contributors = abstractElementInfo.getContributors(); if (contributors != null) { for (YContributor contributor : contributors) { if (contributor.isInstitution() && ContributorConstants.ROLE_EDITORIAL_OFFICE.equals(contributor.getRole())) { YAttribute institution = contributor.getOneAttribute(YConstants.AT_INSTITUTION); if (institution != null) { String email = elementAttributesExtractor.getInstitutionEmail(institution); String www = elementAttributesExtractor.getInstitutionWWW(institution); return new EditorialOfficeInfo(email, www); } } } } return null; }
if(yc.isInstitution()){ if (yc.getIdentity()!=null & ! yc.getIdentity().isEmpty()) pao.add(new PredicateAndObject(RelConstants.RL_IS_INSTITUTION,RelConstants.NS_INSTITUTION+yc.getIdentity()));
protected void fetchPersonality(final YContributor contributor, final ViewContributor viewContributor, final IFilteringContext filteringContext) { if (!contributor.isInstitution() || contributor.getIdentity() == null || contributor.getIdentity().isEmpty()) { return; } try { final YInstitution inst = dataSourcesFactory.getYCatalogDataSource() .getInstitutionById(contributor.getIdentity()); if (inst != null) { final String addr = inst.getOneAttributeSimpleValue(YConstants.AT_CONTACT_LOCATION); viewContributor.setPublisherId(contributor.getIdentity()); viewContributor.getAddresses().add(detailsFilter.filter(addr, InputType.RICH_TEXT, filteringContext)); viewContributor.getContacts() .addAll(CommonBuilderUtils.resolveContacts(inst, filteringContext, detailsFilter)); } } catch (final Exception e) { throw new SystemException(Modules.DETAILS, "Error fetching intitution: " + contributor.getIdentity(), e); } }
if (contributor.isInstitution()) { continue;
if(yc.isInstitution()){ if (yc.getIdentity()!=null & ! yc.getIdentity().isEmpty()) pao.add(new PredicateAndObject(RelConstants.RL_IS_INSTITUTION,RelConstants.NS_INSTITUTION+yc.getIdentity()));