Package fi.tut.mei.matchmaking.test.main
Class Utilities
- java.lang.Object
-
- fi.tut.mei.matchmaking.test.main.Utilities
-
public class Utilities extends Object
-
-
Constructor Summary
Constructors Constructor Description Utilities()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
generateRDDocumentation(InputStream sourceStream)
Generates human readable documentation out of RD file.String
generateRDDocumentation(Document document)
Document
getDocumentObjFromXML(InputStream sourceStream)
String
makeTransform(InputStream sourceStream, String transform)
Makes transformation for a fileString
makeTransform(Document document, String xsltPath)
Makes transformation for DOM DocumentString
xmlToString(Node node)
Prints out the XML structure as string
-
-
-
Method Detail
-
getDocumentObjFromXML
public Document getDocumentObjFromXML(InputStream sourceStream)
-
generateRDDocumentation
public String generateRDDocumentation(InputStream sourceStream)
Generates human readable documentation out of RD file.- Parameters:
sourceStream
- InputStream The source document (XML) as stream- Returns:
- resulting HTHML document
- Throws:
Exception
-
generateRDDocumentation
public String generateRDDocumentation(Document document)
- Parameters:
document
-- Returns:
- Throws:
Exception
-
makeTransform
public String makeTransform(InputStream sourceStream, String transform)
Makes transformation for a file- Parameters:
sourceStream
- InputStream The source document (XML) as streamtransform
- String String Path and name of the transformation file (XSLT)- Returns:
- String result
- Throws:
WrongFormatException
Exception
-
makeTransform
public String makeTransform(Document document, String xsltPath)
Makes transformation for DOM Document- Parameters:
document
- DOM document document (XML) as DOM Documenttransform
- String String Path and name of the transformation file (XSLT)- Returns:
- String result
- Throws:
WrongFormatException
Exception
-
-