| /* |
| * Licensed to the Apache Software Foundation (ASF) under one or more |
| * contributor license agreements. See the NOTICE file distributed with |
| * this work for additional information regarding copyright ownership. |
| * The ASF licenses this file to You under the Apache License, Version 2.0 |
| * (the "License"); you may not use this file except in compliance with |
| * the License. You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| package org.apache.stanbol.enhancer.servicesapi; |
| |
| import java.util.Map; |
| |
| /** |
| * Stanbol Enhancer components might implement this interface to parse additional |
| * properties to other components. |
| * |
| * @author Rupert Westenthaler |
| */ |
| public interface ServiceProperties { |
| |
| /** |
| * Getter for the properties defined by this service. |
| * @return An unmodifiable map of properties defined by this service |
| */ |
| Map<String,Object> getServiceProperties(); |
| |
| //TODO review the definition of constants |
| /** |
| * Property Key used to define the order in which {@link EnhancementEngine}s are |
| * called by the {@link EnhancementJobManager}. This property expects a |
| * single {@link Integer} as value |
| */ |
| String ENHANCEMENT_ENGINE_ORDERING = "org.apache.stanbol.enhancer.engine.order"; |
| |
| /** |
| * Ordering values >= this value indicate, that an enhancement engine |
| * dose some pre processing on the content |
| */ |
| Integer ORDERING_PRE_PROCESSING = 200; |
| |
| /** |
| * Ordering values < {@link ServiceProperties#ORDERING_PRE_PROCESSING} and |
| * >= this value indicate, that an enhancement engine performs operations |
| * that are only dependent on the parsed content. |
| */ |
| Integer ORDERING_CONTENT_EXTRACTION = 100; |
| |
| /** |
| * Ordering values < {@link ServiceProperties#ORDERING_CONTENT_EXTRACTION} |
| * and >= this value indicate, that an enhancement engine performs operations |
| * on extracted features of the content. It can also extract additional |
| * enhancement by using the content, but such features might not be |
| * available to other engines using this ordering range |
| */ |
| Integer ORDERING_EXTRACTION_ENHANCEMENT = 1; |
| |
| /** |
| * The default ordering uses {@link ServiceProperties#ORDERING_EXTRACTION_ENHANCEMENT} |
| * -1 . So by default EnhancementEngines are called after all engines that |
| * use an value within the ordering range defined by |
| * {@link ServiceProperties#ORDERING_EXTRACTION_ENHANCEMENT} |
| */ |
| Integer ORDERING_DEFAULT = 0; |
| |
| /** |
| * Ordering values < {@link ServiceProperties#ORDERING_DEFAULT} and >= this |
| * value indicate that an enhancement engine performs post processing |
| * operations on existing enhancements. |
| */ |
| Integer ORDERING_POST_PROCESSING = -100; |
| |
| } |