From: Pierrick B. <br...@us...> - 2006-01-04 21:36:30
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/dom In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20518/src/org/exist/dom Modified Files: DocumentImpl.java BinaryDocument.java Log Message: Commented out now useless methods. Index: BinaryDocument.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/dom/BinaryDocument.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** BinaryDocument.java 3 Jan 2006 19:21:22 -0000 1.13 --- BinaryDocument.java 4 Jan 2006 21:36:17 -0000 1.14 *************** *** 86,90 **** ostream.writeByte((byte) permissions.getPermissions()); ! metadata.write(ostream); } --- 86,90 ---- ostream.writeByte((byte) permissions.getPermissions()); ! getMetadata().write(ostream); } *************** *** 110,115 **** permissions.setPermissions(perm); ! metadata = new DocumentMetadata(); ! metadata.read(istream); } } --- 110,116 ---- permissions.setPermissions(perm); ! DocumentMetadata metadata = new DocumentMetadata(); ! metadata.read(istream); ! setMetadata(metadata); } } Index: DocumentImpl.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/dom/DocumentImpl.java,v retrieving revision 1.92 retrieving revision 1.93 diff -C2 -d -r1.92 -r1.93 *** DocumentImpl.java 4 Jan 2006 16:27:17 -0000 1.92 --- DocumentImpl.java 4 Jan 2006 21:36:17 -0000 1.93 *************** *** 104,108 **** protected transient long metadataLocation = StoredNode.UNKNOWN_NODE_IMPL_ADDRESS; ! protected DocumentMetadata metadata = null; public DocumentImpl(DBBroker broker, Collection collection) { --- 104,108 ---- protected transient long metadataLocation = StoredNode.UNKNOWN_NODE_IMPL_ADDRESS; ! private DocumentMetadata metadata = null; public DocumentImpl(DBBroker broker, Collection collection) { *************** *** 487,491 **** --- 487,493 ---- } + /* public long getGID() { + //TOUNDERSTAND : what are the semantics of this 0 ? -pb return 0; } *************** *** 497,504 **** return StoredNode.UNKNOWN_NODE_IMPL_ADDRESS; } ! ! /* (non-Javadoc) ! * @see org.exist.dom.NodeImpl#setInternalAddress(long) ! */ public void setInternalAddress(long address) { } --- 499,503 ---- return StoredNode.UNKNOWN_NODE_IMPL_ADDRESS; } ! public void setInternalAddress(long address) { } *************** *** 507,510 **** --- 506,510 ---- return StoredNode.NODE_IMPL_UNKNOWN_GID; } + */ /* (non-Javadoc) *************** *** 631,644 **** */ public Node getFirstChild() { ! if(children == 0) return null; long address = childList[0]; ! return broker.objectWith(new NodeProxy(this, ! // 1, ! NodeProxy.DOCUMENT_ELEMENT_GID, address)); } public long getFirstChildAddress() { ! if(children == 0) return NodeProxy.UNKNOWN_NODE_ADDRESS; return childList[0]; --- 631,644 ---- */ public Node getFirstChild() { ! if (children == 0) return null; long address = childList[0]; ! return broker.objectWith( ! new NodeProxy(this, NodeProxy.DOCUMENT_ELEMENT_GID, address) ! ); } public long getFirstChildAddress() { ! if (children == 0) return NodeProxy.UNKNOWN_NODE_ADDRESS; return childList[0]; *************** *** 646,655 **** public NodeList getChildNodes() { ! NodeListImpl list = new NodeListImpl(); ! Node child; for (int i = 0; i < children; i++) { ! child = broker.objectWith(new NodeProxy(this, ! // 1, ! NodeProxy.DOCUMENT_ELEMENT_GID, childList[i])); list.add(child); } --- 646,654 ---- public NodeList getChildNodes() { ! NodeListImpl list = new NodeListImpl(); for (int i = 0; i < children; i++) { ! Node child = broker.objectWith( ! new NodeProxy(this, NodeProxy.DOCUMENT_ELEMENT_GID, childList[i]) ! ); list.add(child); } *************** *** 658,665 **** protected Node getPreviousSibling(StoredNode node) { ! NodeList cl = getChildNodes(); ! StoredNode next; for (int i = 0; i < cl.getLength(); i++) { ! next = (StoredNode) cl.item(i); if (StorageAddress.equals(node.getInternalAddress(), next.getInternalAddress())) return i == 0 ? null : cl.item(i - 1); --- 657,663 ---- protected Node getPreviousSibling(StoredNode node) { ! NodeList cl = getChildNodes(); for (int i = 0; i < cl.getLength(); i++) { ! StoredNode next = (StoredNode) cl.item(i); if (StorageAddress.equals(node.getInternalAddress(), next.getInternalAddress())) return i == 0 ? null : cl.item(i - 1); *************** *** 669,676 **** protected Node getFollowingSibling(StoredNode node) { ! NodeList cl = getChildNodes(); ! StoredNode next; for (int i = 0; i < cl.getLength(); i++) { ! next = (StoredNode) cl.item(i); if (StorageAddress.equals(node.getInternalAddress(), next.getInternalAddress())) return i == children - 1 ? null : cl.item(i + 1); --- 667,673 ---- protected Node getFollowingSibling(StoredNode node) { ! NodeList cl = getChildNodes(); for (int i = 0; i < cl.getLength(); i++) { ! StoredNode next = (StoredNode) cl.item(i); if (StorageAddress.equals(node.getInternalAddress(), next.getInternalAddress())) return i == children - 1 ? null : cl.item(i + 1); |