this.valueFactory = valueFactory;
this.fieldMapper = fieldMapper;
this.indexValueFactory = indexValueFactory;
this.constraintEncoders = new HashMap<IndexConstraintTypeEnum,IndexConstraintTypeEncoder<?>>();
// TODO: Make this configuration more flexible!
IndexConstraintTypeEncoder<IndexField> langEncoder = new LangEncoder(fieldMapper);
constraintEncoders.put(IndexConstraintTypeEnum.LANG, langEncoder);
IndexConstraintTypeEncoder<IndexField> datatypeEncoder = new DataTypeEncoder(indexValueFactory, fieldMapper);
constraintEncoders.put(IndexConstraintTypeEnum.DATATYPE, datatypeEncoder);
IndexConstraintTypeEncoder<IndexField> fieldEncoder = new FieldEncoder(fieldMapper);
constraintEncoders.put(IndexConstraintTypeEnum.FIELD, fieldEncoder);