Package org.ametys.plugins.contentio
Class ContentImporterHelper
- java.lang.Object
-
- org.ametys.plugins.contentio.ContentImporterHelper
-
public final class ContentImporterHelper extends Object
Helper to import contents.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
ContentImporterHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
serializeNode(Node node)
Serialize a XML node as a String, with XML declaration and without indentation.static String
serializeNode(Node node, boolean indent)
Serialize a XML node as a String, with XML declaration.static String
serializeNode(Node node, boolean indent, boolean omitXmlDeclaration)
Serialize a XML node as a String.static String
textToDocbook(String[] lines)
Transform text to docbook syntaxe
-
-
-
Constructor Detail
-
ContentImporterHelper
private ContentImporterHelper()
-
-
Method Detail
-
textToDocbook
public static String textToDocbook(String[] lines)
Transform text to docbook syntaxe- Parameters:
lines
- The paragraphs to transform- Returns:
- the docbook text
-
serializeNode
public static String serializeNode(Node node) throws TransformerException
Serialize a XML node as a String, with XML declaration and without indentation.- Parameters:
node
- the node.- Returns:
- the XML string.
- Throws:
TransformerException
- if an error occurs.
-
serializeNode
public static String serializeNode(Node node, boolean indent) throws TransformerException
Serialize a XML node as a String, with XML declaration.- Parameters:
node
- the node.indent
- true to indent the result, false otherwise.- Returns:
- the XML string.
- Throws:
TransformerException
- if an error occurs.
-
serializeNode
public static String serializeNode(Node node, boolean indent, boolean omitXmlDeclaration) throws TransformerException
Serialize a XML node as a String.- Parameters:
node
- the node.indent
- true to indent the result, false otherwise.omitXmlDeclaration
- true to omit XML declaration, false otherwise.- Returns:
- the XML string.
- Throws:
TransformerException
- if an error occurs.
-
-