new PropertyProjectdoc(metaData.getParent()); projectdoc.setName(metaData.getName()); projectdoc.setShortDescription(metaData.getShortDescription()); projectdoc.setSortKey(metaData.getSortKey()); projectdoc.setSpace(metaData.getSpace()); projectdoc.setSummary(metaData.getSummary()); projectdoc.setTitle(metaData.getTitle()); projectdoc.addAudience(item); projectdoc.addAudience(item); projectdoc.addCategory(item); projectdoc.addNote(item); projectdoc.addParent(item); projectdoc.addTag(item);
/** * Returns the space the report item belongs to. * * @return the space the report item belongs to. */ public String getSpace() { final String metadataValue = descriptor.getDocumentMetaData().getSpace(); if (StringUtils.isBlank(metadataValue)) { return "property:" + sourceInfo.getElementTypeName(); } return metadataValue; }
@Override public PropertyProjectdoc parse(final PropertyDescriptor descriptor, final Locale locale) { try { final PropertyProjectdoc projectdoc = new PropertyProjectdoc(); parseBase(descriptor, locale, projectdoc); return projectdoc; } catch (final MetaDataException e) { LOG.warn("Cannot parse property set document for property '{}': {}", descriptor, e); return null; } }
/** * Returns the unique title of the report within the space. * * @return the unique title of the report within the space. */ public String getTitle() { final String metadataValue = descriptor.getDocumentMetaData().getTitle(); if (StringUtils.isBlank(metadataValue)) { return descriptor.getKey().toString(); } return metadataValue; }
/** * Returns the name that uniquely identifies the property report within the * report set. * * @return the name that uniquely identifies the property report within the * report set. */ public String getLocalName() { final String metadataValue = descriptor.getDocumentMetaData().getName(); if (StringUtils.isBlank(metadataValue)) { return descriptor.getDocumentName().getName(); } return metadataValue; }
private void addPropertyValueComment(final PropertyProjectdoc projectdoc, final ParserContext context) { final PropertyComment.Builder builder = new PropertyComment.Builder(); final Document document = context.getDocument(); final Element rootNode = document.getRootElement(); final String specification = rootNode.getChildTextNormalize("specification", NS); final PropertyValueComment valueComment = parseValueComment(rootNode); builder.withText(specification).with(valueComment); final PropertyComment propertyComment = builder.build(); projectdoc.setComment(propertyComment); }