Exemplo n.º 1
0
 /** A facet of the specified name. */
 public Facet facet(String name) {
   for (Facet facet : facets) {
     if (facet.name().equals(name)) {
       return facet;
     }
   }
   return null;
 }
Exemplo n.º 2
0
 @Override
 public void toJson(JsonBuilder builder, Params params) throws IOException {
   builder.startObject("facets");
   for (Facet facet : facets) {
     facet.toJson(builder, params);
   }
   builder.endObject();
 }
Exemplo n.º 3
0
 @Override
 public void writeTo(StreamOutput out) throws IOException {
   out.writeVInt(facets.size());
   for (Facet facet : facets) {
     out.writeByte(facet.type().id());
     facet.writeTo(out);
   }
 }