diff --git a/modules/src/main/java/org/archive/modules/CrawlURI.java b/modules/src/main/java/org/archive/modules/CrawlURI.java index 8ab8f6e3..160df59d 100644 --- a/modules/src/main/java/org/archive/modules/CrawlURI.java +++ b/modules/src/main/java/org/archive/modules/CrawlURI.java @@ -1649,6 +1649,7 @@ implements Reporter, Serializable, OverlayContext { extendHopsPath(getPathFromSeed(),link.getHopType().getHopChar()), getUURI(), link.getContext()); newCaURI.inheritFrom(this); + newCaURI.data=link.getRawData(); return newCaURI; } diff --git a/modules/src/main/java/org/archive/modules/extractor/Link.java b/modules/src/main/java/org/archive/modules/extractor/Link.java index a8f5f3ee..3384a0a5 100644 --- a/modules/src/main/java/org/archive/modules/extractor/Link.java +++ b/modules/src/main/java/org/archive/modules/extractor/Link.java @@ -19,9 +19,12 @@ package org.archive.modules.extractor; import java.io.Serializable; +import java.util.HashMap; +import java.util.Map; import java.util.logging.Logger; import org.apache.commons.httpclient.URIException; +import org.archive.modules.CoreAttributeConstants; import org.archive.modules.CrawlURI; import org.archive.net.UURI; import org.archive.net.UURIFactory; @@ -57,6 +60,14 @@ public class Link implements Serializable, Comparable { /** hop-type */ private Hop hop; + + /** + * Flexible dynamic attributes list. + *
+ * See further {@link Link#getData()}
+ */
+ protected Map
+ * By convention the attribute list is keyed by constants found in the
+ * {@link CoreAttributeConstants} interface. Use this list to carry
+ * data or state produced by custom processors rather change the
+ * classes {@link CrawlURI} or this class, CrawlURI.
+ *
+ * This list becomes {@link CrawlURI#getData()} when the Link is promoted to CrawlURI via
+ * {@link CrawlURI#createCrawlURI(UURI, Link)}
+ *
+ * If the list is null when this method is invoked, a new instance will be created and returned.
+ *
+ * @returns a flexible map of key/value pairs for storing
+ * status of this URI for use by other processors.
+ */
+ public Map