examples/http-api-using-request-handlers-and-processors/src/main/java/com/mydomain/demo/DemoDocumentProcessor.java
package com.mydomain.demo;

import com.yahoo.docproc.SimpleDocumentProcessor;
import com.yahoo.document.Document;
import com.yahoo.document.DocumentPut;

public class DemoDocumentProcessor extends SimpleDocumentProcessor {

  @Override
  public void process(DocumentPut put) {
    // This dummy processor, in only a "Title Setter"
    super.process(put);
    Document document = put.getDocument();
    // ... Imagine something complicated happened here to compute the Title
    String title = "A simple title";
    document.setFieldValue("title", title);
  }
}
