|
From: <et...@us...> - 2011-10-20 19:17:54
|
Revision: 4494
http://mxquery.svn.sourceforge.net/mxquery/?rev=4494&view=rev
Author: etterth
Date: 2011-10-20 19:17:48 +0000 (Thu, 20 Oct 2011)
Log Message:
-----------
- Fixed memory
- Removed dependence of NodeStoreIterator on Window -> removed a bug that prevented fixing the memory
Modified Paths:
--------------
trunk/MXQuery/xqib_samples/prague/memory.htm
trunk/MXQuery/xqib_src/ch/ethz/mxquery/iterators/browser/NodeStoreIterator.java
trunk/MXQuery/xqib_src/ch/ethz/mxquery/iterators/browser/SingleNodeIterator.java
Modified: trunk/MXQuery/xqib_samples/prague/memory.htm
===================================================================
--- trunk/MXQuery/xqib_samples/prague/memory.htm 2011-10-19 23:51:52 UTC (rev 4493)
+++ trunk/MXQuery/xqib_samples/prague/memory.htm 2011-10-20 19:17:48 UTC (rev 4494)
@@ -89,7 +89,7 @@
return
(if (count($opendivs) < 2) then
if (b:getClasses($loc) ='found') then () else
- b:addClass($loc, 'open')
+ b:addClass($loc/.., 'open')
else ()
,
m:testwin())
Modified: trunk/MXQuery/xqib_src/ch/ethz/mxquery/iterators/browser/NodeStoreIterator.java
===================================================================
--- trunk/MXQuery/xqib_src/ch/ethz/mxquery/iterators/browser/NodeStoreIterator.java 2011-10-19 23:51:52 UTC (rev 4493)
+++ trunk/MXQuery/xqib_src/ch/ethz/mxquery/iterators/browser/NodeStoreIterator.java 2011-10-20 19:17:48 UTC (rev 4494)
@@ -26,15 +26,15 @@
import ch.ethz.mxquery.util.browser.dom.Element;
import ch.ethz.mxquery.util.browser.dom.Node;
-public class NodeStoreIterator extends Window {
+public class NodeStoreIterator extends Iterator {
protected Node store;
protected NodeToken current;
int attributeindex;
public NodeStoreIterator(Node store) {
- super();
- this.store = (Node)(Object)store;
+ super(null, null);
+ this.store = store;
}
public AttributeNodeToken getAttributeAt(Node node,int index){
@@ -138,122 +138,5 @@
called = 0;
}
- @Override
- public boolean hasItem(int position) throws MXQueryException {
- // TODO Auto-generated method stub
- return false;
- }
-
- @Override
- public XDMIterator getItem(int position) throws MXQueryException {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public boolean hasNextItem() throws MXQueryException {
- // TODO Auto-generated method stub
- return false;
- }
-
- @Override
- public XDMIterator nextItem() throws MXQueryException {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public Window getNewItemWindow(IntegerList values) throws MXQueryException {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public Window getNewWindow(int startPosition, int endPosition)
- throws MXQueryException {
- if (startPosition == 1
- && endPosition == Window.END_OF_STREAM_POSITION) {
- Window ret = new NodeStoreIterator(store);
- ret.setContext(context,false);
- return ret;
- } else {
- throw new MXQueryException("dont use window with integer parameters", "", null);
- }
- }
-
- @Override
- public int getStartNode() throws MXQueryException {
- // TODO Auto-generated method stub
- return 0;
- }
-
-
- public Window getNewWindow(int startPosition,
- int endPosition, long openTime, long closeTime) throws MXQueryException {
- //TODO: Add implementation
- return null;
- }
-
-
- public Window getNewWindow(int startPosition,
- int endPosition, long openTime, long closeTime, Object queryId) throws MXQueryException{
- //TODO: Add implementation
- return null;
- }
-
-
-
- public Window getEmptyWindow() throws MXQueryException{
- //TODO: Add implementation
- return null;
- }
-
- @Override
- public void destroyWindow() {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public boolean equals(Object other) {
- // TODO Auto-generated method stub
- return false;
- }
-
- @Override
- public int getWindowId() {
- // TODO Auto-generated method stub
- return 0;
- }
-
- @Override
- protected int getNodeId() throws MXQueryException {
- // TODO Auto-generated method stub
- return 0;
- }
-
- @Override
- public boolean isWindowInUse() {
- // TODO Auto-generated method stub
- return false;
- }
-
- @Override
- public void setWindowInUse(boolean windowInUse) {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public int getPosition() {
- // TODO Auto-generated method stub
- return 0;
- }
-
- @Override
- public Source getStore() {
- // TODO Auto-generated method stub
- return null;
- }
}
Modified: trunk/MXQuery/xqib_src/ch/ethz/mxquery/iterators/browser/SingleNodeIterator.java
===================================================================
--- trunk/MXQuery/xqib_src/ch/ethz/mxquery/iterators/browser/SingleNodeIterator.java 2011-10-19 23:51:52 UTC (rev 4493)
+++ trunk/MXQuery/xqib_src/ch/ethz/mxquery/iterators/browser/SingleNodeIterator.java 2011-10-20 19:17:48 UTC (rev 4494)
@@ -50,18 +50,6 @@
}
- @Override
- public Window getNewWindow(int startPosition, int endPosition)
- throws MXQueryException {
- if (startPosition == 1
- && endPosition == Window.END_OF_STREAM_POSITION) {
- Window ret = new SingleNodeIterator(store);
- ret.setContext(context,false);
- return ret;
- } else {
- throw new MXQueryException("dont use window with integer parameters", "", null);
- }
- }
@Override
protected XDMIterator copy(Context context, XDMIterator[] subIters,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|