org.carrot2.core
Interface Document.IDocumentSerializationListener

Enclosing class:
Document

public static interface Document.IDocumentSerializationListener

Enables listening to events related to XML/JSON serialization of Documents.


Method Summary
 void beforeSerialization(Document document, Map<String,?> otherFieldsForSerialization)
          Called before a Document gets serialized to XML or JSON.
 

Method Detail

beforeSerialization

void beforeSerialization(Document document,
                         Map<String,?> otherFieldsForSerialization)
Called before a Document gets serialized to XML or JSON. Specific implementations may want to modify some properties of the document before it gets serialized

Parameters:
document - the documents being serialized. Note: changes to the document will not be undone after serialization completes.
otherFieldsForSerialization - custom fields that are about to be serialized. Changes made on this map will not affect the contents of the document.


Copyright (c) Dawid Weiss, Stanislaw Osinski