it.unimi.di.mg4j.document
Interface DispatchingDocumentFactory.DispatchingStrategy

All Superinterfaces:
Serializable
All Known Implementing Classes:
DispatchingDocumentFactory.StringBasedDispatchingStrategy
Enclosing class:
DispatchingDocumentFactory

public static interface DispatchingDocumentFactory.DispatchingStrategy
extends Serializable

A strategy that decides which factory is appropriate using the document metadata.


Method Summary
 int factoryNumber(Reference2ObjectMap<Enum<?>,Object> metadata, PropertyBasedDocumentFactory factory)
          Decides the index of the factory to be used for the given metadata, possibly using a factory to resolve property names.
 

Method Detail

factoryNumber

int factoryNumber(Reference2ObjectMap<Enum<?>,Object> metadata,
                  PropertyBasedDocumentFactory factory)
Decides the index of the factory to be used for the given metadata, possibly using a factory to resolve property names.

Parameters:
metadata - the metadata of the document to be produced.
factory - the factory used to resolve metadata names.
Returns:
the factory index.