You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nutch.apache.org by jn...@apache.org on 2014/05/15 10:10:09 UTC
svn commit: r1594812 [3/5] - in /nutch/branches/2.x: ./ ivy/ src/gora/
src/java/org/apache/nutch/api/ src/java/org/apache/nutch/crawl/
src/java/org/apache/nutch/fetcher/ src/java/org/apache/nutch/host/
src/java/org/apache/nutch/indexer/ src/java/org/ap...
Modified: nutch/branches/2.x/src/java/org/apache/nutch/storage/WebPage.java
URL: http://svn.apache.org/viewvc/nutch/branches/2.x/src/java/org/apache/nutch/storage/WebPage.java?rev=1594812&r1=1594811&r2=1594812&view=diff
==============================================================================
--- nutch/branches/2.x/src/java/org/apache/nutch/storage/WebPage.java (original)
+++ nutch/branches/2.x/src/java/org/apache/nutch/storage/WebPage.java Thu May 15 08:10:07 2014
@@ -1,84 +1,108 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+/**
+ * Autogenerated by Avro
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ******************************************************************************/
-
-package org.apache.nutch.storage;
-
-import java.nio.ByteBuffer;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.avro.Protocol;
-import org.apache.avro.Schema;
-import org.apache.avro.AvroRuntimeException;
-import org.apache.avro.Protocol;
-import org.apache.avro.util.Utf8;
-import org.apache.avro.ipc.AvroRemoteException;
-import org.apache.avro.generic.GenericArray;
-import org.apache.avro.specific.FixedSize;
-import org.apache.avro.specific.SpecificExceptionBase;
-import org.apache.avro.specific.SpecificRecordBase;
-import org.apache.avro.specific.SpecificRecord;
-import org.apache.avro.specific.SpecificFixed;
-import org.apache.gora.persistency.StateManager;
-import org.apache.gora.persistency.impl.PersistentBase;
-import org.apache.gora.persistency.impl.StateManagerImpl;
-import org.apache.gora.persistency.StatefulHashMap;
-import org.apache.gora.persistency.ListGenericArray;
-
+ * DO NOT EDIT DIRECTLY
+ */
+package org.apache.nutch.storage;
@SuppressWarnings("all")
-public class WebPage extends PersistentBase {
- public static final Schema _SCHEMA = Schema.parse("{\"type\":\"record\",\"name\":\"WebPage\",\"namespace\":\"org.apache.nutch.storage\",\"fields\":[{\"name\":\"baseUrl\",\"type\":\"string\"},{\"name\":\"status\",\"type\":\"int\"},{\"name\":\"fetchTime\",\"type\":\"long\"},{\"name\":\"prevFetchTime\",\"type\":\"long\"},{\"name\":\"fetchInterval\",\"type\":\"int\"},{\"name\":\"retriesSinceFetch\",\"type\":\"int\"},{\"name\":\"modifiedTime\",\"type\":\"long\"},{\"name\":\"prevModifiedTime\",\"type\":\"long\"},{\"name\":\"protocolStatus\",\"type\":{\"type\":\"record\",\"name\":\"ProtocolStatus\",\"fields\":[{\"name\":\"code\",\"type\":\"int\"},{\"name\":\"args\",\"type\":{\"type\":\"array\",\"items\":\"string\"}},{\"name\":\"lastModified\",\"type\":\"long\"}]}},{\"name\":\"content\",\"type\":\"bytes\"},{\"name\":\"contentType\",\"type\":\"string\"},{\"name\":\"prevSignature\",\"type\":\"bytes\"},{\"name\":\"signature\",\"type\":\"bytes\"},{\"name\":\"title\",\"type\":\"string\"},{\"na
me\":\"text\",\"type\":\"string\"},{\"name\":\"parseStatus\",\"type\":{\"type\":\"record\",\"name\":\"ParseStatus\",\"fields\":[{\"name\":\"majorCode\",\"type\":\"int\"},{\"name\":\"minorCode\",\"type\":\"int\"},{\"name\":\"args\",\"type\":{\"type\":\"array\",\"items\":\"string\"}}]}},{\"name\":\"score\",\"type\":\"float\"},{\"name\":\"reprUrl\",\"type\":\"string\"},{\"name\":\"headers\",\"type\":{\"type\":\"map\",\"values\":\"string\"}},{\"name\":\"outlinks\",\"type\":{\"type\":\"map\",\"values\":\"string\"}},{\"name\":\"inlinks\",\"type\":{\"type\":\"map\",\"values\":\"string\"}},{\"name\":\"markers\",\"type\":{\"type\":\"map\",\"values\":\"string\"}},{\"name\":\"metadata\",\"type\":{\"type\":\"map\",\"values\":\"bytes\"}},{\"name\":\"batchId\",\"type\":\"string\"}]}");
+public class WebPage extends org.apache.gora.persistency.impl.PersistentBase implements org.apache.avro.specific.SpecificRecord, org.apache.gora.persistency.Persistent {
+ public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"WebPage\",\"namespace\":\"org.apache.nutch.storage\",\"fields\":[{\"name\":\"__g__dirty\",\"type\":\"bytes\",\"doc\":\"Bytes used to represent weather or not a field is dirty.\",\"default\":\"AAAAAA==\"},{\"name\":\"baseUrl\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"status\",\"type\":\"int\",\"default\":0},{\"name\":\"fetchTime\",\"type\":\"long\",\"default\":0},{\"name\":\"prevFetchTime\",\"type\":\"long\",\"default\":0},{\"name\":\"fetchInterval\",\"type\":\"int\",\"default\":0},{\"name\":\"retriesSinceFetch\",\"type\":\"int\",\"default\":0},{\"name\":\"modifiedTime\",\"type\":\"long\",\"default\":0},{\"name\":\"prevModifiedTime\",\"type\":\"long\",\"default\":0},{\"name\":\"protocolStatus\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"ProtocolStatus\",\"fields\":[{\"name\":\"__g__dirty\",\"type\":\"bytes\",\"doc\":\"Bytes used
to represent weather or not a field is dirty.\",\"default\":\"AA==\"},{\"name\":\"code\",\"type\":\"int\",\"default\":0},{\"name\":\"args\",\"type\":{\"type\":\"array\",\"items\":\"string\"},\"default\":[]},{\"name\":\"lastModified\",\"type\":\"long\",\"default\":0}]}],\"default\":null},{\"name\":\"content\",\"type\":[\"null\",\"bytes\"],\"default\":null},{\"name\":\"contentType\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"prevSignature\",\"type\":[\"null\",\"bytes\"],\"default\":null},{\"name\":\"signature\",\"type\":[\"null\",\"bytes\"],\"default\":null},{\"name\":\"title\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"text\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"parseStatus\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"ParseStatus\",\"fields\":[{\"name\":\"__g__dirty\",\"type\":\"bytes\",\"doc\":\"Bytes used to represent weather or not a field is dirty.\",\"default\":\"AA==\"},{\"name\":\"majorCode\",\"type\":\"int\"
,\"default\":0},{\"name\":\"minorCode\",\"type\":\"int\",\"default\":0},{\"name\":\"args\",\"type\":{\"type\":\"array\",\"items\":\"string\"},\"default\":[]}]}],\"default\":null},{\"name\":\"score\",\"type\":\"float\",\"default\":0},{\"name\":\"reprUrl\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"headers\",\"type\":{\"type\":\"map\",\"values\":[\"null\",\"string\"]},\"default\":{}},{\"name\":\"outlinks\",\"type\":{\"type\":\"map\",\"values\":[\"null\",\"string\"]},\"default\":{}},{\"name\":\"inlinks\",\"type\":{\"type\":\"map\",\"values\":[\"null\",\"string\"]},\"default\":{}},{\"name\":\"markers\",\"type\":{\"type\":\"map\",\"values\":[\"null\",\"string\"]},\"default\":{}},{\"name\":\"metadata\",\"type\":{\"type\":\"map\",\"values\":[\"null\",\"bytes\"]},\"default\":{}},{\"name\":\"batchId\",\"type\":[\"null\",\"string\"],\"default\":null}]}");
+
+ /** Enum containing all data bean's fields. */
public static enum Field {
- BASE_URL(0,"baseUrl"),
- STATUS(1,"status"),
- FETCH_TIME(2,"fetchTime"),
- PREV_FETCH_TIME(3,"prevFetchTime"),
- FETCH_INTERVAL(4,"fetchInterval"),
- RETRIES_SINCE_FETCH(5,"retriesSinceFetch"),
- MODIFIED_TIME(6,"modifiedTime"),
- PREV_MODIFIED_TIME(7,"prevModifiedTime"),
- PROTOCOL_STATUS(8,"protocolStatus"),
- CONTENT(9,"content"),
- CONTENT_TYPE(10,"contentType"),
- PREV_SIGNATURE(11,"prevSignature"),
- SIGNATURE(12,"signature"),
- TITLE(13,"title"),
- TEXT(14,"text"),
- PARSE_STATUS(15,"parseStatus"),
- SCORE(16,"score"),
- REPR_URL(17,"reprUrl"),
- HEADERS(18,"headers"),
- OUTLINKS(19,"outlinks"),
- INLINKS(20,"inlinks"),
- MARKERS(21,"markers"),
- METADATA(22,"metadata"),
- BATCH_ID(23,"batchId"),
+ __G__DIRTY(0, "__g__dirty"),
+ BASE_URL(1, "baseUrl"),
+ STATUS(2, "status"),
+ FETCH_TIME(3, "fetchTime"),
+ PREV_FETCH_TIME(4, "prevFetchTime"),
+ FETCH_INTERVAL(5, "fetchInterval"),
+ RETRIES_SINCE_FETCH(6, "retriesSinceFetch"),
+ MODIFIED_TIME(7, "modifiedTime"),
+ PREV_MODIFIED_TIME(8, "prevModifiedTime"),
+ PROTOCOL_STATUS(9, "protocolStatus"),
+ CONTENT(10, "content"),
+ CONTENT_TYPE(11, "contentType"),
+ PREV_SIGNATURE(12, "prevSignature"),
+ SIGNATURE(13, "signature"),
+ TITLE(14, "title"),
+ TEXT(15, "text"),
+ PARSE_STATUS(16, "parseStatus"),
+ SCORE(17, "score"),
+ REPR_URL(18, "reprUrl"),
+ HEADERS(19, "headers"),
+ OUTLINKS(20, "outlinks"),
+ INLINKS(21, "inlinks"),
+ MARKERS(22, "markers"),
+ METADATA(23, "metadata"),
+ BATCH_ID(24, "batchId"),
;
+ /**
+ * Field's index.
+ */
private int index;
+
+ /**
+ * Field's name.
+ */
private String name;
+
+ /**
+ * Field's constructor
+ * @param index field's index.
+ * @param name field's name.
+ */
Field(int index, String name) {this.index=index;this.name=name;}
+
+ /**
+ * Gets field's index.
+ * @return int field's index.
+ */
public int getIndex() {return index;}
+
+ /**
+ * Gets field's name.
+ * @return String field's name.
+ */
public String getName() {return name;}
+
+ /**
+ * Gets field's attributes to string.
+ * @return String field's attributes to string.
+ */
public String toString() {return name;}
};
- public static final String[] _ALL_FIELDS = {"baseUrl","status","fetchTime","prevFetchTime","fetchInterval","retriesSinceFetch","modifiedTime","prevModifiedTime","protocolStatus","content","contentType","prevSignature","signature","title","text","parseStatus","score","reprUrl","headers","outlinks","inlinks","markers","metadata","batchId",};
- static {
- PersistentBase.registerFields(WebPage.class, _ALL_FIELDS);
- }
- private Utf8 baseUrl;
+
+ public static final String[] _ALL_FIELDS = {
+ "__g__dirty",
+ "baseUrl",
+ "status",
+ "fetchTime",
+ "prevFetchTime",
+ "fetchInterval",
+ "retriesSinceFetch",
+ "modifiedTime",
+ "prevModifiedTime",
+ "protocolStatus",
+ "content",
+ "contentType",
+ "prevSignature",
+ "signature",
+ "title",
+ "text",
+ "parseStatus",
+ "score",
+ "reprUrl",
+ "headers",
+ "outlinks",
+ "inlinks",
+ "markers",
+ "metadata",
+ "batchId",
+ };
+
+ /** Bytes used to represent weather or not a field is dirty. */
+ private java.nio.ByteBuffer __g__dirty = java.nio.ByteBuffer.wrap(new byte[4]);
+ private CharSequence baseUrl;
private int status;
private long fetchTime;
private long prevFetchTime;
@@ -87,294 +111,2041 @@ public class WebPage extends PersistentB
private long modifiedTime;
private long prevModifiedTime;
private ProtocolStatus protocolStatus;
- private ByteBuffer content;
- private Utf8 contentType;
- private ByteBuffer prevSignature;
- private ByteBuffer signature;
- private Utf8 title;
- private Utf8 text;
+ private java.nio.ByteBuffer content;
+ private CharSequence contentType;
+ private java.nio.ByteBuffer prevSignature;
+ private java.nio.ByteBuffer signature;
+ private CharSequence title;
+ private CharSequence text;
private ParseStatus parseStatus;
private float score;
- private Utf8 reprUrl;
- private Map<Utf8,Utf8> headers;
- private Map<Utf8,Utf8> outlinks;
- private Map<Utf8,Utf8> inlinks;
- private Map<Utf8,Utf8> markers;
- private Map<Utf8,ByteBuffer> metadata;
- private Utf8 batchId;
- public WebPage() {
- this(new StateManagerImpl());
- }
- public WebPage(StateManager stateManager) {
- super(stateManager);
- headers = new StatefulHashMap<Utf8,Utf8>();
- outlinks = new StatefulHashMap<Utf8,Utf8>();
- inlinks = new StatefulHashMap<Utf8,Utf8>();
- markers = new StatefulHashMap<Utf8,Utf8>();
- metadata = new StatefulHashMap<Utf8,ByteBuffer>();
- }
- public WebPage newInstance(StateManager stateManager) {
- return new WebPage(stateManager);
- }
- public Schema getSchema() { return _SCHEMA; }
- public Object get(int _field) {
- switch (_field) {
- case 0: return baseUrl;
- case 1: return status;
- case 2: return fetchTime;
- case 3: return prevFetchTime;
- case 4: return fetchInterval;
- case 5: return retriesSinceFetch;
- case 6: return modifiedTime;
- case 7: return prevModifiedTime;
- case 8: return protocolStatus;
- case 9: return content;
- case 10: return contentType;
- case 11: return prevSignature;
- case 12: return signature;
- case 13: return title;
- case 14: return text;
- case 15: return parseStatus;
- case 16: return score;
- case 17: return reprUrl;
- case 18: return headers;
- case 19: return outlinks;
- case 20: return inlinks;
- case 21: return markers;
- case 22: return metadata;
- case 23: return batchId;
- default: throw new AvroRuntimeException("Bad index");
+ private CharSequence reprUrl;
+ private java.util.Map<CharSequence,CharSequence> headers;
+ private java.util.Map<CharSequence,CharSequence> outlinks;
+ private java.util.Map<CharSequence,CharSequence> inlinks;
+ private java.util.Map<CharSequence,CharSequence> markers;
+ private java.util.Map<CharSequence,java.nio.ByteBuffer> metadata;
+ private CharSequence batchId;
+ public org.apache.avro.Schema getSchema() { return SCHEMA$; }
+ // Used by DatumWriter. Applications should not call.
+ public Object get(int field$) {
+ switch (field$) {
+ case 0: return __g__dirty;
+ case 1: return baseUrl;
+ case 2: return status;
+ case 3: return fetchTime;
+ case 4: return prevFetchTime;
+ case 5: return fetchInterval;
+ case 6: return retriesSinceFetch;
+ case 7: return modifiedTime;
+ case 8: return prevModifiedTime;
+ case 9: return protocolStatus;
+ case 10: return content;
+ case 11: return contentType;
+ case 12: return prevSignature;
+ case 13: return signature;
+ case 14: return title;
+ case 15: return text;
+ case 16: return parseStatus;
+ case 17: return score;
+ case 18: return reprUrl;
+ case 19: return headers;
+ case 20: return outlinks;
+ case 21: return inlinks;
+ case 22: return markers;
+ case 23: return metadata;
+ case 24: return batchId;
+ default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
+
+ // Used by DatumReader. Applications should not call.
@SuppressWarnings(value="unchecked")
- public void put(int _field, Object _value) {
- if(isFieldEqual(_field, _value)) return;
- getStateManager().setDirty(this, _field);
- switch (_field) {
- case 0:baseUrl = (Utf8)_value; break;
- case 1:status = (Integer)_value; break;
- case 2:fetchTime = (Long)_value; break;
- case 3:prevFetchTime = (Long)_value; break;
- case 4:fetchInterval = (Integer)_value; break;
- case 5:retriesSinceFetch = (Integer)_value; break;
- case 6:modifiedTime = (Long)_value; break;
- case 7:prevModifiedTime = (Long)_value; break;
- case 8:protocolStatus = (ProtocolStatus)_value; break;
- case 9:content = (ByteBuffer)_value; break;
- case 10:contentType = (Utf8)_value; break;
- case 11:prevSignature = (ByteBuffer)_value; break;
- case 12:signature = (ByteBuffer)_value; break;
- case 13:title = (Utf8)_value; break;
- case 14:text = (Utf8)_value; break;
- case 15:parseStatus = (ParseStatus)_value; break;
- case 16:score = (Float)_value; break;
- case 17:reprUrl = (Utf8)_value; break;
- case 18:headers = (Map<Utf8,Utf8>)_value; break;
- case 19:outlinks = (Map<Utf8,Utf8>)_value; break;
- case 20:inlinks = (Map<Utf8,Utf8>)_value; break;
- case 21:markers = (Map<Utf8,Utf8>)_value; break;
- case 22:metadata = (Map<Utf8,ByteBuffer>)_value; break;
- case 23:batchId = (Utf8)_value; break;
- default: throw new AvroRuntimeException("Bad index");
- }
- }
- public Utf8 getBaseUrl() {
- return (Utf8) get(0);
- }
- public void setBaseUrl(Utf8 value) {
- put(0, value);
- }
- public int getStatus() {
- return (Integer) get(1);
- }
- public void setStatus(int value) {
- put(1, value);
- }
- public long getFetchTime() {
- return (Long) get(2);
- }
- public void setFetchTime(long value) {
- put(2, value);
- }
- public long getPrevFetchTime() {
- return (Long) get(3);
- }
- public void setPrevFetchTime(long value) {
- put(3, value);
- }
- public int getFetchInterval() {
- return (Integer) get(4);
- }
- public void setFetchInterval(int value) {
- put(4, value);
- }
- public int getRetriesSinceFetch() {
- return (Integer) get(5);
- }
- public void setRetriesSinceFetch(int value) {
- put(5, value);
- }
- public long getModifiedTime() {
- return (Long) get(6);
+ public void put(int field$, Object value) {
+ switch (field$) {
+ case 0: __g__dirty = (java.nio.ByteBuffer)(value); break;
+ case 1: baseUrl = (CharSequence)(value); break;
+ case 2: status = (Integer)(value); break;
+ case 3: fetchTime = (Long)(value); break;
+ case 4: prevFetchTime = (Long)(value); break;
+ case 5: fetchInterval = (Integer)(value); break;
+ case 6: retriesSinceFetch = (Integer)(value); break;
+ case 7: modifiedTime = (Long)(value); break;
+ case 8: prevModifiedTime = (Long)(value); break;
+ case 9: protocolStatus = (ProtocolStatus)(value); break;
+ case 10: content = (java.nio.ByteBuffer)(value); break;
+ case 11: contentType = (CharSequence)(value); break;
+ case 12: prevSignature = (java.nio.ByteBuffer)(value); break;
+ case 13: signature = (java.nio.ByteBuffer)(value); break;
+ case 14: title = (CharSequence)(value); break;
+ case 15: text = (CharSequence)(value); break;
+ case 16: parseStatus = (ParseStatus)(value); break;
+ case 17: score = (Float)(value); break;
+ case 18: reprUrl = (CharSequence)(value); break;
+ case 19: headers = (java.util.Map<CharSequence,CharSequence>)((value instanceof org.apache.gora.persistency.Dirtyable) ? value : new org.apache.gora.persistency.impl.DirtyMapWrapper((java.util.Map)value)); break;
+ case 20: outlinks = (java.util.Map<CharSequence,CharSequence>)((value instanceof org.apache.gora.persistency.Dirtyable) ? value : new org.apache.gora.persistency.impl.DirtyMapWrapper((java.util.Map)value)); break;
+ case 21: inlinks = (java.util.Map<CharSequence,CharSequence>)((value instanceof org.apache.gora.persistency.Dirtyable) ? value : new org.apache.gora.persistency.impl.DirtyMapWrapper((java.util.Map)value)); break;
+ case 22: markers = (java.util.Map<CharSequence,CharSequence>)((value instanceof org.apache.gora.persistency.Dirtyable) ? value : new org.apache.gora.persistency.impl.DirtyMapWrapper((java.util.Map)value)); break;
+ case 23: metadata = (java.util.Map<CharSequence,java.nio.ByteBuffer>)((value instanceof org.apache.gora.persistency.Dirtyable) ? value : new org.apache.gora.persistency.impl.DirtyMapWrapper((java.util.Map)value)); break;
+ case 24: batchId = (CharSequence)(value); break;
+ default: throw new org.apache.avro.AvroRuntimeException("Bad index");
+ }
}
- public void setModifiedTime(long value) {
- put(6, value);
+
+ /**
+ * Gets the value of the 'baseUrl' field.
+ */
+ public CharSequence getBaseUrl() {
+ return baseUrl;
}
- public long getPrevModifiedTime() {
- return (Long) get(7);
+
+ /**
+ * Sets the value of the 'baseUrl' field.
+ * @param value the value to set.
+ */
+ public void setBaseUrl(CharSequence value) {
+ this.baseUrl = value;
+ setDirty(1);
+ }
+
+ /**
+ * Checks the dirty status of the 'baseUrl' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isBaseUrlDirty(CharSequence value) {
+ return isDirty(1);
}
- public void setPrevModifiedTime(long value) {
- put(7, value);
+
+ /**
+ * Gets the value of the 'status' field.
+ */
+ public Integer getStatus() {
+ return status;
}
- public ProtocolStatus getProtocolStatus() {
- return (ProtocolStatus) get(8);
+
+ /**
+ * Sets the value of the 'status' field.
+ * @param value the value to set.
+ */
+ public void setStatus(Integer value) {
+ this.status = value;
+ setDirty(2);
+ }
+
+ /**
+ * Checks the dirty status of the 'status' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isStatusDirty(Integer value) {
+ return isDirty(2);
}
- public void setProtocolStatus(ProtocolStatus value) {
- put(8, value);
+
+ /**
+ * Gets the value of the 'fetchTime' field.
+ */
+ public Long getFetchTime() {
+ return fetchTime;
+ }
+
+ /**
+ * Sets the value of the 'fetchTime' field.
+ * @param value the value to set.
+ */
+ public void setFetchTime(Long value) {
+ this.fetchTime = value;
+ setDirty(3);
+ }
+
+ /**
+ * Checks the dirty status of the 'fetchTime' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isFetchTimeDirty(Long value) {
+ return isDirty(3);
+ }
+
+ /**
+ * Gets the value of the 'prevFetchTime' field.
+ */
+ public Long getPrevFetchTime() {
+ return prevFetchTime;
}
- public ByteBuffer getContent() {
- return (ByteBuffer) get(9);
+
+ /**
+ * Sets the value of the 'prevFetchTime' field.
+ * @param value the value to set.
+ */
+ public void setPrevFetchTime(Long value) {
+ this.prevFetchTime = value;
+ setDirty(4);
+ }
+
+ /**
+ * Checks the dirty status of the 'prevFetchTime' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isPrevFetchTimeDirty(Long value) {
+ return isDirty(4);
}
- public void setContent(ByteBuffer value) {
- put(9, value);
+
+ /**
+ * Gets the value of the 'fetchInterval' field.
+ */
+ public Integer getFetchInterval() {
+ return fetchInterval;
}
- public Utf8 getContentType() {
- return (Utf8) get(10);
+
+ /**
+ * Sets the value of the 'fetchInterval' field.
+ * @param value the value to set.
+ */
+ public void setFetchInterval(Integer value) {
+ this.fetchInterval = value;
+ setDirty(5);
+ }
+
+ /**
+ * Checks the dirty status of the 'fetchInterval' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isFetchIntervalDirty(Integer value) {
+ return isDirty(5);
}
- public void setContentType(Utf8 value) {
- put(10, value);
+
+ /**
+ * Gets the value of the 'retriesSinceFetch' field.
+ */
+ public Integer getRetriesSinceFetch() {
+ return retriesSinceFetch;
}
- public ByteBuffer getPrevSignature() {
- return (ByteBuffer) get(11);
+
+ /**
+ * Sets the value of the 'retriesSinceFetch' field.
+ * @param value the value to set.
+ */
+ public void setRetriesSinceFetch(Integer value) {
+ this.retriesSinceFetch = value;
+ setDirty(6);
+ }
+
+ /**
+ * Checks the dirty status of the 'retriesSinceFetch' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isRetriesSinceFetchDirty(Integer value) {
+ return isDirty(6);
}
- public void setPrevSignature(ByteBuffer value) {
- put(11, value);
+
+ /**
+ * Gets the value of the 'modifiedTime' field.
+ */
+ public Long getModifiedTime() {
+ return modifiedTime;
}
- public ByteBuffer getSignature() {
- return (ByteBuffer) get(12);
+
+ /**
+ * Sets the value of the 'modifiedTime' field.
+ * @param value the value to set.
+ */
+ public void setModifiedTime(Long value) {
+ this.modifiedTime = value;
+ setDirty(7);
+ }
+
+ /**
+ * Checks the dirty status of the 'modifiedTime' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isModifiedTimeDirty(Long value) {
+ return isDirty(7);
}
- public void setSignature(ByteBuffer value) {
- put(12, value);
+
+ /**
+ * Gets the value of the 'prevModifiedTime' field.
+ */
+ public Long getPrevModifiedTime() {
+ return prevModifiedTime;
}
- public Utf8 getTitle() {
- return (Utf8) get(13);
+
+ /**
+ * Sets the value of the 'prevModifiedTime' field.
+ * @param value the value to set.
+ */
+ public void setPrevModifiedTime(Long value) {
+ this.prevModifiedTime = value;
+ setDirty(8);
+ }
+
+ /**
+ * Checks the dirty status of the 'prevModifiedTime' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isPrevModifiedTimeDirty(Long value) {
+ return isDirty(8);
}
- public void setTitle(Utf8 value) {
- put(13, value);
+
+ /**
+ * Gets the value of the 'protocolStatus' field.
+ */
+ public ProtocolStatus getProtocolStatus() {
+ return protocolStatus;
}
- public Utf8 getText() {
- return (Utf8) get(14);
+
+ /**
+ * Sets the value of the 'protocolStatus' field.
+ * @param value the value to set.
+ */
+ public void setProtocolStatus(ProtocolStatus value) {
+ this.protocolStatus = value;
+ setDirty(9);
}
- public void setText(Utf8 value) {
- put(14, value);
+
+ /**
+ * Checks the dirty status of the 'protocolStatus' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isProtocolStatusDirty(ProtocolStatus value) {
+ return isDirty(9);
}
- public ParseStatus getParseStatus() {
- return (ParseStatus) get(15);
+
+ /**
+ * Gets the value of the 'content' field.
+ */
+ public java.nio.ByteBuffer getContent() {
+ return content;
}
- public void setParseStatus(ParseStatus value) {
- put(15, value);
+
+ /**
+ * Sets the value of the 'content' field.
+ * @param value the value to set.
+ */
+ public void setContent(java.nio.ByteBuffer value) {
+ this.content = value;
+ setDirty(10);
+ }
+
+ /**
+ * Checks the dirty status of the 'content' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isContentDirty(java.nio.ByteBuffer value) {
+ return isDirty(10);
+ }
+
+ /**
+ * Gets the value of the 'contentType' field.
+ */
+ public CharSequence getContentType() {
+ return contentType;
+ }
+
+ /**
+ * Sets the value of the 'contentType' field.
+ * @param value the value to set.
+ */
+ public void setContentType(CharSequence value) {
+ this.contentType = value;
+ setDirty(11);
+ }
+
+ /**
+ * Checks the dirty status of the 'contentType' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isContentTypeDirty(CharSequence value) {
+ return isDirty(11);
+ }
+
+ /**
+ * Gets the value of the 'prevSignature' field.
+ */
+ public java.nio.ByteBuffer getPrevSignature() {
+ return prevSignature;
}
- public float getScore() {
- return (Float) get(16);
+
+ /**
+ * Sets the value of the 'prevSignature' field.
+ * @param value the value to set.
+ */
+ public void setPrevSignature(java.nio.ByteBuffer value) {
+ this.prevSignature = value;
+ setDirty(12);
+ }
+
+ /**
+ * Checks the dirty status of the 'prevSignature' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isPrevSignatureDirty(java.nio.ByteBuffer value) {
+ return isDirty(12);
}
- public void setScore(float value) {
- put(16, value);
+
+ /**
+ * Gets the value of the 'signature' field.
+ */
+ public java.nio.ByteBuffer getSignature() {
+ return signature;
}
- public Utf8 getReprUrl() {
- return (Utf8) get(17);
+
+ /**
+ * Sets the value of the 'signature' field.
+ * @param value the value to set.
+ */
+ public void setSignature(java.nio.ByteBuffer value) {
+ this.signature = value;
+ setDirty(13);
+ }
+
+ /**
+ * Checks the dirty status of the 'signature' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isSignatureDirty(java.nio.ByteBuffer value) {
+ return isDirty(13);
}
- public void setReprUrl(Utf8 value) {
- put(17, value);
+
+ /**
+ * Gets the value of the 'title' field.
+ */
+ public CharSequence getTitle() {
+ return title;
}
- @SuppressWarnings("unchecked")
- public Map<Utf8, Utf8> getHeaders() {
- return (Map<Utf8, Utf8>) get(18);
+
+ /**
+ * Sets the value of the 'title' field.
+ * @param value the value to set.
+ */
+ public void setTitle(CharSequence value) {
+ this.title = value;
+ setDirty(14);
+ }
+
+ /**
+ * Checks the dirty status of the 'title' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isTitleDirty(CharSequence value) {
+ return isDirty(14);
}
- public Utf8 getFromHeaders(Utf8 key) {
- if (headers == null) { return null; }
- return headers.get(key);
+
+ /**
+ * Gets the value of the 'text' field.
+ */
+ public CharSequence getText() {
+ return text;
}
- public void putToHeaders(Utf8 key, Utf8 value) {
- getStateManager().setDirty(this, 18);
- headers.put(key, value);
+
+ /**
+ * Sets the value of the 'text' field.
+ * @param value the value to set.
+ */
+ public void setText(CharSequence value) {
+ this.text = value;
+ setDirty(15);
+ }
+
+ /**
+ * Checks the dirty status of the 'text' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isTextDirty(CharSequence value) {
+ return isDirty(15);
}
- public Utf8 removeFromHeaders(Utf8 key) {
- if (headers == null) { return null; }
- getStateManager().setDirty(this, 18);
- return headers.remove(key);
+
+ /**
+ * Gets the value of the 'parseStatus' field.
+ */
+ public ParseStatus getParseStatus() {
+ return parseStatus;
}
- @SuppressWarnings("unchecked")
- public Map<Utf8, Utf8> getOutlinks() {
- return (Map<Utf8, Utf8>) get(19);
+
+ /**
+ * Sets the value of the 'parseStatus' field.
+ * @param value the value to set.
+ */
+ public void setParseStatus(ParseStatus value) {
+ this.parseStatus = value;
+ setDirty(16);
}
- public Utf8 getFromOutlinks(Utf8 key) {
- if (outlinks == null) { return null; }
- return outlinks.get(key);
+
+ /**
+ * Checks the dirty status of the 'parseStatus' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isParseStatusDirty(ParseStatus value) {
+ return isDirty(16);
}
- public void putToOutlinks(Utf8 key, Utf8 value) {
- getStateManager().setDirty(this, 19);
- outlinks.put(key, value);
+
+ /**
+ * Gets the value of the 'score' field.
+ */
+ public Float getScore() {
+ return score;
+ }
+
+ /**
+ * Sets the value of the 'score' field.
+ * @param value the value to set.
+ */
+ public void setScore(Float value) {
+ this.score = value;
+ setDirty(17);
+ }
+
+ /**
+ * Checks the dirty status of the 'score' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isScoreDirty(Float value) {
+ return isDirty(17);
}
- public Utf8 removeFromOutlinks(Utf8 key) {
- if (outlinks == null) { return null; }
- getStateManager().setDirty(this, 19);
- return outlinks.remove(key);
+
+ /**
+ * Gets the value of the 'reprUrl' field.
+ */
+ public CharSequence getReprUrl() {
+ return reprUrl;
+ }
+
+ /**
+ * Sets the value of the 'reprUrl' field.
+ * @param value the value to set.
+ */
+ public void setReprUrl(CharSequence value) {
+ this.reprUrl = value;
+ setDirty(18);
+ }
+
+ /**
+ * Checks the dirty status of the 'reprUrl' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isReprUrlDirty(CharSequence value) {
+ return isDirty(18);
}
- @SuppressWarnings("unchecked")
- public Map<Utf8, Utf8> getInlinks() {
- return (Map<Utf8, Utf8>) get(20);
+
+ /**
+ * Gets the value of the 'headers' field.
+ */
+ public java.util.Map<CharSequence,CharSequence> getHeaders() {
+ return headers;
+ }
+
+ /**
+ * Sets the value of the 'headers' field.
+ * @param value the value to set.
+ */
+ public void setHeaders(java.util.Map<CharSequence,CharSequence> value) {
+ this.headers = (value instanceof org.apache.gora.persistency.Dirtyable) ? value : new org.apache.gora.persistency.impl.DirtyMapWrapper(value);
+ setDirty(19);
+ }
+
+ /**
+ * Checks the dirty status of the 'headers' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isHeadersDirty(java.util.Map<CharSequence,CharSequence> value) {
+ return isDirty(19);
+ }
+
+ /**
+ * Gets the value of the 'outlinks' field.
+ */
+ public java.util.Map<CharSequence,CharSequence> getOutlinks() {
+ return outlinks;
}
- public Utf8 getFromInlinks(Utf8 key) {
- if (inlinks == null) { return null; }
- return inlinks.get(key);
+
+ /**
+ * Sets the value of the 'outlinks' field.
+ * @param value the value to set.
+ */
+ public void setOutlinks(java.util.Map<CharSequence,CharSequence> value) {
+ this.outlinks = (value instanceof org.apache.gora.persistency.Dirtyable) ? value : new org.apache.gora.persistency.impl.DirtyMapWrapper(value);
+ setDirty(20);
+ }
+
+ /**
+ * Checks the dirty status of the 'outlinks' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isOutlinksDirty(java.util.Map<CharSequence,CharSequence> value) {
+ return isDirty(20);
}
- public void putToInlinks(Utf8 key, Utf8 value) {
- getStateManager().setDirty(this, 20);
- inlinks.put(key, value);
+
+ /**
+ * Gets the value of the 'inlinks' field.
+ */
+ public java.util.Map<CharSequence,CharSequence> getInlinks() {
+ return inlinks;
}
- public Utf8 removeFromInlinks(Utf8 key) {
- if (inlinks == null) { return null; }
- getStateManager().setDirty(this, 20);
- return inlinks.remove(key);
+
+ /**
+ * Sets the value of the 'inlinks' field.
+ * @param value the value to set.
+ */
+ public void setInlinks(java.util.Map<CharSequence,CharSequence> value) {
+ this.inlinks = (value instanceof org.apache.gora.persistency.Dirtyable) ? value : new org.apache.gora.persistency.impl.DirtyMapWrapper(value);
+ setDirty(21);
+ }
+
+ /**
+ * Checks the dirty status of the 'inlinks' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isInlinksDirty(java.util.Map<CharSequence,CharSequence> value) {
+ return isDirty(21);
}
- @SuppressWarnings("unchecked")
- public Map<Utf8, Utf8> getMarkers() {
- return (Map<Utf8, Utf8>) get(21);
+
+ /**
+ * Gets the value of the 'markers' field.
+ */
+ public java.util.Map<CharSequence,CharSequence> getMarkers() {
+ return markers;
}
- public Utf8 getFromMarkers(Utf8 key) {
- if (markers == null) { return null; }
- return markers.get(key);
+
+ /**
+ * Sets the value of the 'markers' field.
+ * @param value the value to set.
+ */
+ public void setMarkers(java.util.Map<CharSequence,CharSequence> value) {
+ this.markers = (value instanceof org.apache.gora.persistency.Dirtyable) ? value : new org.apache.gora.persistency.impl.DirtyMapWrapper(value);
+ setDirty(22);
+ }
+
+ /**
+ * Checks the dirty status of the 'markers' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isMarkersDirty(java.util.Map<CharSequence,CharSequence> value) {
+ return isDirty(22);
}
- public void putToMarkers(Utf8 key, Utf8 value) {
- getStateManager().setDirty(this, 21);
- markers.put(key, value);
+
+ /**
+ * Gets the value of the 'metadata' field.
+ */
+ public java.util.Map<CharSequence,java.nio.ByteBuffer> getMetadata() {
+ return metadata;
}
- public Utf8 removeFromMarkers(Utf8 key) {
- if (markers == null) { return null; }
- getStateManager().setDirty(this, 21);
- return markers.remove(key);
+
+ /**
+ * Sets the value of the 'metadata' field.
+ * @param value the value to set.
+ */
+ public void setMetadata(java.util.Map<CharSequence,java.nio.ByteBuffer> value) {
+ this.metadata = (value instanceof org.apache.gora.persistency.Dirtyable) ? value : new org.apache.gora.persistency.impl.DirtyMapWrapper(value);
+ setDirty(23);
+ }
+
+ /**
+ * Checks the dirty status of the 'metadata' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isMetadataDirty(java.util.Map<CharSequence,java.nio.ByteBuffer> value) {
+ return isDirty(23);
}
- @SuppressWarnings("unchecked")
- public Map<Utf8, ByteBuffer> getMetadata() {
- return (Map<Utf8, ByteBuffer>) get(22);
+
+ /**
+ * Gets the value of the 'batchId' field.
+ */
+ public CharSequence getBatchId() {
+ return batchId;
}
- public ByteBuffer getFromMetadata(Utf8 key) {
- if (metadata == null) { return null; }
- return metadata.get(key);
+
+ /**
+ * Sets the value of the 'batchId' field.
+ * @param value the value to set.
+ */
+ public void setBatchId(CharSequence value) {
+ this.batchId = value;
+ setDirty(24);
+ }
+
+ /**
+ * Checks the dirty status of the 'batchId' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isBatchIdDirty(CharSequence value) {
+ return isDirty(24);
}
- public void putToMetadata(Utf8 key, ByteBuffer value) {
- getStateManager().setDirty(this, 22);
- metadata.put(key, value);
+
+ /** Creates a new WebPage RecordBuilder */
+ public static Builder newBuilder() {
+ return new Builder();
+ }
+
+ /** Creates a new WebPage RecordBuilder by copying an existing Builder */
+ public static Builder newBuilder(Builder other) {
+ return new Builder(other);
+ }
+
+ /** Creates a new WebPage RecordBuilder by copying an existing WebPage instance */
+ public static Builder newBuilder(WebPage other) {
+ return new Builder(other);
+ }
+
+ private static java.nio.ByteBuffer deepCopyToWriteOnlyBuffer(
+ java.nio.ByteBuffer input) {
+ java.nio.ByteBuffer copy = java.nio.ByteBuffer.allocate(input.capacity());
+ int position = input.position();
+ input.reset();
+ int mark = input.position();
+ int limit = input.limit();
+ input.rewind();
+ input.limit(input.capacity());
+ copy.put(input);
+ input.rewind();
+ copy.rewind();
+ input.position(mark);
+ input.mark();
+ copy.position(mark);
+ copy.mark();
+ input.position(position);
+ copy.position(position);
+ input.limit(limit);
+ copy.limit(limit);
+ return copy.asReadOnlyBuffer();
+ }
+
+ /**
+ * RecordBuilder for WebPage instances.
+ */
+ public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<WebPage>
+ implements org.apache.avro.data.RecordBuilder<WebPage> {
+
+ private java.nio.ByteBuffer __g__dirty;
+ private CharSequence baseUrl;
+ private int status;
+ private long fetchTime;
+ private long prevFetchTime;
+ private int fetchInterval;
+ private int retriesSinceFetch;
+ private long modifiedTime;
+ private long prevModifiedTime;
+ private ProtocolStatus protocolStatus;
+ private java.nio.ByteBuffer content;
+ private CharSequence contentType;
+ private java.nio.ByteBuffer prevSignature;
+ private java.nio.ByteBuffer signature;
+ private CharSequence title;
+ private CharSequence text;
+ private ParseStatus parseStatus;
+ private float score;
+ private CharSequence reprUrl;
+ private java.util.Map<CharSequence,CharSequence> headers;
+ private java.util.Map<CharSequence,CharSequence> outlinks;
+ private java.util.Map<CharSequence,CharSequence> inlinks;
+ private java.util.Map<CharSequence,CharSequence> markers;
+ private java.util.Map<CharSequence,java.nio.ByteBuffer> metadata;
+ private CharSequence batchId;
+
+ /** Creates a new Builder */
+ private Builder() {
+ super(WebPage.SCHEMA$);
+ }
+
+ /** Creates a Builder by copying an existing Builder */
+ private Builder(Builder other) {
+ super(other);
+ }
+
+ /** Creates a Builder by copying an existing WebPage instance */
+ private Builder(WebPage other) {
+ super(WebPage.SCHEMA$);
+ if (isValidValue(fields()[0], other.__g__dirty)) {
+ this.__g__dirty = (java.nio.ByteBuffer) data().deepCopy(fields()[0].schema(), other.__g__dirty);
+ fieldSetFlags()[0] = true;
+ }
+ if (isValidValue(fields()[1], other.baseUrl)) {
+ this.baseUrl = (CharSequence) data().deepCopy(fields()[1].schema(), other.baseUrl);
+ fieldSetFlags()[1] = true;
+ }
+ if (isValidValue(fields()[2], other.status)) {
+ this.status = (Integer) data().deepCopy(fields()[2].schema(), other.status);
+ fieldSetFlags()[2] = true;
+ }
+ if (isValidValue(fields()[3], other.fetchTime)) {
+ this.fetchTime = (Long) data().deepCopy(fields()[3].schema(), other.fetchTime);
+ fieldSetFlags()[3] = true;
+ }
+ if (isValidValue(fields()[4], other.prevFetchTime)) {
+ this.prevFetchTime = (Long) data().deepCopy(fields()[4].schema(), other.prevFetchTime);
+ fieldSetFlags()[4] = true;
+ }
+ if (isValidValue(fields()[5], other.fetchInterval)) {
+ this.fetchInterval = (Integer) data().deepCopy(fields()[5].schema(), other.fetchInterval);
+ fieldSetFlags()[5] = true;
+ }
+ if (isValidValue(fields()[6], other.retriesSinceFetch)) {
+ this.retriesSinceFetch = (Integer) data().deepCopy(fields()[6].schema(), other.retriesSinceFetch);
+ fieldSetFlags()[6] = true;
+ }
+ if (isValidValue(fields()[7], other.modifiedTime)) {
+ this.modifiedTime = (Long) data().deepCopy(fields()[7].schema(), other.modifiedTime);
+ fieldSetFlags()[7] = true;
+ }
+ if (isValidValue(fields()[8], other.prevModifiedTime)) {
+ this.prevModifiedTime = (Long) data().deepCopy(fields()[8].schema(), other.prevModifiedTime);
+ fieldSetFlags()[8] = true;
+ }
+ if (isValidValue(fields()[9], other.protocolStatus)) {
+ this.protocolStatus = (ProtocolStatus) data().deepCopy(fields()[9].schema(), other.protocolStatus);
+ fieldSetFlags()[9] = true;
+ }
+ if (isValidValue(fields()[10], other.content)) {
+ this.content = (java.nio.ByteBuffer) data().deepCopy(fields()[10].schema(), other.content);
+ fieldSetFlags()[10] = true;
+ }
+ if (isValidValue(fields()[11], other.contentType)) {
+ this.contentType = (CharSequence) data().deepCopy(fields()[11].schema(), other.contentType);
+ fieldSetFlags()[11] = true;
+ }
+ if (isValidValue(fields()[12], other.prevSignature)) {
+ this.prevSignature = (java.nio.ByteBuffer) data().deepCopy(fields()[12].schema(), other.prevSignature);
+ fieldSetFlags()[12] = true;
+ }
+ if (isValidValue(fields()[13], other.signature)) {
+ this.signature = (java.nio.ByteBuffer) data().deepCopy(fields()[13].schema(), other.signature);
+ fieldSetFlags()[13] = true;
+ }
+ if (isValidValue(fields()[14], other.title)) {
+ this.title = (CharSequence) data().deepCopy(fields()[14].schema(), other.title);
+ fieldSetFlags()[14] = true;
+ }
+ if (isValidValue(fields()[15], other.text)) {
+ this.text = (CharSequence) data().deepCopy(fields()[15].schema(), other.text);
+ fieldSetFlags()[15] = true;
+ }
+ if (isValidValue(fields()[16], other.parseStatus)) {
+ this.parseStatus = (ParseStatus) data().deepCopy(fields()[16].schema(), other.parseStatus);
+ fieldSetFlags()[16] = true;
+ }
+ if (isValidValue(fields()[17], other.score)) {
+ this.score = (Float) data().deepCopy(fields()[17].schema(), other.score);
+ fieldSetFlags()[17] = true;
+ }
+ if (isValidValue(fields()[18], other.reprUrl)) {
+ this.reprUrl = (CharSequence) data().deepCopy(fields()[18].schema(), other.reprUrl);
+ fieldSetFlags()[18] = true;
+ }
+ if (isValidValue(fields()[19], other.headers)) {
+ this.headers = (java.util.Map<CharSequence,CharSequence>) data().deepCopy(fields()[19].schema(), other.headers);
+ fieldSetFlags()[19] = true;
+ }
+ if (isValidValue(fields()[20], other.outlinks)) {
+ this.outlinks = (java.util.Map<CharSequence,CharSequence>) data().deepCopy(fields()[20].schema(), other.outlinks);
+ fieldSetFlags()[20] = true;
+ }
+ if (isValidValue(fields()[21], other.inlinks)) {
+ this.inlinks = (java.util.Map<CharSequence,CharSequence>) data().deepCopy(fields()[21].schema(), other.inlinks);
+ fieldSetFlags()[21] = true;
+ }
+ if (isValidValue(fields()[22], other.markers)) {
+ this.markers = (java.util.Map<CharSequence,CharSequence>) data().deepCopy(fields()[22].schema(), other.markers);
+ fieldSetFlags()[22] = true;
+ }
+ if (isValidValue(fields()[23], other.metadata)) {
+ this.metadata = (java.util.Map<CharSequence,java.nio.ByteBuffer>) data().deepCopy(fields()[23].schema(), other.metadata);
+ fieldSetFlags()[23] = true;
+ }
+ if (isValidValue(fields()[24], other.batchId)) {
+ this.batchId = (CharSequence) data().deepCopy(fields()[24].schema(), other.batchId);
+ fieldSetFlags()[24] = true;
+ }
+ }
+
+ /** Gets the value of the 'baseUrl' field */
+ public CharSequence getBaseUrl() {
+ return baseUrl;
+ }
+
+ /** Sets the value of the 'baseUrl' field */
+ public Builder setBaseUrl(CharSequence value) {
+ validate(fields()[1], value);
+ this.baseUrl = value;
+ fieldSetFlags()[1] = true;
+ return this;
+ }
+
+ /** Checks whether the 'baseUrl' field has been set */
+ public boolean hasBaseUrl() {
+ return fieldSetFlags()[1];
+ }
+
+ /** Clears the value of the 'baseUrl' field */
+ public Builder clearBaseUrl() {
+ baseUrl = null;
+ fieldSetFlags()[1] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'status' field */
+ public Integer getStatus() {
+ return status;
+ }
+
+ /** Sets the value of the 'status' field */
+ public Builder setStatus(int value) {
+ validate(fields()[2], value);
+ this.status = value;
+ fieldSetFlags()[2] = true;
+ return this;
+ }
+
+ /** Checks whether the 'status' field has been set */
+ public boolean hasStatus() {
+ return fieldSetFlags()[2];
+ }
+
+ /** Clears the value of the 'status' field */
+ public Builder clearStatus() {
+ fieldSetFlags()[2] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'fetchTime' field */
+ public Long getFetchTime() {
+ return fetchTime;
+ }
+
+ /** Sets the value of the 'fetchTime' field */
+ public Builder setFetchTime(long value) {
+ validate(fields()[3], value);
+ this.fetchTime = value;
+ fieldSetFlags()[3] = true;
+ return this;
+ }
+
+ /** Checks whether the 'fetchTime' field has been set */
+ public boolean hasFetchTime() {
+ return fieldSetFlags()[3];
+ }
+
+ /** Clears the value of the 'fetchTime' field */
+ public Builder clearFetchTime() {
+ fieldSetFlags()[3] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'prevFetchTime' field */
+ public Long getPrevFetchTime() {
+ return prevFetchTime;
+ }
+
+ /** Sets the value of the 'prevFetchTime' field */
+ public Builder setPrevFetchTime(long value) {
+ validate(fields()[4], value);
+ this.prevFetchTime = value;
+ fieldSetFlags()[4] = true;
+ return this;
+ }
+
+ /** Checks whether the 'prevFetchTime' field has been set */
+ public boolean hasPrevFetchTime() {
+ return fieldSetFlags()[4];
+ }
+
+ /** Clears the value of the 'prevFetchTime' field */
+ public Builder clearPrevFetchTime() {
+ fieldSetFlags()[4] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'fetchInterval' field */
+ public Integer getFetchInterval() {
+ return fetchInterval;
+ }
+
+ /** Sets the value of the 'fetchInterval' field */
+ public Builder setFetchInterval(int value) {
+ validate(fields()[5], value);
+ this.fetchInterval = value;
+ fieldSetFlags()[5] = true;
+ return this;
+ }
+
+ /** Checks whether the 'fetchInterval' field has been set */
+ public boolean hasFetchInterval() {
+ return fieldSetFlags()[5];
+ }
+
+ /** Clears the value of the 'fetchInterval' field */
+ public Builder clearFetchInterval() {
+ fieldSetFlags()[5] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'retriesSinceFetch' field */
+ public Integer getRetriesSinceFetch() {
+ return retriesSinceFetch;
+ }
+
+ /** Sets the value of the 'retriesSinceFetch' field */
+ public Builder setRetriesSinceFetch(int value) {
+ validate(fields()[6], value);
+ this.retriesSinceFetch = value;
+ fieldSetFlags()[6] = true;
+ return this;
+ }
+
+ /** Checks whether the 'retriesSinceFetch' field has been set */
+ public boolean hasRetriesSinceFetch() {
+ return fieldSetFlags()[6];
+ }
+
+ /** Clears the value of the 'retriesSinceFetch' field */
+ public Builder clearRetriesSinceFetch() {
+ fieldSetFlags()[6] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'modifiedTime' field */
+ public Long getModifiedTime() {
+ return modifiedTime;
+ }
+
+ /** Sets the value of the 'modifiedTime' field */
+ public Builder setModifiedTime(long value) {
+ validate(fields()[7], value);
+ this.modifiedTime = value;
+ fieldSetFlags()[7] = true;
+ return this;
+ }
+
+ /** Checks whether the 'modifiedTime' field has been set */
+ public boolean hasModifiedTime() {
+ return fieldSetFlags()[7];
+ }
+
+ /** Clears the value of the 'modifiedTime' field */
+ public Builder clearModifiedTime() {
+ fieldSetFlags()[7] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'prevModifiedTime' field */
+ public Long getPrevModifiedTime() {
+ return prevModifiedTime;
+ }
+
+ /** Sets the value of the 'prevModifiedTime' field */
+ public Builder setPrevModifiedTime(long value) {
+ validate(fields()[8], value);
+ this.prevModifiedTime = value;
+ fieldSetFlags()[8] = true;
+ return this;
+ }
+
+ /** Checks whether the 'prevModifiedTime' field has been set */
+ public boolean hasPrevModifiedTime() {
+ return fieldSetFlags()[8];
+ }
+
+ /** Clears the value of the 'prevModifiedTime' field */
+ public Builder clearPrevModifiedTime() {
+ fieldSetFlags()[8] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'protocolStatus' field */
+ public ProtocolStatus getProtocolStatus() {
+ return protocolStatus;
+ }
+
+ /** Sets the value of the 'protocolStatus' field */
+ public Builder setProtocolStatus(ProtocolStatus value) {
+ validate(fields()[9], value);
+ this.protocolStatus = value;
+ fieldSetFlags()[9] = true;
+ return this;
+ }
+
+ /** Checks whether the 'protocolStatus' field has been set */
+ public boolean hasProtocolStatus() {
+ return fieldSetFlags()[9];
+ }
+
+ /** Clears the value of the 'protocolStatus' field */
+ public Builder clearProtocolStatus() {
+ protocolStatus = null;
+ fieldSetFlags()[9] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'content' field */
+ public java.nio.ByteBuffer getContent() {
+ return content;
+ }
+
+ /** Sets the value of the 'content' field */
+ public Builder setContent(java.nio.ByteBuffer value) {
+ validate(fields()[10], value);
+ this.content = value;
+ fieldSetFlags()[10] = true;
+ return this;
+ }
+
+ /** Checks whether the 'content' field has been set */
+ public boolean hasContent() {
+ return fieldSetFlags()[10];
+ }
+
+ /** Clears the value of the 'content' field */
+ public Builder clearContent() {
+ content = null;
+ fieldSetFlags()[10] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'contentType' field */
+ public CharSequence getContentType() {
+ return contentType;
+ }
+
+ /** Sets the value of the 'contentType' field */
+ public Builder setContentType(CharSequence value) {
+ validate(fields()[11], value);
+ this.contentType = value;
+ fieldSetFlags()[11] = true;
+ return this;
+ }
+
+ /** Checks whether the 'contentType' field has been set */
+ public boolean hasContentType() {
+ return fieldSetFlags()[11];
+ }
+
+ /** Clears the value of the 'contentType' field */
+ public Builder clearContentType() {
+ contentType = null;
+ fieldSetFlags()[11] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'prevSignature' field */
+ public java.nio.ByteBuffer getPrevSignature() {
+ return prevSignature;
+ }
+
+ /** Sets the value of the 'prevSignature' field */
+ public Builder setPrevSignature(java.nio.ByteBuffer value) {
+ validate(fields()[12], value);
+ this.prevSignature = value;
+ fieldSetFlags()[12] = true;
+ return this;
+ }
+
+ /** Checks whether the 'prevSignature' field has been set */
+ public boolean hasPrevSignature() {
+ return fieldSetFlags()[12];
+ }
+
+ /** Clears the value of the 'prevSignature' field */
+ public Builder clearPrevSignature() {
+ prevSignature = null;
+ fieldSetFlags()[12] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'signature' field */
+ public java.nio.ByteBuffer getSignature() {
+ return signature;
+ }
+
+ /** Sets the value of the 'signature' field */
+ public Builder setSignature(java.nio.ByteBuffer value) {
+ validate(fields()[13], value);
+ this.signature = value;
+ fieldSetFlags()[13] = true;
+ return this;
+ }
+
+ /** Checks whether the 'signature' field has been set */
+ public boolean hasSignature() {
+ return fieldSetFlags()[13];
+ }
+
+ /** Clears the value of the 'signature' field */
+ public Builder clearSignature() {
+ signature = null;
+ fieldSetFlags()[13] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'title' field */
+ public CharSequence getTitle() {
+ return title;
+ }
+
+ /** Sets the value of the 'title' field */
+ public Builder setTitle(CharSequence value) {
+ validate(fields()[14], value);
+ this.title = value;
+ fieldSetFlags()[14] = true;
+ return this;
+ }
+
+ /** Checks whether the 'title' field has been set */
+ public boolean hasTitle() {
+ return fieldSetFlags()[14];
+ }
+
+ /** Clears the value of the 'title' field */
+ public Builder clearTitle() {
+ title = null;
+ fieldSetFlags()[14] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'text' field */
+ public CharSequence getText() {
+ return text;
+ }
+
+ /** Sets the value of the 'text' field */
+ public Builder setText(CharSequence value) {
+ validate(fields()[15], value);
+ this.text = value;
+ fieldSetFlags()[15] = true;
+ return this;
+ }
+
+ /** Checks whether the 'text' field has been set */
+ public boolean hasText() {
+ return fieldSetFlags()[15];
+ }
+
+ /** Clears the value of the 'text' field */
+ public Builder clearText() {
+ text = null;
+ fieldSetFlags()[15] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'parseStatus' field */
+ public ParseStatus getParseStatus() {
+ return parseStatus;
+ }
+
+ /** Sets the value of the 'parseStatus' field */
+ public Builder setParseStatus(ParseStatus value) {
+ validate(fields()[16], value);
+ this.parseStatus = value;
+ fieldSetFlags()[16] = true;
+ return this;
+ }
+
+ /** Checks whether the 'parseStatus' field has been set */
+ public boolean hasParseStatus() {
+ return fieldSetFlags()[16];
+ }
+
+ /** Clears the value of the 'parseStatus' field */
+ public Builder clearParseStatus() {
+ parseStatus = null;
+ fieldSetFlags()[16] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'score' field */
+ public Float getScore() {
+ return score;
+ }
+
+ /** Sets the value of the 'score' field */
+ public Builder setScore(float value) {
+ validate(fields()[17], value);
+ this.score = value;
+ fieldSetFlags()[17] = true;
+ return this;
+ }
+
+ /** Checks whether the 'score' field has been set */
+ public boolean hasScore() {
+ return fieldSetFlags()[17];
+ }
+
+ /** Clears the value of the 'score' field */
+ public Builder clearScore() {
+ fieldSetFlags()[17] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'reprUrl' field */
+ public CharSequence getReprUrl() {
+ return reprUrl;
+ }
+
+ /** Sets the value of the 'reprUrl' field */
+ public Builder setReprUrl(CharSequence value) {
+ validate(fields()[18], value);
+ this.reprUrl = value;
+ fieldSetFlags()[18] = true;
+ return this;
+ }
+
+ /** Checks whether the 'reprUrl' field has been set */
+ public boolean hasReprUrl() {
+ return fieldSetFlags()[18];
+ }
+
+ /** Clears the value of the 'reprUrl' field */
+ public Builder clearReprUrl() {
+ reprUrl = null;
+ fieldSetFlags()[18] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'headers' field */
+ public java.util.Map<CharSequence,CharSequence> getHeaders() {
+ return headers;
+ }
+
+ /** Sets the value of the 'headers' field */
+ public Builder setHeaders(java.util.Map<CharSequence,CharSequence> value) {
+ validate(fields()[19], value);
+ this.headers = value;
+ fieldSetFlags()[19] = true;
+ return this;
+ }
+
+ /** Checks whether the 'headers' field has been set */
+ public boolean hasHeaders() {
+ return fieldSetFlags()[19];
+ }
+
+ /** Clears the value of the 'headers' field */
+ public Builder clearHeaders() {
+ headers = null;
+ fieldSetFlags()[19] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'outlinks' field */
+ public java.util.Map<CharSequence,CharSequence> getOutlinks() {
+ return outlinks;
+ }
+
+ /** Sets the value of the 'outlinks' field */
+ public Builder setOutlinks(java.util.Map<CharSequence,CharSequence> value) {
+ validate(fields()[20], value);
+ this.outlinks = value;
+ fieldSetFlags()[20] = true;
+ return this;
+ }
+
+ /** Checks whether the 'outlinks' field has been set */
+ public boolean hasOutlinks() {
+ return fieldSetFlags()[20];
+ }
+
+ /** Clears the value of the 'outlinks' field */
+ public Builder clearOutlinks() {
+ outlinks = null;
+ fieldSetFlags()[20] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'inlinks' field */
+ public java.util.Map<CharSequence,CharSequence> getInlinks() {
+ return inlinks;
+ }
+
+ /** Sets the value of the 'inlinks' field */
+ public Builder setInlinks(java.util.Map<CharSequence,CharSequence> value) {
+ validate(fields()[21], value);
+ this.inlinks = value;
+ fieldSetFlags()[21] = true;
+ return this;
+ }
+
+ /** Checks whether the 'inlinks' field has been set */
+ public boolean hasInlinks() {
+ return fieldSetFlags()[21];
+ }
+
+ /** Clears the value of the 'inlinks' field */
+ public Builder clearInlinks() {
+ inlinks = null;
+ fieldSetFlags()[21] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'markers' field */
+ public java.util.Map<CharSequence,CharSequence> getMarkers() {
+ return markers;
+ }
+
+ /** Sets the value of the 'markers' field */
+ public Builder setMarkers(java.util.Map<CharSequence,CharSequence> value) {
+ validate(fields()[22], value);
+ this.markers = value;
+ fieldSetFlags()[22] = true;
+ return this;
+ }
+
+ /** Checks whether the 'markers' field has been set */
+ public boolean hasMarkers() {
+ return fieldSetFlags()[22];
+ }
+
+ /** Clears the value of the 'markers' field */
+ public Builder clearMarkers() {
+ markers = null;
+ fieldSetFlags()[22] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'metadata' field */
+ public java.util.Map<CharSequence,java.nio.ByteBuffer> getMetadata() {
+ return metadata;
+ }
+
+ /** Sets the value of the 'metadata' field */
+ public Builder setMetadata(java.util.Map<CharSequence,java.nio.ByteBuffer> value) {
+ validate(fields()[23], value);
+ this.metadata = value;
+ fieldSetFlags()[23] = true;
+ return this;
+ }
+
+ /** Checks whether the 'metadata' field has been set */
+ public boolean hasMetadata() {
+ return fieldSetFlags()[23];
+ }
+
+ /** Clears the value of the 'metadata' field */
+ public Builder clearMetadata() {
+ metadata = null;
+ fieldSetFlags()[23] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'batchId' field */
+ public CharSequence getBatchId() {
+ return batchId;
+ }
+
+ /** Sets the value of the 'batchId' field */
+ public Builder setBatchId(CharSequence value) {
+ validate(fields()[24], value);
+ this.batchId = value;
+ fieldSetFlags()[24] = true;
+ return this;
+ }
+
+ /** Checks whether the 'batchId' field has been set */
+ public boolean hasBatchId() {
+ return fieldSetFlags()[24];
+ }
+
+ /** Clears the value of the 'batchId' field */
+ public Builder clearBatchId() {
+ batchId = null;
+ fieldSetFlags()[24] = false;
+ return this;
+ }
+
+ @Override
+ public WebPage build() {
+ try {
+ WebPage record = new WebPage();
+ record.__g__dirty = fieldSetFlags()[0] ? this.__g__dirty : (java.nio.ByteBuffer) java.nio.ByteBuffer.wrap(new byte[4]);
+ record.baseUrl = fieldSetFlags()[1] ? this.baseUrl : (CharSequence) defaultValue(fields()[1]);
+ record.status = fieldSetFlags()[2] ? this.status : (Integer) defaultValue(fields()[2]);
+ record.fetchTime = fieldSetFlags()[3] ? this.fetchTime : (Long) defaultValue(fields()[3]);
+ record.prevFetchTime = fieldSetFlags()[4] ? this.prevFetchTime : (Long) defaultValue(fields()[4]);
+ record.fetchInterval = fieldSetFlags()[5] ? this.fetchInterval : (Integer) defaultValue(fields()[5]);
+ record.retriesSinceFetch = fieldSetFlags()[6] ? this.retriesSinceFetch : (Integer) defaultValue(fields()[6]);
+ record.modifiedTime = fieldSetFlags()[7] ? this.modifiedTime : (Long) defaultValue(fields()[7]);
+ record.prevModifiedTime = fieldSetFlags()[8] ? this.prevModifiedTime : (Long) defaultValue(fields()[8]);
+ record.protocolStatus = fieldSetFlags()[9] ? this.protocolStatus : (ProtocolStatus) defaultValue(fields()[9]);
+ record.content = fieldSetFlags()[10] ? this.content : (java.nio.ByteBuffer) defaultValue(fields()[10]);
+ record.contentType = fieldSetFlags()[11] ? this.contentType : (CharSequence) defaultValue(fields()[11]);
+ record.prevSignature = fieldSetFlags()[12] ? this.prevSignature : (java.nio.ByteBuffer) defaultValue(fields()[12]);
+ record.signature = fieldSetFlags()[13] ? this.signature : (java.nio.ByteBuffer) defaultValue(fields()[13]);
+ record.title = fieldSetFlags()[14] ? this.title : (CharSequence) defaultValue(fields()[14]);
+ record.text = fieldSetFlags()[15] ? this.text : (CharSequence) defaultValue(fields()[15]);
+ record.parseStatus = fieldSetFlags()[16] ? this.parseStatus : (ParseStatus) defaultValue(fields()[16]);
+ record.score = fieldSetFlags()[17] ? this.score : (Float) defaultValue(fields()[17]);
+ record.reprUrl = fieldSetFlags()[18] ? this.reprUrl : (CharSequence) defaultValue(fields()[18]);
+ record.headers = fieldSetFlags()[19] ? this.headers : (java.util.Map<CharSequence,CharSequence>) new org.apache.gora.persistency.impl.DirtyMapWrapper((java.util.Map)defaultValue(fields()[19]));
+ record.outlinks = fieldSetFlags()[20] ? this.outlinks : (java.util.Map<CharSequence,CharSequence>) new org.apache.gora.persistency.impl.DirtyMapWrapper((java.util.Map)defaultValue(fields()[20]));
+ record.inlinks = fieldSetFlags()[21] ? this.inlinks : (java.util.Map<CharSequence,CharSequence>) new org.apache.gora.persistency.impl.DirtyMapWrapper((java.util.Map)defaultValue(fields()[21]));
+ record.markers = fieldSetFlags()[22] ? this.markers : (java.util.Map<CharSequence,CharSequence>) new org.apache.gora.persistency.impl.DirtyMapWrapper((java.util.Map)defaultValue(fields()[22]));
+ record.metadata = fieldSetFlags()[23] ? this.metadata : (java.util.Map<CharSequence,java.nio.ByteBuffer>) new org.apache.gora.persistency.impl.DirtyMapWrapper((java.util.Map)defaultValue(fields()[23]));
+ record.batchId = fieldSetFlags()[24] ? this.batchId : (CharSequence) defaultValue(fields()[24]);
+ return record;
+ } catch (Exception e) {
+ throw new org.apache.avro.AvroRuntimeException(e);
+ }
+ }
}
- public ByteBuffer removeFromMetadata(Utf8 key) {
- if (metadata == null) { return null; }
- getStateManager().setDirty(this, 22);
- return metadata.remove(key);
+
+ public Tombstone getTombstone(){
+ return TOMBSTONE;
}
- public Utf8 getBatchId() {
- return (Utf8) get(23);
+
+ public WebPage newInstance(){
+ return newBuilder().build();
}
- public void setBatchId(Utf8 value) {
- put(23, value);
+
+ private static final Tombstone TOMBSTONE = new Tombstone();
+
+ public static final class Tombstone extends WebPage implements org.apache.gora.persistency.Tombstone {
+
+ private Tombstone() { }
+
+ /**
+ * Gets the value of the 'baseUrl' field.
+ */
+ public CharSequence getBaseUrl() {
+ throw new UnsupportedOperationException("Get is not supported on tombstones");
+ }
+
+ /**
+ * Sets the value of the 'baseUrl' field.
+ * @param value the value to set.
+ */
+ public void setBaseUrl(CharSequence value) {
+ throw new UnsupportedOperationException("Set is not supported on tombstones");
+ }
+
+ /**
+ * Checks the dirty status of the 'baseUrl' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isBaseUrlDirty(CharSequence value) {
+ throw new UnsupportedOperationException("IsDirty is not supported on tombstones");
+ }
+
+ /**
+ * Gets the value of the 'status' field.
+ */
+ public Integer getStatus() {
+ throw new UnsupportedOperationException("Get is not supported on tombstones");
+ }
+
+ /**
+ * Sets the value of the 'status' field.
+ * @param value the value to set.
+ */
+ public void setStatus(Integer value) {
+ throw new UnsupportedOperationException("Set is not supported on tombstones");
+ }
+
+ /**
+ * Checks the dirty status of the 'status' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isStatusDirty(Integer value) {
+ throw new UnsupportedOperationException("IsDirty is not supported on tombstones");
+ }
+
+ /**
+ * Gets the value of the 'fetchTime' field.
+ */
+ public Long getFetchTime() {
+ throw new UnsupportedOperationException("Get is not supported on tombstones");
+ }
+
+ /**
+ * Sets the value of the 'fetchTime' field.
+ * @param value the value to set.
+ */
+ public void setFetchTime(Long value) {
+ throw new UnsupportedOperationException("Set is not supported on tombstones");
+ }
+
+ /**
+ * Checks the dirty status of the 'fetchTime' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isFetchTimeDirty(Long value) {
+ throw new UnsupportedOperationException("IsDirty is not supported on tombstones");
+ }
+
+ /**
+ * Gets the value of the 'prevFetchTime' field.
+ */
+ public Long getPrevFetchTime() {
+ throw new UnsupportedOperationException("Get is not supported on tombstones");
+ }
+
+ /**
+ * Sets the value of the 'prevFetchTime' field.
+ * @param value the value to set.
+ */
+ public void setPrevFetchTime(Long value) {
+ throw new UnsupportedOperationException("Set is not supported on tombstones");
+ }
+
+ /**
+ * Checks the dirty status of the 'prevFetchTime' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isPrevFetchTimeDirty(Long value) {
+ throw new UnsupportedOperationException("IsDirty is not supported on tombstones");
+ }
+
+ /**
+ * Gets the value of the 'fetchInterval' field.
+ */
+ public Integer getFetchInterval() {
+ throw new UnsupportedOperationException("Get is not supported on tombstones");
+ }
+
+ /**
+ * Sets the value of the 'fetchInterval' field.
+ * @param value the value to set.
+ */
+ public void setFetchInterval(Integer value) {
+ throw new UnsupportedOperationException("Set is not supported on tombstones");
+ }
+
+ /**
+ * Checks the dirty status of the 'fetchInterval' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isFetchIntervalDirty(Integer value) {
+ throw new UnsupportedOperationException("IsDirty is not supported on tombstones");
+ }
+
+ /**
+ * Gets the value of the 'retriesSinceFetch' field.
+ */
+ public Integer getRetriesSinceFetch() {
+ throw new UnsupportedOperationException("Get is not supported on tombstones");
+ }
+
+ /**
+ * Sets the value of the 'retriesSinceFetch' field.
+ * @param value the value to set.
+ */
+ public void setRetriesSinceFetch(Integer value) {
+ throw new UnsupportedOperationException("Set is not supported on tombstones");
+ }
+
+ /**
+ * Checks the dirty status of the 'retriesSinceFetch' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isRetriesSinceFetchDirty(Integer value) {
+ throw new UnsupportedOperationException("IsDirty is not supported on tombstones");
+ }
+
+ /**
+ * Gets the value of the 'modifiedTime' field.
+ */
+ public Long getModifiedTime() {
+ throw new UnsupportedOperationException("Get is not supported on tombstones");
+ }
+
+ /**
+ * Sets the value of the 'modifiedTime' field.
+ * @param value the value to set.
+ */
+ public void setModifiedTime(Long value) {
+ throw new UnsupportedOperationException("Set is not supported on tombstones");
+ }
+
+ /**
+ * Checks the dirty status of the 'modifiedTime' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isModifiedTimeDirty(Long value) {
+ throw new UnsupportedOperationException("IsDirty is not supported on tombstones");
+ }
+
+ /**
+ * Gets the value of the 'prevModifiedTime' field.
+ */
+ public Long getPrevModifiedTime() {
+ throw new UnsupportedOperationException("Get is not supported on tombstones");
+ }
+
+ /**
+ * Sets the value of the 'prevModifiedTime' field.
+ * @param value the value to set.
+ */
+ public void setPrevModifiedTime(Long value) {
+ throw new UnsupportedOperationException("Set is not supported on tombstones");
+ }
+
+ /**
+ * Checks the dirty status of the 'prevModifiedTime' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isPrevModifiedTimeDirty(Long value) {
+ throw new UnsupportedOperationException("IsDirty is not supported on tombstones");
+ }
+
+ /**
+ * Gets the value of the 'protocolStatus' field.
+ */
+ public ProtocolStatus getProtocolStatus() {
+ throw new UnsupportedOperationException("Get is not supported on tombstones");
+ }
+
+ /**
+ * Sets the value of the 'protocolStatus' field.
+ * @param value the value to set.
+ */
+ public void setProtocolStatus(ProtocolStatus value) {
+ throw new UnsupportedOperationException("Set is not supported on tombstones");
+ }
+
+ /**
+ * Checks the dirty status of the 'protocolStatus' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isProtocolStatusDirty(ProtocolStatus value) {
+ throw new UnsupportedOperationException("IsDirty is not supported on tombstones");
+ }
+
+ /**
+ * Gets the value of the 'content' field.
+ */
+ public java.nio.ByteBuffer getContent() {
+ throw new UnsupportedOperationException("Get is not supported on tombstones");
+ }
+
+ /**
+ * Sets the value of the 'content' field.
+ * @param value the value to set.
+ */
+ public void setContent(java.nio.ByteBuffer value) {
+ throw new UnsupportedOperationException("Set is not supported on tombstones");
+ }
+
+ /**
+ * Checks the dirty status of the 'content' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isContentDirty(java.nio.ByteBuffer value) {
+ throw new UnsupportedOperationException("IsDirty is not supported on tombstones");
+ }
+
+ /**
+ * Gets the value of the 'contentType' field.
+ */
+ public CharSequence getContentType() {
+ throw new UnsupportedOperationException("Get is not supported on tombstones");
+ }
+
+ /**
+ * Sets the value of the 'contentType' field.
+ * @param value the value to set.
+ */
+ public void setContentType(CharSequence value) {
+ throw new UnsupportedOperationException("Set is not supported on tombstones");
+ }
+
+ /**
+ * Checks the dirty status of the 'contentType' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isContentTypeDirty(CharSequence value) {
+ throw new UnsupportedOperationException("IsDirty is not supported on tombstones");
+ }
+
+ /**
+ * Gets the value of the 'prevSignature' field.
+ */
+ public java.nio.ByteBuffer getPrevSignature() {
+ throw new UnsupportedOperationException("Get is not supported on tombstones");
+ }
+
+ /**
+ * Sets the value of the 'prevSignature' field.
+ * @param value the value to set.
+ */
+ public void setPrevSignature(java.nio.ByteBuffer value) {
+ throw new UnsupportedOperationException("Set is not supported on tombstones");
+ }
+
+ /**
+ * Checks the dirty status of the 'prevSignature' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isPrevSignatureDirty(java.nio.ByteBuffer value) {
+ throw new UnsupportedOperationException("IsDirty is not supported on tombstones");
+ }
+
+ /**
+ * Gets the value of the 'signature' field.
+ */
+ public java.nio.ByteBuffer getSignature() {
+ throw new UnsupportedOperationException("Get is not supported on tombstones");
+ }
+
+ /**
+ * Sets the value of the 'signature' field.
+ * @param value the value to set.
+ */
+ public void setSignature(java.nio.ByteBuffer value) {
+ throw new UnsupportedOperationException("Set is not supported on tombstones");
+ }
+
+ /**
+ * Checks the dirty status of the 'signature' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isSignatureDirty(java.nio.ByteBuffer value) {
+ throw new UnsupportedOperationException("IsDirty is not supported on tombstones");
+ }
+
+ /**
+ * Gets the value of the 'title' field.
+ */
+ public CharSequence getTitle() {
+ throw new UnsupportedOperationException("Get is not supported on tombstones");
+ }
+
+ /**
+ * Sets the value of the 'title' field.
+ * @param value the value to set.
+ */
+ public void setTitle(CharSequence value) {
+ throw new UnsupportedOperationException("Set is not supported on tombstones");
+ }
+
+ /**
+ * Checks the dirty status of the 'title' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isTitleDirty(CharSequence value) {
+ throw new UnsupportedOperationException("IsDirty is not supported on tombstones");
+ }
+
+ /**
+ * Gets the value of the 'text' field.
+ */
+ public CharSequence getText() {
+ throw new UnsupportedOperationException("Get is not supported on tombstones");
+ }
+
+ /**
+ * Sets the value of the 'text' field.
+ * @param value the value to set.
+ */
+ public void setText(CharSequence value) {
+ throw new UnsupportedOperationException("Set is not supported on tombstones");
+ }
+
+ /**
+ * Checks the dirty status of the 'text' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isTextDirty(CharSequence value) {
+ throw new UnsupportedOperationException("IsDirty is not supported on tombstones");
+ }
+
+ /**
+ * Gets the value of the 'parseStatus' field.
+ */
+ public ParseStatus getParseStatus() {
+ throw new UnsupportedOperationException("Get is not supported on tombstones");
+ }
+
+ /**
+ * Sets the value of the 'parseStatus' field.
+ * @param value the value to set.
+ */
+ public void setParseStatus(ParseStatus value) {
+ throw new UnsupportedOperationException("Set is not supported on tombstones");
+ }
+
+ /**
+ * Checks the dirty status of the 'parseStatus' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isParseStatusDirty(ParseStatus value) {
+ throw new UnsupportedOperationException("IsDirty is not supported on tombstones");
+ }
+
+ /**
+ * Gets the value of the 'score' field.
+ */
+ public Float getScore() {
+ throw new UnsupportedOperationException("Get is not supported on tombstones");
+ }
+
+ /**
+ * Sets the value of the 'score' field.
+ * @param value the value to set.
+ */
+ public void setScore(Float value) {
+ throw new UnsupportedOperationException("Set is not supported on tombstones");
+ }
+
+ /**
+ * Checks the dirty status of the 'score' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isScoreDirty(Float value) {
+ throw new UnsupportedOperationException("IsDirty is not supported on tombstones");
+ }
+
+ /**
+ * Gets the value of the 'reprUrl' field.
+ */
+ public CharSequence getReprUrl() {
+ throw new UnsupportedOperationException("Get is not supported on tombstones");
+ }
+
+ /**
+ * Sets the value of the 'reprUrl' field.
+ * @param value the value to set.
+ */
+ public void setReprUrl(CharSequence value) {
+ throw new UnsupportedOperationException("Set is not supported on tombstones");
+ }
+
+ /**
+ * Checks the dirty status of the 'reprUrl' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isReprUrlDirty(CharSequence value) {
+ throw new UnsupportedOperationException("IsDirty is not supported on tombstones");
+ }
+
+ /**
+ * Gets the value of the 'headers' field.
+ */
+ public java.util.Map<CharSequence,CharSequence> getHeaders() {
+ throw new UnsupportedOperationException("Get is not supported on tombstones");
+ }
+
+ /**
+ * Sets the value of the 'headers' field.
+ * @param value the value to set.
+ */
+ public void setHeaders(java.util.Map<CharSequence,CharSequence> value) {
+ throw new UnsupportedOperationException("Set is not supported on tombstones");
+ }
+
+ /**
+ * Checks the dirty status of the 'headers' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isHeadersDirty(java.util.Map<CharSequence,CharSequence> value) {
+ throw new UnsupportedOperationException("IsDirty is not supported on tombstones");
+ }
+
+ /**
+ * Gets the value of the 'outlinks' field.
+ */
+ public java.util.Map<CharSequence,CharSequence> getOutlinks() {
+ throw new UnsupportedOperationException("Get is not supported on tombstones");
+ }
+
+ /**
+ * Sets the value of the 'outlinks' field.
+ * @param value the value to set.
+ */
+ public void setOutlinks(java.util.Map<CharSequence,CharSequence> value) {
+ throw new UnsupportedOperationException("Set is not supported on tombstones");
+ }
+
+ /**
+ * Checks the dirty status of the 'outlinks' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isOutlinksDirty(java.util.Map<CharSequence,CharSequence> value) {
+ throw new UnsupportedOperationException("IsDirty is not supported on tombstones");
+ }
+
+ /**
+ * Gets the value of the 'inlinks' field.
+ */
+ public java.util.Map<CharSequence,CharSequence> getInlinks() {
+ throw new UnsupportedOperationException("Get is not supported on tombstones");
+ }
+
+ /**
+ * Sets the value of the 'inlinks' field.
+ * @param value the value to set.
+ */
+ public void setInlinks(java.util.Map<CharSequence,CharSequence> value) {
+ throw new UnsupportedOperationException("Set is not supported on tombstones");
+ }
+
+ /**
+ * Checks the dirty status of the 'inlinks' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isInlinksDirty(java.util.Map<CharSequence,CharSequence> value) {
+ throw new UnsupportedOperationException("IsDirty is not supported on tombstones");
+ }
+
+ /**
+ * Gets the value of the 'markers' field.
+ */
+ public java.util.Map<CharSequence,CharSequence> getMarkers() {
+ throw new UnsupportedOperationException("Get is not supported on tombstones");
+ }
+
+ /**
+ * Sets the value of the 'markers' field.
+ * @param value the value to set.
+ */
+ public void setMarkers(java.util.Map<CharSequence,CharSequence> value) {
+ throw new UnsupportedOperationException("Set is not supported on tombstones");
+ }
+
+ /**
+ * Checks the dirty status of the 'markers' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isMarkersDirty(java.util.Map<CharSequence,CharSequence> value) {
+ throw new UnsupportedOperationException("IsDirty is not supported on tombstones");
+ }
+
+ /**
+ * Gets the value of the 'metadata' field.
+ */
+ public java.util.Map<CharSequence,java.nio.ByteBuffer> getMetadata() {
+ throw new UnsupportedOperationException("Get is not supported on tombstones");
+ }
+
+ /**
+ * Sets the value of the 'metadata' field.
+ * @param value the value to set.
+ */
+ public void setMetadata(java.util.Map<CharSequence,java.nio.ByteBuffer> value) {
+ throw new UnsupportedOperationException("Set is not supported on tombstones");
+ }
+
+ /**
+ * Checks the dirty status of the 'metadata' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isMetadataDirty(java.util.Map<CharSequence,java.nio.ByteBuffer> value) {
+ throw new UnsupportedOperationException("IsDirty is not supported on tombstones");
+ }
+
+ /**
+ * Gets the value of the 'batchId' field.
+ */
+ public CharSequence getBatchId() {
+ throw new UnsupportedOperationException("Get is not supported on tombstones");
+ }
+
+ /**
+ * Sets the value of the 'batchId' field.
+ * @param value the value to set.
+ */
+ public void setBatchId(CharSequence value) {
+ throw new UnsupportedOperationException("Set is not supported on tombstones");
+ }
+
+ /**
+ * Checks the dirty status of the 'batchId' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isBatchIdDirty(CharSequence value) {
+ throw new UnsupportedOperationException("IsDirty is not supported on tombstones");
+ }
+
}
-}
+}
\ No newline at end of file
Modified: nutch/branches/2.x/src/java/org/apache/nutch/tools/DmozParser.java
URL: http://svn.apache.org/viewvc/nutch/branches/2.x/src/java/org/apache/nutch/tools/DmozParser.java?rev=1594812&r1=1594811&r2=1594812&view=diff
==============================================================================
--- nutch/branches/2.x/src/java/org/apache/nutch/tools/DmozParser.java (original)
+++ nutch/branches/2.x/src/java/org/apache/nutch/tools/DmozParser.java Thu May 15 08:10:07 2014
@@ -195,11 +195,11 @@ public class DmozParser {
if(row!=null){
if (desc.length() > 0) {
- row.putToMetadata(new Utf8("_dmoz_desc_"), ByteBuffer.wrap(desc.toString().getBytes()));
+ row.getMetadata().put(new Utf8("_dmoz_desc_"), ByteBuffer.wrap(desc.toString().getBytes()));
desc.delete(0, desc.length());
}
if (title.length() > 0) {
- row.putToMetadata(new Utf8("_dmoz_title_"), ByteBuffer.wrap(title.toString().getBytes()));
+ row.getMetadata().put(new Utf8("_dmoz_title_"), ByteBuffer.wrap(title.toString().getBytes()));
title.delete(0, title.length());
}
store.put(reversedUrl, row);