# HG changeset patch # User Felix Wolfsteller # Date 1318232226 0 # Node ID ec5c7e54cae1beaaad4896cd3de708d45b53bc2f # Parent 6d239c58c636b21819a38788051c2be1204d562a Cosmetics (and fix for XMLUtils.toString(Element)). artifacts/trunk@2913 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 6d239c58c636 -r ec5c7e54cae1 artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifactCollection.java --- a/artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifactCollection.java Fri Oct 07 15:32:58 2011 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifactCollection.java Mon Oct 10 07:37:06 2011 +0000 @@ -36,33 +36,23 @@ public class DefaultArtifactCollection implements ArtifactCollection { - /** The logger used in this class.*/ + /** The logger used in this class. */ private static Logger logger = Logger.getLogger(DefaultArtifactCollection.class); - /** - * The identifier of the collection. - */ + /** The identifier of the collection. */ protected String identifier; - /** - * The identifier of the collection. - */ + /** The identifier of the collection. */ protected String name; - /** - * The owner of this collection. - */ + /** The owner of this collection. */ protected User user; - /** - * The attribute of this collection. - */ + /** The attribute of this collection. */ protected Document attribute; - /** - * The artifacts stored in this collection. - */ + /** The artifacts stored in this collection. */ protected List artifacts; /** diff -r 6d239c58c636 -r ec5c7e54cae1 artifacts-common/src/main/java/de/intevation/artifacts/common/utils/XMLUtils.java --- a/artifacts-common/src/main/java/de/intevation/artifacts/common/utils/XMLUtils.java Fri Oct 07 15:32:58 2011 +0000 +++ b/artifacts-common/src/main/java/de/intevation/artifacts/common/utils/XMLUtils.java Mon Oct 10 07:37:06 2011 +0000 @@ -60,15 +60,13 @@ */ public final class XMLUtils { - /** - * W3C URL of XForms - */ + /** W3C URL of XForms. */ public static final String XFORM_URL = "http://www.w3.org/2002/xforms"; - /** - * W3C prefix of XForms - */ + + /** W3C prefix of XForms. */ public static final String XFORM_PREFIX = "xform"; + /** Logger for this class. */ private static Logger logger = Logger.getLogger(XMLUtils.class); private XMLUtils() { @@ -80,17 +78,13 @@ */ public static class ElementCreator { - /** - * owner document of the elements to be created - */ + /** Owner document of the elements to be created. */ protected Document document; - /** - * namespace to be used - */ + + /** Namespace to be used. */ protected String ns; - /** - * prefix to be used - */ + + /** Prefix to be used. */ protected String prefix; /** @@ -184,27 +178,14 @@ * @param element element to inspect in string. * @return string with xml representation of element. */ - public final static String toString(Element element) { + public final static String toString(Node node) { Document doc = newDocument(); - doc.appendChild(doc.importNode(element,true)); + doc.appendChild(doc.importNode(node,true)); return toString(doc); } /** - * Creates xml/string representation of node (nested in otherwise empty - * document). - * @param element element to inspect in string. - * @return string with xml representation of element. - */ - public final static String toString(Node node) { - Document doc = newDocument(); - doc.importNode(node, true); - return toString(doc); - } - - - /** * Loads a XML document namespace aware from a file * @param file The file to load. * @return the XML document or null if something went wrong