8000 Comments fix · codepressed/Java-CSV2XML@2ee234a · GitHub
[go: up one dir, main page]

Skip to content

Commit 2ee234a

Browse files
author
A. Apesteguia
committed
Comments fix
1 parent c31d78e commit 2ee234a

File tree

4 files changed

+19
-6
lines changed

4 files changed

+19
-6
lines changed

src/main/java/com/codepressed/CSVtoXML/Main.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,8 @@ public static void main(String[] args) {
4040
}
4141

4242
try {
43-
//ArrayList of ArrayStrings Generation with CSV
4443
ArrayList<String[]> elements;
4544
elements = new Reader().CSVtoArrayList(csvFile, csvSplit);
46-
47-
//XML Doc Generation with ArrayList
4845
Document xmlDoc;
4946
xmlDoc = new XMLDoc().docBuilder(elements, elementName);
5047
XMLTransformer.transformDocToFile(xmlDoc, xmlFile);

src/main/java/com/codepressed/CSVtoXML/Reader.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@
66

77
public class Reader {
88

9-
//ArrayList Generation ArrayStrings with the CSV Data
9+
/**
10+
*
11+
* @param csvFile Input file
12+
* @param csvSplit Invalid chars filter
13+
* @return ArrayList of CSV Values
14+
* @throws IOException
15+
*/
1016
public ArrayList<String[]> CSVtoArrayList(String csvFile, String csvSplit) throws IOException {
1117
ArrayList<String[]> elements = new ArrayList<String[]>();
1218
BufferedReader csvReader = null;

src/main/java/com/codepressed/CSVtoXML/XMLDoc.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@
1212

1313
public class XMLDoc {
1414

15-
//DOC Generation -> XML with ArrayList String elements
15+
/**
16+
*
17+
* @param XMLelements ArrayList of CSV Values
18+
* @param elementName Name fixed for node tree
19+
* @return Final doc
20+
* @throws ParserConfigurationException
21+
*/
1622
public Document docBuilder(ArrayList<String[]> XMLelements, String elementName) throws ParserConfigurationException {
1723
if (elementName == null){
1824
elementName = "element";

src/main/java/com/codepressed/CSVtoXML/XMLTransformer.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@
1313
import java.io.FileOutputStream;
1414

1515
public class XMLTransformer {
16-
//XML Generation -> Transform DOC Data to XML Format
16+
/** Transforms DOC Data to XML Format
17+
* @param xmlDoc
18+
* @param xmlFile
19+
* @throws TransformerException
20+
*/
1721
public static void transformDocToFile(Document xmlDoc, String xmlFile) throws TransformerException {
1822
TransformerFactory xmlTransformerFactory = TransformerFactory.newInstance();
1923
Transformer xmlTransformer = xmlTransformerFactory.newTransformer();

0 commit comments

Comments
 (0)
0