Class AlignmentXmlRepair
java.lang.Object
de.uni_mannheim.informatik.dws.melt.yet_another_alignment_api.AlignmentXmlRepair
Class which helps to repair alignment files which are for example not correctly encoded.
Thus it is not parsable by a stream parser.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Alignment
loadRepairedAlignment
(File alignmentFile) Loads a repaired alignment.static String
Repairs an alignment file.static void
Repairs an alignment file.static void
repair
(InputStream in, OutputStream out) Repairs an alignment file.static String
static void
Repairs an alignment file.static void
repairAlignmentFolder
(File srcDir, File destDir) Copy all file from source to destionation directory.static void
repairInPlace
(File alignmentFile) Repairs an alignment file inplace.static void
repairInPlace
(String alignmentFile) Repairs an alignment file inplace.private static String
repairXMLAttribute
(String attribute)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
RESOURCE_ATTRIBUTE_PATTERN
-
ESCAPED_AMPERSAND
-
-
Constructor Details
-
AlignmentXmlRepair
public AlignmentXmlRepair()
-
-
Method Details
-
repairInPlace
Repairs an alignment file inplace.- Parameters:
alignmentFile
- The alignment file which should be repaired in place
-
repairInPlace
Repairs an alignment file inplace.- Parameters:
alignmentFile
- The alignment file which should be repaired in place
-
loadRepairedAlignment
Loads a repaired alignment.- Parameters:
alignmentFile
- The alignment file- Returns:
- the repaired alignment
- Throws:
IOException
- An IOException.SAXException
- A SAXException.
-
repair
Repairs an alignment file.- Parameters:
inFile
- The alignment file- Returns:
- the repaired alignment as string.
-
repair
Repairs an alignment file.- Parameters:
filePathAlignment
- The alignment filefilePathOut
- The repaired alignment File
-
repair
-
repair
Repairs an alignment file.- Parameters:
inFile
- The alignment fileoutFile
- The repaired alignment File
-
repair
Repairs an alignment file.- Parameters:
in
- The alignment streamout
- The repaired alignment stream
-
repairXMLAttribute
-
repairAlignmentFolder
Copy all file from source to destionation directory. If a file within those directories ends with ".rdf", then this file is repaired with the repair function.- Parameters:
srcDir
- a source directory which should contain some alignment files (for repairing)destDir
- a destination directory where all files will be copied to
-