Revision: 874
http://openutils.svn.sourceforge.net/openutils/?rev=874&view=rev
Author: molaschi
Date: 2008-07-01 07:09:31 -0700 (Tue, 01 Jul 2008)
Log Message:
-----------
fix bug
Modified Paths:
--------------
trunk/openutils-mgnlbootstrapsync/src/main/java/it/openutils/mgnlbootstrapsync/listener/AbstractBootstrapSyncListener.java
Modified: trunk/openutils-mgnlbootstrapsync/src/main/java/it/openutils/mgnlbootstrapsync/listener/AbstractBootstrapSyncListener.java
===================================================================
--- trunk/openutils-mgnlbootstrapsync/src/main/java/it/openutils/mgnlbootstrapsync/listener/AbstractBootstrapSyncListener.java 2008-06-26 17:03:15 UTC (rev 873)
+++ trunk/openutils-mgnlbootstrapsync/src/main/java/it/openutils/mgnlbootstrapsync/listener/AbstractBootstrapSyncListener.java 2008-07-01 14:09:31 UTC (rev 874)
@@ -34,8 +34,8 @@
import org.xml.sax.XMLReader;
import org.xml.sax.helpers.XMLReaderFactory;
+
/**
- *
* @author mmolaschi
* @version $Id: $
*/
@@ -49,7 +49,6 @@
private Object synchronizationObject = new Object();
/**
- *
* @param watch watch for this listener
*/
public AbstractBootstrapSyncListener(BootstrapSyncRepositoryWatch watch)
@@ -57,7 +56,6 @@
this.watch = watch;
}
-
/**
* {@inheritDoc}
*/
@@ -109,12 +107,21 @@
try
{
- // get exported content
- exported = getRightContent(hm.getContent(path), watch.getNodeType());
- if (exported == null)
+
+ if (watch.getNodeType() != null)
{
- return;
+ // get exported content
+ exported = getRightContent(hm.getContent(path), watch.getNodeType());
+ if (exported == null)
+ {
+ return;
+ }
+
}
+ else
+ {
+ exported = hm.getContent(path);
+ }
}
catch (RepositoryException e)
{
@@ -213,9 +220,9 @@
}
}
}
-
+
/**
- * Go up in tree until the current node type equals passed item type
+ * Go up in tree until the current node type equals passed item type
* @param c current node
* @param itemType item type to check
* @return right node or null if not found
@@ -228,13 +235,9 @@
{
return c;
}
- if (c.getChildren() != null)
+ if (c.getParent() != null)
{
- Iterator it = c.getChildren().iterator();
- while(it.hasNext())
- {
- return getRightContent((Content)it.next(), itemType);
- }
+ return getRightContent(c.getParent(), itemType);
}
return null;
}
@@ -303,7 +306,6 @@
}
/**
- *
* @param fileName file name
* @param reader xml filter
* @param hm hierarchy manager
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|