http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/376a9c6a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/UnpackContent.java
----------------------------------------------------------------------
diff --git 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/UnpackContent.java
 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/UnpackContent.java
index b30e780..637b0c1 100644
--- 
a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/UnpackContent.java
+++ 
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/UnpackContent.java
@@ -30,42 +30,53 @@ import java.util.Map;
 import java.util.Set;
 import java.util.UUID;
 
+import org.apache.commons.compress.archivers.ArchiveEntry;
+import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
+import org.apache.commons.compress.archivers.tar.TarArchiveInputStream;
+import org.apache.commons.compress.archivers.zip.ZipArchiveInputStream;
+import org.apache.nifi.annotation.behavior.EventDriven;
+import org.apache.nifi.annotation.behavior.SideEffectFree;
+import org.apache.nifi.annotation.behavior.SupportsBatching;
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.ReadsAttribute;
+import org.apache.nifi.annotation.documentation.SeeAlso;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.annotation.documentation.WritesAttribute;
+import org.apache.nifi.annotation.documentation.WritesAttributes;
 import org.apache.nifi.components.PropertyDescriptor;
 import org.apache.nifi.flowfile.FlowFile;
 import org.apache.nifi.flowfile.attributes.CoreAttributes;
-import org.apache.nifi.stream.io.BufferedInputStream;
-import org.apache.nifi.stream.io.BufferedOutputStream;
-import org.apache.nifi.stream.io.StreamUtils;
 import org.apache.nifi.logging.ProcessorLog;
 import org.apache.nifi.processor.AbstractProcessor;
 import org.apache.nifi.processor.ProcessContext;
 import org.apache.nifi.processor.ProcessSession;
 import org.apache.nifi.processor.ProcessorInitializationContext;
 import org.apache.nifi.processor.Relationship;
-import org.apache.nifi.annotation.documentation.CapabilityDescription;
-import org.apache.nifi.annotation.behavior.EventDriven;
-import org.apache.nifi.annotation.behavior.SideEffectFree;
-import org.apache.nifi.annotation.behavior.SupportsBatching;
-import org.apache.nifi.annotation.documentation.Tags;
 import org.apache.nifi.processor.exception.ProcessException;
 import org.apache.nifi.processor.io.InputStreamCallback;
 import org.apache.nifi.processor.io.OutputStreamCallback;
+import org.apache.nifi.stream.io.BufferedInputStream;
+import org.apache.nifi.stream.io.BufferedOutputStream;
+import org.apache.nifi.stream.io.StreamUtils;
 import org.apache.nifi.util.FlowFileUnpackager;
 import org.apache.nifi.util.FlowFileUnpackagerV1;
 import org.apache.nifi.util.FlowFileUnpackagerV2;
 import org.apache.nifi.util.FlowFileUnpackagerV3;
 import org.apache.nifi.util.ObjectHolder;
 
-import org.apache.commons.compress.archivers.ArchiveEntry;
-import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
-import org.apache.commons.compress.archivers.tar.TarArchiveInputStream;
-import org.apache.commons.compress.archivers.zip.ZipArchiveInputStream;
-
 @EventDriven
 @SideEffectFree
 @SupportsBatching
 @Tags({"Unpack", "un-merge", "tar", "zip", "archive", "flowfile-stream", 
"flowfile-stream-v3"})
 @CapabilityDescription("Unpacks the content of FlowFiles that have been 
packaged with one of several different Packaging Formats, emitting one to many 
FlowFiles for each input FlowFile")
+@ReadsAttribute(attribute = "mime.type", description = "If the <Packaging 
Format> property is set to use mime.type attribute, this attribute is used to 
determine the FlowFile's MIME Type. In this case, if the attribute is set to 
application/tar, the TAR Packaging Format will be used. If the attribute is set 
to application/zip, the ZIP Packaging Format will be used. If the attribute is 
set to application/flowfile-v3 or application/flowfile-v2 or 
application/flowfile-v1, the appropriate FlowFile Packaging Format will be 
used. If this attribute is missing, the FlowFile will be routed to 'failure'. 
Otherwise, if the attribute's value is not one of those mentioned above, the 
FlowFile will be routed to 'success' without being unpacked")
+@WritesAttributes({
+        @WritesAttribute(attribute = "mime.type", description = "If the 
FlowFile is successfully unpacked, its MIME Type is no longer known, so the 
mime.type attribute is set to application/octet-stream."),
+        @WritesAttribute(attribute = "fragment.identifier", description = "All 
unpacked FlowFiles produced from the same parent FlowFile will have the same 
randomly generated UUID added for this attribute"),
+        @WritesAttribute(attribute = "fragment.index", description = "A one-up 
number that indicates the ordering of the unpacked FlowFiles that were created 
from a single parent FlowFile"),
+        @WritesAttribute(attribute = "fragment.count", description = "The 
number of unpacked FlowFiles generated from the parent FlowFile"),
+        @WritesAttribute(attribute = "segment.original.filename ", description 
= "The filename of the parent FlowFile. Extensions of .tar, .zip or .pkg are 
removed because the MergeContent processor automatically adds those extensions 
if it is used to rebuild the original FlowFile") })
+@SeeAlso(MergeContent.class)
 public class UnpackContent extends AbstractProcessor {
 
     public static final String AUTO_DETECT_FORMAT = "use mime.type attribute";

Reply via email to