org.apache.uima.tools.cfe.support
Class SimpleFileBasedDictionary<T>

java.lang.Object
  extended by org.apache.uima.tools.cfe.support.FileBasedResource
      extended by org.apache.uima.tools.cfe.support.FileBasedDictionary<T>
          extended by org.apache.uima.tools.cfe.support.SimpleFileBasedDictionary<T>
All Implemented Interfaces:
DictionaryMatcher<String>
Direct Known Subclasses:
EnumeratedEntryDictionary

public abstract class SimpleFileBasedDictionary<T>
extends FileBasedDictionary<T>
implements DictionaryMatcher<String>


Field Summary
 String m_cmtsep
           
 String m_fldsep
           
 
Fields inherited from class org.apache.uima.tools.cfe.support.FileBasedResource
m_name, m_path
 
Constructor Summary
SimpleFileBasedDictionary(String name, String path, Map<String,T> storage, String comment_separator, String filed_separator)
           
 
Method Summary
protected  void addEntry(String key, T value, int linenum)
           
 T getEntry(String key)
           
 void load()
           
 boolean matches(String key)
           
 void save()
           
 int size()
           
 Map<String,T> storage()
           
 
Methods inherited from class org.apache.uima.tools.cfe.support.FileBasedDictionary
addLine
 
Methods inherited from class org.apache.uima.tools.cfe.support.FileBasedResource
name, path
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_cmtsep

public final String m_cmtsep

m_fldsep

public final String m_fldsep
Constructor Detail

SimpleFileBasedDictionary

public SimpleFileBasedDictionary(String name,
                                 String path,
                                 Map<String,T> storage,
                                 String comment_separator,
                                 String filed_separator)
Method Detail

load

public void load()
          throws IOException
Specified by:
load in class FileBasedResource
Throws:
IOException

save

public void save()
          throws IOException
Specified by:
save in class FileBasedResource
Throws:
IOException

addEntry

protected void addEntry(String key,
                        T value,
                        int linenum)
Specified by:
addEntry in class FileBasedDictionary<T>

storage

public Map<String,T> storage()

getEntry

public T getEntry(String key)
Specified by:
getEntry in class FileBasedDictionary<T>

size

public int size()
Specified by:
size in class FileBasedDictionary<T>

matches

public boolean matches(String key)
Specified by:
matches in interface DictionaryMatcher<String>


Copyright © 2006-2011 The Apache Software Foundation. All Rights Reserved.