Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
wlfxb - a library for creating and processing of TCF data streams. Copyright (C) University of Tübingen. This file is part of wlfxb. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
 
 package eu.clarin.weblicht.wlfxb.tc.xb;
 
 import java.util.List;
 import java.util.Map;
 
 public enum TextCorpusLayerTag {
 
     /*
      * New layers should be added in such an order that they are enumerated
      * after the layers they reference and before the layers that are
      * referencing them. The order here will also be the order in TCF output.
      */
     TEXT(.TextLayerStored.class),
     @Deprecated
     GEO(.GeoLayerStored.class),
     CORPUS_MATCHES(.MatchesLayerStored.class),
     
     private static final Map<StringTextCorpusLayerTagxmlNameToLayerTagMap =
             new HashMap<StringTextCorpusLayerTag>() {
 
                 {
                     for (TextCorpusLayerTag layerTag : TextCorpusLayerTag.values()) {
                         put(layerTag.xmlNamelayerTag);
                     }
                 }
             };
     
     private static final Map<Class<? extends TextCorpusLayer>, TextCorpusLayerTagclassToLayerTagMap =
             new HashMap<Class<? extends TextCorpusLayer>, TextCorpusLayerTag>() {
 
                 {
                     for (TextCorpusLayerTag layerTag : TextCorpusLayerTag.values()) {
                         put(layerTag.getLayerClass(), layerTag);
                     }
                 }
             };
     
     private static final TextCorpusLayerTag[] layersOrder;
 
     static {
          = new TextCorpusLayerTag[TextCorpusLayerTag.values().length];
         for (TextCorpusLayerTag layerTag : TextCorpusLayerTag.values()) {
             [layerTag.ordinal()] = layerTag;
         }
     }
     
     static {
    }
    
    private final String xmlName;
    private final Class<? extends TextCorpusLayerlayerClass;
    TextCorpusLayerTag(String nameClass<? extends TextCorpusLayerlayerClass) {
        this. = name;
        this. = layerClass;
    }
    public final String getXmlName() {
        return ;
    }
    public final Class<? extends TextCorpusLayergetLayerClass() {
        return ;
    }
    public static TextCorpusLayerTag getFromXmlName(String xmlName) {
        return .get(xmlName);
    }
    public static List<TextCorpusLayerTagorderedLayerTags() {
        return Arrays.asList();
    }
    public static TextCorpusLayerTag getFromClass(Class<? extends TextCorpusLayercl) {
        return .get(cl);
    }
    
        EnumSet<TextCorpusLayerTaglayerAndDependentLayers = EnumSet.of(this);
        addDependentLayers(thislayerAndDependentLayers);
        return layerAndDependentLayers;
    }
        
    private static void addDependentLayers(TextCorpusLayerTag tagEnumSet<TextCorpusLayerTaglayers) {
        EnumSet<TextCorpusLayerTagdependentLayers = .get(tag);
        layers.addAll(dependentLayers);
        for (TextCorpusLayerTag dependentLayer : dependentLayers) {
                addDependentLayers(dependentLayerlayers);
        }
    }
New to GrepCode? Check out our FAQ X