@@ -0,0 +1,1828 @@
+/*%0A * Copyright 2012 SFB 632.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage annis.sqlgen;%0A%0Aimport java.util.List;%0Aimport java.util.Map;%0Aimport java.util.Properties;%0A%0A/**%0A *%0A * @author Benjamin Wei%C3%9Fenfels %3Cb.pixeldrama@gmail.com%3E%0A */%0Apublic class IslandsPolicy%0A%7B%0A%0A  private String defaultIslandsPolicy;%0A%0A  public enum IslandPolicies%0A  %7B%0A%0A    context, none%0A  %7D%0A%0A  public IslandPolicies getMostRestrictivePolicy(List%3CLong%3E corpora,%0A    Map%3CLong, Properties%3E props)%0A  %7B%0A    if (corpora.isEmpty())%0A    %7B%0A      return IslandPolicies.valueOf(defaultIslandsPolicy);%0A    %7D%0A%0A    IslandPolicies%5B%5D all =%0A      IslandPolicies.values();%0A    IslandPolicies result = all%5Ball.length - 1%5D;%0A%0A    for (Long l : corpora)%0A    %7B%0A      IslandPolicies newPolicy = IslandPolicies.valueOf(defaultIslandsPolicy);%0A%0A      if (props.get(l) != null)%0A      %7B%0A        newPolicy =%0A          IslandPolicies.valueOf(props.get(l).getProperty(%22islands-policy%22,%0A          defaultIslandsPolicy));%0A      %7D%0A%0A      if (newPolicy.ordinal() %3C result.ordinal())%0A      %7B%0A        result = newPolicy;%0A      %7D%0A    %7D%0A    return result;%0A  %7D%0A%0A  public String getDefaultIslandsPolicy()%0A  %7B%0A    return defaultIslandsPolicy;%0A  %7D%0A%0A  public void setDefaultIslandsPolicy(String defaultIslandsPolicy)%0A  %7B%0A    this.defaultIslandsPolicy = defaultIslandsPolicy;%0A  %7D%0A%7D

check in IslandsPolicy class