Package de.julielab.costosys.cli
Class BinaryDataHandler
- java.lang.Object
-
- de.julielab.costosys.cli.BinaryDataHandler
-
public class BinaryDataHandler extends Object
-
-
Constructor Summary
Constructors Constructor Description BinaryDataHandler(DataBaseConnector dbc, String xmiMetaSchema, Set<String> annotationColumnsToLoad, List<File> typeSystemFiles)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringdecodeBinaryXmiData(byte[][] data, boolean makeValidXml)Map<String,String>getNamespaceMap()Reads the UIMA XMI namespaces from the respective storage table in the database.Map<Integer,String>getReverseBinaryMappingFromDb()
-
-
-
Constructor Detail
-
BinaryDataHandler
public BinaryDataHandler(DataBaseConnector dbc, String xmiMetaSchema, Set<String> annotationColumnsToLoad, List<File> typeSystemFiles) throws CoStoSysException
- Parameters:
dbc- A DatabaseConnector instance.xmiMetaSchema- The Postgres schema in which the XMI namespace table is located.annotationColumnsToLoad- The names of XMI table columns where annotation modules are stored and should be retrieved.typeSystemFiles- UIMA type system descriptor files that hold the types contained in the loaded data.- Throws:
CoStoSysException- If the type systems cannot be loaded.
-
-
Method Detail
-
decodeBinaryXmiData
public String decodeBinaryXmiData(byte[][] data, boolean makeValidXml) throws CoStoSysException
- Throws:
CoStoSysException
-
getNamespaceMap
public Map<String,String> getNamespaceMap()
Reads the UIMA XMI namespaces from the respective storage table in the database.
- Returns:
- The map from namespace prefix to the namespace URI.
-
-