Modified to use NS_RDF_ASSERTION_ACCEPTED and NS_RDF_ASSERTION_REJECTED return codes (local store implementation). Added local store construction to each XUL hierarchical widget.

This commit is contained in:
waterson%netscape.com 1999-04-07 06:29:14 +00:00
Родитель 7893b66e74
Коммит b79bc8fad4
4 изменённых файлов: 24 добавлений и 16 удалений

Просмотреть файл

@ -997,10 +997,9 @@ RDFGenericBuilderImpl::OnSetAttribute(nsIDOMElement* aElement, const nsString& a
return rv;
}
if (NS_FAILED(rv = mDB->Assert(resource, property, value, PR_TRUE))) {
NS_ERROR("unable to assert new property value");
return rv;
}
rv = mDB->Assert(resource, property, value, PR_TRUE);
NS_ASSERTION(rv == NS_RDF_ASSERTION_ACCEPTED, "unable to assert new property value");
if (NS_FAILED(rv)) return rv;
}
return NS_OK;

Просмотреть файл

@ -997,10 +997,9 @@ RDFGenericBuilderImpl::OnSetAttribute(nsIDOMElement* aElement, const nsString& a
return rv;
}
if (NS_FAILED(rv = mDB->Assert(resource, property, value, PR_TRUE))) {
NS_ERROR("unable to assert new property value");
return rv;
}
rv = mDB->Assert(resource, property, value, PR_TRUE);
NS_ASSERTION(rv == NS_RDF_ASSERTION_ACCEPTED, "unable to assert new property value");
if (NS_FAILED(rv)) return rv;
}
return NS_OK;

Просмотреть файл

@ -1246,10 +1246,9 @@ RDFXULBuilderImpl::OnSetAttribute(nsIDOMElement* aElement, const nsString& aName
return rv;
}
if (NS_FAILED(rv = mDB->Assert(resource, property, value, PR_TRUE))) {
NS_ERROR("unable to assert new property value");
return rv;
}
rv = mDB->Assert(resource, property, value, PR_TRUE);
NS_ASSERTION(rv == NS_RDF_ASSERTION_ACCEPTED, "unable to assert new property value");
if (NS_FAILED(rv)) return rv;
}
return NS_OK;
@ -1953,6 +1952,18 @@ RDFXULBuilderImpl::CreateBuilder(const nsCID& aBuilderCID, nsIContent* aElement,
return rv;
}
// Add the local store as the first data source in the db.
{
nsCOMPtr<nsIRDFDataSource> localstore;
rv = gRDFService->GetDataSource("rdf:local-store", getter_AddRefs(localstore));
NS_ASSERTION(NS_SUCCEEDED(rv), "unable to get local store");
if (NS_FAILED(rv)) return rv;
rv = db->AddDataSource(localstore);
NS_ASSERTION(NS_SUCCEEDED(rv), "unable to add local store to db");
if (NS_FAILED(rv)) return rv;
}
// Parse datasources: they are assumed to be a whitespace
// separated list of URIs; e.g.,
//

Просмотреть файл

@ -997,10 +997,9 @@ RDFGenericBuilderImpl::OnSetAttribute(nsIDOMElement* aElement, const nsString& a
return rv;
}
if (NS_FAILED(rv = mDB->Assert(resource, property, value, PR_TRUE))) {
NS_ERROR("unable to assert new property value");
return rv;
}
rv = mDB->Assert(resource, property, value, PR_TRUE);
NS_ASSERTION(rv == NS_RDF_ASSERTION_ACCEPTED, "unable to assert new property value");
if (NS_FAILED(rv)) return rv;
}
return NS_OK;