class IndexingItemBuilder {

  public static IndexingItemBuilder fromConfiguration(String name) {
    String objectType = Configuration.getString(OBJECT_TYPE, "").get();
    if (!objectType.isEmpty()) {
      logger.log(Level.WARNING, "{0} is deprecated, use {1}={2}.",
          new Object[] { OBJECT_TYPE, OBJECT_TYPE_VALUE, objectType });
    }

    ConfigDefaults config = new ConfigDefaults()
        .setMimeType(fieldOrValue(MIME_TYPE, Configuration.STRING_PARSER))
        .setTitle(fieldOrValue(TITLE, Configuration.STRING_PARSER))
        .setUrl(fieldOrValue(SOURCE_REPOSITORY_URL, Configuration.STRING_PARSER))
        .setUpdateTime(fieldOrValue(UPDATE_TIME, DATE_PARSER))
        .setCreateTime(fieldOrValue(CREATE_TIME, DATE_PARSER))
        .setLanguage(fieldOrValue(CONTENT_LANGUAGE, Configuration.STRING_PARSER))
        .setHash(fieldOrValue(HASH, Configuration.STRING_PARSER))
        .setContainerName(fieldOrValue(CONTAINER_NAME, Configuration.STRING_PARSER))
        .setSearchQualityMetadataQuality(fieldOrValue(SEARCH_QUALITY_METADATA_QUALITY,
                Configuration.DOUBLE_PARSER))
        .setObjectType(
            fieldOrValue(
                OBJECT_TYPE,
                Configuration.getString(OBJECT_TYPE_FIELD, "").get(),
                Configuration.getOverriden(
                    OBJECT_TYPE_VALUE, Configuration.getString(OBJECT_TYPE, ""))
                    .get(),
                Configuration.STRING_PARSER));
    return new IndexingItemBuilder(name, config);
  }

  public  IndexingItemBuilder(String name);
  private  IndexingItemBuilder(String name, ConfigDefaults config);

}