Host represents a store of webpages or other data which resides on a server or other computer so that it can be accessed over the Internet
| 22 | |
| 23 | /** Host represents a store of webpages or other data which resides on a server or other computer so that it can be accessed over the Internet */ |
| 24 | public class Host extends org.apache.gora.persistency.impl.PersistentBase implements org.apache.avro.specific.SpecificRecord, org.apache.gora.persistency.Persistent { |
| 25 | public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"Host\",\"namespace\":\"org.apache.nutch.storage\",\"doc\":\"Host represents a store of webpages or other data which resides on a server or other computer so that it can be accessed over the Internet\",\"fields\":[{\"name\":\"metadata\",\"type\":{\"type\":\"map\",\"values\":[\"null\",\"bytes\"]},\"doc\":\"A multivalued metadata container used for storing a wide variety of host metadata such as structured web server characterists etc\",\"default\":{}},{\"name\":\"outlinks\",\"type\":{\"type\":\"map\",\"values\":[\"null\",\"string\"]},\"doc\":\"Hyperlinks which direct outside of the current host domain these can used in a histogram style manner to generate host statistics\",\"default\":{}},{\"name\":\"inlinks\",\"type\":{\"type\":\"map\",\"values\":[\"null\",\"string\"]},\"doc\":\"Hyperlinks which link to pages within the current host domain these can used in a histogram style manner to generate host statistics\",\"default\":{}}]}"); |
| 26 | private static final long serialVersionUID = -4229257204185827136L; |
| 27 | /** Enum containing all data bean's fields. */ |
| 28 | public static enum Field { |
| 29 | METADATA(0, "metadata"), |
| 30 | OUTLINKS(1, "outlinks"), |
| 31 | INLINKS(2, "inlinks"), |
| 32 | ; |
| 33 | /** |
| 34 | * Field's index. |
| 35 | */ |
| 36 | private int index; |
| 37 | |
| 38 | /** |
| 39 | * Field's name. |
| 40 | */ |
| 41 | private String name; |
| 42 | |
| 43 | /** |
| 44 | * Field's constructor |
| 45 | * @param index field's index. |
| 46 | * @param name field's name. |
| 47 | */ |
| 48 | Field(int index, String name) {this.index=index;this.name=name;} |
| 49 | |
| 50 | /** |
| 51 | * Gets field's index. |
| 52 | * @return int field's index. |
| 53 | */ |
| 54 | public int getIndex() {return index;} |
| 55 | |
| 56 | /** |
| 57 | * Gets field's name. |
| 58 | * @return String field's name. |
| 59 | */ |
| 60 | public String getName() {return name;} |
| 61 | |
| 62 | /** |
| 63 | * Gets field's attributes to string. |
| 64 | * @return String field's attributes to string. |
| 65 | */ |
| 66 | public String toString() {return name;} |
| 67 | }; |
| 68 | |
| 69 | public static final String[] _ALL_FIELDS = { |
| 70 | "metadata", |
| 71 | "outlinks", |
| 72 | "inlinks", |
| 73 | }; |
| 74 | |
| 75 | /** |
| 76 | * Gets the total field count. |
| 77 | * @return int field count |
| 78 | */ |
| 79 | public int getFieldsCount() { |
| 80 | return Host._ALL_FIELDS.length; |
| 81 | } |