git://wamblee.org
/
utils
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
84ee810
)
(no commit message)
author
Erik Brakkee
<erik@brakkee.org>
Fri, 31 Mar 2006 09:29:16 +0000
(09:29 +0000)
committer
Erik Brakkee
<erik@brakkee.org>
Fri, 31 Mar 2006 09:29:16 +0000
(09:29 +0000)
crawler/kiss/src/org/wamblee/crawler/kiss/guide/PrintVisitor.java
patch
|
blob
|
history
crawler/kiss/src/org/wamblee/crawler/kiss/guide/Program.java
patch
|
blob
|
history
support/src/org/wamblee/xml/DomUtils.java
patch
|
blob
|
history
diff --git
a/crawler/kiss/src/org/wamblee/crawler/kiss/guide/PrintVisitor.java
b/crawler/kiss/src/org/wamblee/crawler/kiss/guide/PrintVisitor.java
index ea1c3c22cf51346cd60eb6803b913afb03b4b010..028cdf5506d8b350d2a6963029c815fa8d6c4470 100644
(file)
--- a/
crawler/kiss/src/org/wamblee/crawler/kiss/guide/PrintVisitor.java
+++ b/
crawler/kiss/src/org/wamblee/crawler/kiss/guide/PrintVisitor.java
@@
-49,7
+49,7
@@
public class PrintVisitor extends AbstractVisitor {
*/
@Override
public void visitChannel(Channel aChannel) {
*/
@Override
public void visitChannel(Channel aChannel) {
-
System.out
.println(aChannel.getName());
+
_stream
.println(aChannel.getName());
super.visitChannel(aChannel);
}
}
super.visitChannel(aChannel);
}
}
diff --git
a/crawler/kiss/src/org/wamblee/crawler/kiss/guide/Program.java
b/crawler/kiss/src/org/wamblee/crawler/kiss/guide/Program.java
index 3d6065f5b401677c790b5a7d815cb2be1c35792a..44bdc52110b6b36a9e5e59163d5d91553d6601d0 100644
(file)
--- a/
crawler/kiss/src/org/wamblee/crawler/kiss/guide/Program.java
+++ b/
crawler/kiss/src/org/wamblee/crawler/kiss/guide/Program.java
@@
-231,11
+231,7
@@
public class Program {
*/
public boolean isRecordingPossible() {
try {
*/
public boolean isRecordingPossible() {
try {
- Action record = _programInfo.execute().getAction(RECORD_ACTION);
- if (record == null) {
- return false;
- }
- return true;
+ return _programInfo.execute().getAction(RECORD_ACTION) != null;
} catch (PageException e) {
return false;
}
} catch (PageException e) {
return false;
}
diff --git
a/support/src/org/wamblee/xml/DomUtils.java
b/support/src/org/wamblee/xml/DomUtils.java
index 3718debf782529b075591a141813cd6e83162d98..05eae128640fa9b70a829a7e7c33814e379ca891 100644
(file)
--- a/
support/src/org/wamblee/xml/DomUtils.java
+++ b/
support/src/org/wamblee/xml/DomUtils.java
@@
-30,6
+30,8
@@
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.apache.xml.serialize.OutputFormat;
import org.apache.xml.serialize.XMLSerializer;
import org.dom4j.DocumentException;
import org.apache.xml.serialize.OutputFormat;
import org.apache.xml.serialize.XMLSerializer;
import org.dom4j.DocumentException;
@@
-49,6
+51,8
@@
import org.xml.sax.SAXException;
*/
public final class DomUtils {
*/
public final class DomUtils {
+ private static final Log LOG = LogFactory.getLog(DomUtils.class);
+
/**
* Disabled default constructor.
*
/**
* Disabled default constructor.
*
@@
-149,7
+153,7
@@
public final class DomUtils {
for (int i = 0; i < attributes.getLength(); i++) {
Attr attribute = (Attr) attributes.item(i);
if (uniqueAttributes.containsKey(attribute.getNodeName())) {
for (int i = 0; i < attributes.getLength(); i++) {
Attr attribute = (Attr) attributes.item(i);
if (uniqueAttributes.containsKey(attribute.getNodeName())) {
-
System.out.println("Detected duplicate attribute
'"
+
LOG.info("Detected duplicate attribute (will be removed)
'"
+ attribute.getNodeName() + "'");
}
uniqueAttributes.put(attribute.getNodeName(), attribute);
+ attribute.getNodeName() + "'");
}
uniqueAttributes.put(attribute.getNodeName(), attribute);