/** * Creates Language with specified single parameters * * @param id * identification * @param name * Displayed name */ public LanguageData(YLanguage yLanguage) { super(yLanguage.getBibliographicCode(), yLanguage.getName()); this.yLanguage = yLanguage; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; LanguageData other = (LanguageData) obj; if (!yLanguage.getBibliographicCode().equals(other.yLanguage.getBibliographicCode()) || !yLanguage.getName().equals(other.yLanguage.getName())) return false; return true; }
/** * accomplished */ private void proceedLanguage() { for(YLanguage yl : in_item.getLanguages()){ paos_doc.add(new PredicateAndObject(RelConstants.RL_LANGUAGE, yl.getName().toLowerCase())); } }
/** * accomplished */ private void proceedLanguage() { for(YLanguage yl : in_item.getLanguages()){ paos_doc.add(new PredicateAndObject(RelConstants.RL_LANGUAGE, yl.getName().toLowerCase())); } }
protected void fillLanguages(YElement yElement, List<YExportable> referedElements, Map<String, List<StringWithAttributes>> ret) { // language element if (!yElement.getLanguages().isEmpty()) { ret.put(E_LANGUAGE, new ArrayList<StringWithAttributes>()); } for (YLanguage yLanguage : yElement.getLanguages()) { ret.get(E_LANGUAGE).add(new StringWithAttributes(yLanguage.getName())); } }
public String extractLanguageCode(YLanguage yLanguage){ String code = yLanguage.getShortCode(); if(code.isEmpty()) code = yLanguage.getTerminologyCode(); if(code.isEmpty()) code = yLanguage.getBibliographicCode(); if(code.isEmpty()) code = yLanguage.getName(); return code; }
protected void fillTitle(HtmlMetaHeaders metadata, YElement yElement) { String title = YModelUtils.getDefaultName(yElement); if (StringUtils.isNotEmpty(title)) { metadata.addMetadataName(WP_TITLE, title); } YLanguage language = YModelUtils.getDefaultLanguage(yElement); if (language != null && language.getName() != null) { metadata.addMetadataName(WP_LANGUAGE, language.getName()); } }
/** * accomplished */ private void parseDescriptions() { if(!in_item.getDescriptions().isEmpty()){ int descriptionid = 0; for(YDescription yd : in_item.getDescriptions()){ descriptionid++; Statements s_desc = new Statements();statements.add(s_desc); s_desc.setSubject(RelConstants.NS_DESCRIPTION+in_item.getId()+"#"+descriptionid); LinkedList<PredicateAndObject> paos_description = new LinkedList<PredicateAndObject>(); paos_description.add(new PredicateAndObject(RelConstants.RL_LANGUAGE, yd.getLanguage().getName())); paos_description.add(new PredicateAndObject(RelConstants.RL_TYPE, yd.getType())); paos_description.add(new PredicateAndObject(RelConstants.RL_TEXT, yd.getText())); paos_doc.add(new PredicateAndObject(RelConstants.RL_HAS_DESCRIPTION , RelConstants.NS_DESCRIPTION+in_item.getId()+"#"+descriptionid)); } } }
/** * accomplished */ private void parseDescriptions() { if(!in_item.getDescriptions().isEmpty()){ int descriptionid = 0; for(YDescription yd : in_item.getDescriptions()){ descriptionid++; Statements s_desc = new Statements();statements.add(s_desc); s_desc.setSubject(RelConstants.NS_DESCRIPTION+in_item.getId()+"/"+descriptionid); LinkedList<PredicateAndObject> paos_description = new LinkedList<PredicateAndObject>(); paos_description.add(new PredicateAndObject(RelConstants.RL_LANGUAGE, yd.getLanguage().getName())); paos_description.add(new PredicateAndObject(RelConstants.RL_TYPE, yd.getType())); paos_description.add(new PredicateAndObject(RelConstants.RL_TEXT, yd.getText())); paos_doc.add(new PredicateAndObject(RelConstants.RL_HAS_DESCRIPTION , RelConstants.NS_DESCRIPTION+in_item.getId()+"/"+descriptionid)); } } }
paos_doc.add(new PredicateAndObject(RelConstants.RL_LANGUAGE, yl.getName().toLowerCase()));
public static void updateYRelationWithZblNames(YRelation relye, YElement zblye) { for (YName n : zblye.getNames()) { YAttribute ya = new YAttribute(YConstants.AT_ENHANCED_FROM_ZBL_NAME, ""); ya.addAttribute(new YAttribute(YConstants.AT_ENHANCED_FROM_ZBL_LANGUAGE, n.getLanguage().getName())); ya.addAttribute(new YAttribute(YConstants.AT_ENHANCED_FROM_ZBL_TYPE, n.getType())); ya.addAttribute(new YAttribute(YConstants.AT_ENHANCED_FROM_ZBL_VALUE, n.getText())); relye.addAttribute(ya); } }
public static void updateYRelationWithZblTags(YRelation relye, YElement zblye) { for (YTagList tl : zblye.getTagLists()) { YAttribute ya = new YAttribute(YConstants.AT_ENHANCED_FROM_ZBL_TAG, ""); ya.addAttribute(new YAttribute(YConstants.AT_ENHANCED_FROM_ZBL_TYPE, tl.getType())); ya.addAttribute(new YAttribute(YConstants.AT_ENHANCED_FROM_ZBL_LANGUAGE, tl.getLanguage().getName())); for (String t : tl.getValues()) { ya.addAttribute(new YAttribute(YConstants.AT_ENHANCED_FROM_ZBL_VALUE, t)); } relye.addAttribute(ya); } }
ya.addAttribute(new YAttribute(YConstants.AT_ENHANCED_FROM_ZBL_LANGUAGE,n.getLanguage().getName())); ya.addAttribute(new YAttribute(YConstants.AT_ENHANCED_FROM_ZBL_TYPE,n.getType())); ya.addAttribute(new YAttribute(YConstants.AT_ENHANCED_FROM_ZBL_VALUE,n.getText())); ya = new YAttribute(YConstants.AT_ENHANCED_FROM_ZBL_TAG, ""); ya.addAttribute(new YAttribute(YConstants.AT_ENHANCED_FROM_ZBL_TYPE, tl.getType())); ya.addAttribute(new YAttribute(YConstants.AT_ENHANCED_FROM_ZBL_LANGUAGE, tl.getLanguage().getName()));
ya.addAttribute(new YAttribute(YConstants.AT_ENHANCED_FROM_ZBL_LANGUAGE,n.getLanguage().getName())); ya.addAttribute(new YAttribute(YConstants.AT_ENHANCED_FROM_ZBL_TYPE,n.getType())); ya.addAttribute(new YAttribute(YConstants.AT_ENHANCED_FROM_ZBL_VALUE,n.getText())); ya = new YAttribute(YConstants.AT_ENHANCED_FROM_ZBL_TAG, ""); ya.addAttribute(new YAttribute(YConstants.AT_ENHANCED_FROM_ZBL_TYPE, tl.getType())); ya.addAttribute(new YAttribute(YConstants.AT_ENHANCED_FROM_ZBL_LANGUAGE, tl.getLanguage().getName()));