public void addEmptyStructureToYElement(YElement yelement) { YStructure articleStructure = new YStructure(); // TODO // czy nie trzeba wiecej nic ustawiac? articleStructure.setHierarchy(YConstants.EXT_HIERARCHY_JOURNAL); yelement.addStructure(articleStructure); }
yElement.addContent(viedoContnentUrl); YCurrent currentLevel = new YCurrent().setLevel(VideoConstants.VIDEO_CURRENT_LEVEL); yElement.addStructure(new YStructure().setHierarchy(HierarchyWithLevelIds.EXT_HIERARCHY_PUBLICATION).setCurrent(currentLevel)); NativeDocument nativeDocument = documentFactory.createDocument(recordId.getUid()); Document document = documentFactory.getDocument(nativeDocument, yElement);
private void prepareYElementFromApi(Video video, YElement yElement) throws ParseException { yElement.addName(new YName(video.getSnippet().getTitle())); yElement.addDescription(new YDescription(YLanguage.Undetermined, video.getSnippet().getDescription() , DescriptionTypes.DS_SUMMARY)); prepareDate(video, yElement); String license = video.getStatus().getLicense(); if(null != license && license.contains("creativeCommon")) { yElement.addTagList(new YTagList().setType(YModelUtils.LICENSE).addValue("cc0")); } prepareContent(video, yElement); List<String> tags = video.getSnippet().getTags(); if (CollectionUtils.isNotEmpty(tags)) { yElement.addTagList(new YTagList().setType(TagTypes.TG_KEYWORD).setValues(tags)); } YCurrent currentLevel = new YCurrent().setLevel(VideoConstants.VIDEO_CURRENT_LEVEL); yElement.addStructure(new YStructure() .setHierarchy(HierarchyWithLevelIds.EXT_HIERARCHY_PUBLICATION) .setCurrent(currentLevel)); prepareAttributes(video, yElement); }
structure.setHierarchy(HierarchyWithLevelIds.EXT_HIERARCHY_JOURNAL);
structure.setHierarchy(HierarchyWithLevelIds.EXT_HIERARCHY_JOURNAL); YCurrent current = new YCurrent(); current.setLevel(HierarchyWithLevelIds.EXT_LEVEL_JOURNAL_YEAR);
structure.setHierarchy(HierarchyWithLevelIds.EXT_HIERARCHY_JOURNAL);
structure.setHierarchy(HierarchyWithLevelIds.EXT_HIERARCHY_JOURNAL); YCurrent current = new YCurrent(); current.setLevel(HierarchyWithLevelIds.EXT_LEVEL_JOURNAL_ISSUE);
structure.setHierarchy(HierarchyWithLevelIds.EXT_HIERARCHY_JOURNAL); YCurrent current = new YCurrent(); current.setLevel(HierarchyWithLevelIds.EXT_LEVEL_JOURNAL_ARTICLE);