package io.monokkel.configuration; import java.io.Serializable; import java.util.List; /** * Created by tarjei on 27/05/14. * <p/> * Crawler configuration contain all adjustable parameters * <p/> * TODO: Refactor into multiple smaller configuration objects */ public class CrawlerConfiguration implements Serializable { private static final long serialVersionUID = 1L; public static final String CRAWLER_ACTOR = "crawlerActor"; public static final String ELASTIC_NODE = "elasticNode"; public static final String COORDINATION_ACTOR = "coordinationActor"; private final List<String> filters; private final String indexName; private final String indexType; private final String indexNodeHost; private final Integer indexNodePort; private final Long maxDuration; private final List<String> seedUrls; private final String contentRetrievalExpression; private final String attributeToLocateContent; private final boolean createEmbeddedElasticNode; private final Integer maxDepth; private final String transformationPath; private final String cleanDataFilePath; private final Integer seconds; private final Integer urlsPer; private final Boolean disableThrottle; private final String validatorPath; private final String jsonTransformationPath; private List<String> fieldToFiendNextUrl; private Boolean jsonTransformationEnabled; private Boolean shouldIndexRawContent; public CrawlerConfiguration(final List<String> filters, final String indexName, final String indexType, final String indexNodeHost, final Integer indexNodePort, final Long maxDuration, final List<String> seedUrls, final String contentRetrievalExpression, final String attributeToLocateContent, final boolean createEmbeddedElasticNode, final Integer maxDepth, final String transformationPath, final String cleanDataFilePath, final Integer seconds, final Integer urlsPer, final Boolean disableThrottle, final String validatorPath, final String jsonTransformationPath, final List<String> fieldToFiendNextUrl, final Boolean jsonTransformationEnabled, final Boolean shouldIndexRawContent) { this.filters = filters; this.indexName = indexName; this.indexType = indexType; this.indexNodeHost = indexNodeHost; this.indexNodePort = indexNodePort; this.maxDuration = maxDuration; this.seedUrls = seedUrls; this.contentRetrievalExpression = contentRetrievalExpression; this.attributeToLocateContent = attributeToLocateContent; this.createEmbeddedElasticNode = createEmbeddedElasticNode; this.maxDepth = maxDepth; this.transformationPath = transformationPath; this.cleanDataFilePath = cleanDataFilePath; this.seconds = seconds; this.urlsPer = urlsPer; this.disableThrottle = disableThrottle; this.validatorPath = validatorPath; this.jsonTransformationPath = jsonTransformationPath; this.fieldToFiendNextUrl = fieldToFiendNextUrl; this.jsonTransformationEnabled = jsonTransformationEnabled; this.shouldIndexRawContent = shouldIndexRawContent; } public List<String> getFilters() { return filters; } public String getIndexName() { return indexName; } public String getIndexType() { return indexType; } public String getIndexNodeHost() { return indexNodeHost; } public Integer getIndexNodePort() { return indexNodePort; } public Long getMaxDuration() { return maxDuration; } public List<String> getSeedUrls() { return seedUrls; } public String getContentRetrievalExpression() { return contentRetrievalExpression; } public String getAttributeToLocateContent() { return attributeToLocateContent; } public boolean isCreateEmbeddedElasticNode() { return createEmbeddedElasticNode; } public Integer getMaxDepth() { return maxDepth; } public String getTransformationPath() { return transformationPath; } public String getCleanDataFilePath() { return cleanDataFilePath; } public Integer getSeconds() { return seconds; } public Integer getUrlsPer() { return urlsPer; } public Boolean getDisableThrottle() { return disableThrottle; } public String getValidatorPath() { return validatorPath; } public String getJsonTransformationPath() { return jsonTransformationPath; } public List<String> getFieldToFiendNextUrl() { return fieldToFiendNextUrl; } public Boolean isJsonTransformationEnabled() { return jsonTransformationEnabled; } public Boolean isShouldIndexRawContent() { return shouldIndexRawContent; } }