Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
FATE:dbxml-2.4
dbxml-2.4
diff.2.4.16.metadata.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File diff.2.4.16.metadata.patch of Package dbxml-2.4
diff -r 3ea6fcd222af src/dbxml/Document.cpp --- a/src/dbxml/Document.cpp Wed Nov 05 12:39:38 2008 -0500 +++ b/src/dbxml/Document.cpp Tue Nov 18 10:11:16 2008 -0500 @@ -571,6 +571,10 @@ consumed(getName(), consumed_); ret = new MemBufInputStream(0, 0, getName().c_str(),false); } + if(definitiveContent_ == DBT) { + dbtContent_ = 0; + definitiveContent_ = NONE; + } return ret; } @@ -680,6 +684,7 @@ { changeContentToNsDom(isns); + if (!nsDocument_) return 0; //empty document if (nid.isDocRootNid()) return nsDocument_->getDocumentNode(); NsNode *nsNode = nsDocument_->getNode(nid, /*getNext*/false); diff -r 3ea6fcd222af src/dbxml/DocumentDatabase.cpp --- a/src/dbxml/DocumentDatabase.cpp Wed Nov 05 12:39:38 2008 -0500 +++ b/src/dbxml/DocumentDatabase.cpp Tue Nov 18 10:11:16 2008 -0500 @@ -184,9 +184,6 @@ id = ((Document&)old_document).getID(); new_document.getIDToSet() = id; resetId = true; - // clear modified flag if set on name - const_cast<Document*>(&new_document)-> - clearModified(Name(metaDataName_uri_name)); } } else { err = indexer.getContainer()->getDocument( diff -r 3ea6fcd222af src/dbxml/nodeStore/NsDocumentDatabase.cpp --- a/src/dbxml/nodeStore/NsDocumentDatabase.cpp Wed Nov 05 12:39:38 2008 -0500 +++ b/src/dbxml/nodeStore/NsDocumentDatabase.cpp Tue Nov 18 10:11:16 2008 -0500 @@ -173,9 +173,6 @@ id = ((Document&)old_document).getID(); new_document.getIDToSet() = id; resetId = true; - // clear modified flag if set on name - const_cast<Document*>(&new_document)-> - clearModified(Name(metaDataName_uri_name)); } } else { diff -r 3ea6fcd222af src/java/com/sleepycat/dbxml/XmlDocument.java --- a/src/java/com/sleepycat/dbxml/XmlDocument.java Wed Nov 05 12:39:38 2008 -0500 +++ b/src/java/com/sleepycat/dbxml/XmlDocument.java Tue Nov 18 10:11:16 2008 -0500 @@ -115,9 +115,7 @@ content.stream = null; content.type = NONE; return ins; - }else if (!content.hasContent() && docID == 0) - return null; - else + } else return HelperFunctions.getContentAsXmlInputStream(this); } @@ -127,9 +125,7 @@ content.reader = null; content.type = NONE; return xer; - }else if (!content.hasContent() && docID == 0) - return null; - else + } else return HelperFunctions.getContentAsEventReader(this); } @@ -214,6 +210,13 @@ } //The rest of this class is for internal use. + protected boolean isConstructed() + { + if(results == null && docID == 0) + return true; + return false; + } + /* If both modified and removed are set to false then the meta data is * only being added if it does not already exist. */ @@ -257,11 +260,6 @@ docID = documentId; cid = containerId; content = new Content(); - } - - protected void finalize() throws XmlException { - metaData.clear(); - content.clear(); } protected void copy(XmlDocument o) throws XmlException { @@ -359,6 +357,10 @@ protected void setEventWriter(long writer){ eventWriter = writer; + } + + protected Content getEmptyContent() { + return new Content(); } class Content { diff -r 3ea6fcd222af src/java/com/sleepycat/dbxml/XmlValue.java --- a/src/java/com/sleepycat/dbxml/XmlValue.java Wed Nov 05 12:39:38 2008 -0500 +++ b/src/java/com/sleepycat/dbxml/XmlValue.java Tue Nov 18 10:11:16 2008 -0500 @@ -9,6 +9,8 @@ package com.sleepycat.dbxml; import java.util.*; + +import com.sleepycat.dbxml.XmlDocument.Content; public class XmlValue { protected Value value; @@ -69,7 +71,10 @@ public XmlValue(XmlDocument document) throws XmlException { - XmlValue xmlvalue = HelperFunctions.createDocumentValue(document); + Content con = document.content; + document.content = document.getEmptyContent(); //Prevents the content from being consumed + XmlValue xmlvalue = HelperFunctions.createDocumentValue(document); + document.content = con; valueType = xmlvalue.getType(); value = new NodeValue((NodeValue)xmlvalue.value); ((NodeValue)value).setDocument(document); diff -r 3ea6fcd222af src/java/dbxml_java_wrap.cpp --- a/src/java/dbxml_java_wrap.cpp Wed Nov 05 12:39:38 2008 -0500 +++ b/src/java/dbxml_java_wrap.cpp Tue Nov 18 10:11:16 2008 -0500 @@ -1516,10 +1516,8 @@ XmlValue value((XmlValue::Type)type, v); } SWIGINTERN XmlInputStream *HelperFunctions_getContentAsXmlInputStream(XmlDocument &doc){ - XmlEventReader &reader = doc.getContentAsEventReader(); - doc.setContentAsEventReader(reader); - return doc.getContentAsXmlInputStream(); - } + return doc.getContentAsXmlInputStream(); + } SWIGINTERN XmlEventReader &HelperFunctions_getContentAsEventReader(XmlDocument &doc){ return doc.getContentAsEventReader(); }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor