Class XMLMapper
- java.lang.Object
-
- de.julielab.jcore.reader.xmlmapper.mapper.XMLMapper
-
public class XMLMapper extends Object
Generic XML to UIMA TypeSystem mapper. It is intended to be used by an UIMACollectionReader.- Author:
- muehlhausen, weigel
-
-
Constructor Summary
Constructors Constructor Description XMLMapper(byte[] mappingFileData)Creates an new instacne of the XMLMapperXMLMapper(InputStream mappingFileDateStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidparse(byte[] data, byte[] identifier, org.apache.uima.jcas.JCas jcas)voidparse(File file, org.apache.uima.jcas.JCas jcas)parses the File to the jcasvoidsetIgnoreTrivialWhitespaces(boolean ignoreTrivialWhitespaces)Whether or not to ignore trivial XML whitespaces and newlines according toVTDGen.enableIgnoredWhiteSpace(boolean).
-
-
-
Constructor Detail
-
XMLMapper
public XMLMapper(byte[] mappingFileData)
Creates an new instacne of the XMLMapper- Parameters:
mappingFileData-- Throws:
FileNotFoundException
-
XMLMapper
public XMLMapper(InputStream mappingFileDateStream) throws IOException
- Throws:
IOException
-
-
Method Detail
-
setIgnoreTrivialWhitespaces
public void setIgnoreTrivialWhitespaces(boolean ignoreTrivialWhitespaces)
Whether or not to ignore trivial XML whitespaces and newlines according to
VTDGen.enableIgnoredWhiteSpace(boolean).Activating this will ignore whitespaces that exist between XML tags and have no other character data. This is not always desired behavior. Inline-annotated text may contain whitespaces between two tags that should actually retained in the document text.
- Parameters:
ignoreTrivialWhitespaces-
-
parse
public void parse(byte[] data, byte[] identifier, org.apache.uima.jcas.JCas jcas)
-
-