@Override protected void chainDecorators(XmlMetadata meta) { LOG.debug("chainDecorators: " + meta); // this is only called when the XPathGate is true. Classification result = new Classification(); result.setDescription(matchDescription); result.setEffort(effort); result.setPattern(this.xpathExpression); meta.getDecorations().add(result); super.chainDecorators(meta); } }
@Override protected List<AbstractDecoration> matchResults(FileMetadata meta) { // only process classification. List<AbstractDecoration> matched = super.matchResults(meta); List<AbstractDecoration> results = new ArrayList<AbstractDecoration>(1); if (matched != null && matched.size() > 0) { // create classification, with the same pattern. Classification cr = new Classification(); cr.setDescription(matchDescription); cr.setEffort(effort); cr.setPattern(matched.get(0).getPattern()); meta.getDecorations().add(cr); results.add(cr); } return results; } }
public void processMeta(FileMetadata file) { Classification gr = new Classification(); gr.setDescription(description); if (effort != null) { StoryPointEffort hours = new StoryPointEffort(); hours.setHours(effort); gr.setEffort(hours); } file.getDecorations().add(gr); } }
@Override public ManifestMetadata archiveEntryToMeta(ZipEntryMetadata archiveEntry) { File file = archiveEntry.getFilePointer(); LOG.debug("Processing Manifest: " + file.getAbsolutePath().toString()); if (file.length() > 1048576L * 1) { LOG.warn("Manifest larger than 1 MB: " + file.getAbsolutePath() + "; Skipping processing."); return null; } ManifestMetadata meta = new ManifestMetadata(); meta.setArchiveMeta(archiveEntry.getArchiveMeta()); meta.setFilePointer(file); Classification classification = new Classification(); StoryPointEffort he = new StoryPointEffort(); he.setHours(0); classification.setEffort(he); classification.setDescription("ArchiveMetadata Manifest"); meta.getDecorations().add(classification); return meta; }
@Override public ManifestMetadata fileEntryToMeta(FileMetadata entry) { File file = entry.getFilePointer(); LOG.debug("Processing Manifest: " + file.getAbsolutePath().toString()); if (file.length() > 1048576L * 1) { LOG.warn("Manifest larger than 1 MB: " + file.getAbsolutePath() + "; Skipping processing."); return null; } ManifestMetadata meta = new ManifestMetadata(); //meta.setArchiveMeta(archiveEntry.getArchiveMeta()); meta.setFilePointer(file); meta.setArchiveMeta(entry.getArchiveMeta()); Classification classification = new Classification(); StoryPointEffort he = new StoryPointEffort(); he.setHours(0); classification.setEffort(he); classification.setDescription("ArchiveMetadata Manifest"); meta.getDecorations().add(classification); return meta; } }
@Override public void processMeta(XmlMetadata file) { Doctype docType = (Doctype) file.getParsedDocument().getUserData(LocationAwareContentHandler.DOCTYPE_KEY_NAME); if (docType != null && matchesAny(docType)) { Classification cr = new Classification(); cr.setDescription(matchDescription); cr.setEffort(effort); file.getDecorations().add(cr); // if it is of a certain type, recurse to the child processors chainDecorators(file); } }