@Override public void beginSpecificationItem() { this.itemBuilder = SpecificationItem.builder(); }
/** * Get the description of the specification item. * * @return the description */ public String getDescription() { return this.item.getDescription(); }
/** * Get the source location of the item. * * @return the location */ public Location getLocation() { return this.item.getLocation(); }
private void writeItem(final SpecificationItem item) throws XMLStreamException { final String description = processMultilineText(item.getDescription()); final String rationale = processMultilineText(item.getRationale()); final String comment = processMultilineText(item.getComment()); this.writer.writeStartElement("specobject"); writeElement("id", item.getName()); writeElementIfPresent("shortdesc", item.getTitle()); writeElement("status", item.getStatus().toString()); writeElement("version", item.getRevision()); writeLocation(item.getLocation()); writeElementIfPresent("description", description); writeElementIfPresent("rationale", rationale); writeElementIfPresent("comment", comment); writeTags(item.getTags()); writeNeedsArtifactTypes(item.getNeedsArtifactTypes()); writeCoveredIds(item.getCoveredIds()); writeDependsOnIds(item.getDependOnIds()); this.writer.writeEndElement(); }
/** * Get the artifact types in which this item needs to be covered. * * @return list of artifact types. */ public List<String> getNeedsArtifactTypes() { return this.getItem().getNeedsArtifactTypes(); }
private void renderComment(final String indentation) { final String comment = this.item.getItem().getComment(); if (comment != null && !comment.isEmpty()) { this.stream.print(indentation); this.stream.println(" <h6>Comment:</h6>"); renderMultilineText(indentation, comment); } }
/** * Get the revision of the specification item * * @return revision */ public int getRevision() { return this.item.getRevision(); } }
private void renderRationale(final String indentation) { final String rationale = this.item.getItem().getRationale(); if (rationale != null && !rationale.isEmpty()) { this.stream.print(indentation); this.stream.println(" <h6>Rationale:</h6>"); renderMultilineText(indentation, rationale); } }
/** * Get the maturity status of the specification item. * * @return maturity status of the specification item */ public ItemStatus getStatus() { return this.item.getStatus(); }
/** * Get the ID of the items this {@link LinkedSpecificationItem} covers. * * @return the list of IDs */ public List<SpecificationItemId> getCoveredIds() { return this.getItem().getCoveredIds(); }
/** * Get the name part of the linked specification item ID * * <p> * Not to be mixed up with the * {@link org.itsallcode.openfasttrace.core.LinkedSpecificationItem#getTitle()} * of the linked specification item * </p> * * @return name part of the specification item ID */ public String getName() { return this.item.getName(); }
private void writeItem(final SpecificationItem item) throws XMLStreamException { final String description = processMultilineText(item.getDescription()); final String rationale = processMultilineText(item.getRationale()); final String comment = processMultilineText(item.getComment()); this.writer.writeStartElement("specobject"); writeElement("id", item.getName()); writeElementIfPresent("shortdesc", item.getTitle()); writeElement("status", item.getStatus().toString()); writeElement("version", item.getRevision()); writeLocation(item.getLocation()); writeElementIfPresent("description", description); writeElementIfPresent("rationale", rationale); writeElementIfPresent("comment", comment); writeTags(item.getTags()); writeNeedsArtifactTypes(item.getNeedsArtifactTypes()); writeCoveredIds(item.getCoveredIds()); writeDependsOnIds(item.getDependOnIds()); this.writer.writeEndElement(); }
/** * Get the artifact types in which this item needs to be covered. * * @return list of artifact types. */ public List<String> getNeedsArtifactTypes() { return this.getItem().getNeedsArtifactTypes(); }
private void renderComment(final String indentation) { final String comment = this.item.getItem().getComment(); if (comment != null && !comment.isEmpty()) { this.stream.print(indentation); this.stream.println(" <h6>Comment:</h6>"); renderMultilineText(indentation, comment); } }
/** * Get the revision of the specification item * * @return revision */ public int getRevision() { return this.item.getRevision(); } }
private void renderRationale(final String indentation) { final String rationale = this.item.getItem().getRationale(); if (rationale != null && !rationale.isEmpty()) { this.stream.print(indentation); this.stream.println(" <h6>Rationale:</h6>"); renderMultilineText(indentation, rationale); } }
/** * Get the maturity status of the specification item. * * @return maturity status of the specification item */ public ItemStatus getStatus() { return this.item.getStatus(); }
/** * Get the ID of the items this {@link LinkedSpecificationItem} covers. * * @return the list of IDs */ public List<SpecificationItemId> getCoveredIds() { return this.getItem().getCoveredIds(); }
/** * Get the name part of the linked specification item ID * * <p> * Not to be mixed up with the * {@link org.itsallcode.openfasttrace.core.LinkedSpecificationItem#getTitle()} * of the linked specification item * </p> * * @return name part of the specification item ID */ public String getName() { return this.item.getName(); }
private void linkMatchingRevision(final LinkedSpecificationItem covering, final LinkedSpecificationItem covered) { final String coveringArtifactType = covering.getArtifactType(); if (covered.getItem().getNeedsArtifactTypes().contains(coveringArtifactType)) { if (covered.hasDuplicates()) { covering.addLinkToItemWithStatus(covered, LinkStatus.AMBIGUOUS); } else { covering.addLinkToItemWithStatus(covered, LinkStatus.COVERS); covered.addLinkToItemWithStatus(covering, LinkStatus.COVERED_SHALLOW); covered.addCoveredArtifactType(coveringArtifactType); } } else { covering.addLinkToItemWithStatus(covered, LinkStatus.UNWANTED); covered.addLinkToItemWithStatus(covering, LinkStatus.COVERED_UNWANTED); covered.addOverCoveredArtifactType(coveringArtifactType); } }