}
}
private Indexer createIndexer(Properties props, ParametersType params) {
// Initializing Indexer objects
Indexer indexer = Utils.OBJECT_FACTORY.createIndexer();
indexer.setParameters(params != null ? params : Utils.OBJECT_FACTORY.createParametersType());
Coverages coverages = Utils.OBJECT_FACTORY.createIndexerCoverages();
indexer.setCoverages(coverages);
List<Coverage> coverageList = coverages.getCoverage();
Coverage coverage = Utils.OBJECT_FACTORY.createIndexerCoveragesCoverage();
coverageList.add(coverage);
indexer.setParameters(params);
List<Parameter> parameters = params.getParameter();
// name
if (props.containsKey(Prop.NAME)) {
IndexerUtils.setParam(parameters, props, Prop.NAME);
coverage.setName(props.getProperty(Prop.NAME));
}
// absolute
if (props.containsKey(Prop.ABSOLUTE_PATH))
IndexerUtils.setParam(parameters, props, Prop.ABSOLUTE_PATH);
// recursive
if (props.containsKey(Prop.RECURSIVE))
IndexerUtils.setParam(parameters, props, Prop.RECURSIVE);
// wildcard
if (props.containsKey(Prop.WILDCARD))
IndexerUtils.setParam(parameters, props, Prop.WILDCARD);
// schema
if (props.containsKey(Prop.SCHEMA)) {
SchemasType schemas = Utils.OBJECT_FACTORY.createSchemasType();
SchemaType schema = Utils.OBJECT_FACTORY.createSchemaType();
indexer.setSchemas(schemas);
schemas.getSchema().add(schema);
schema.setAttributes(props.getProperty(Prop.SCHEMA));
schema.setName(IndexerUtils.getParameter(Prop.INDEX_NAME, indexer));
}