SCM

SCM Repository

[tm] Diff of /pkg/R/aobjects.R
ViewVC logotype

Diff of /pkg/R/aobjects.R

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 885, Thu Jan 29 09:34:44 2009 UTC revision 886, Thu Jan 29 22:47:34 2009 UTC
# Line 241  Line 241 
241  }  }
242  setMethod("DMetaData", "Corpus",  setMethod("DMetaData", "Corpus",
243            function(object) {            function(object) {
244                if (DBControl(object)[["useDb"]]) {                if (DBControl(object)[["useDb"]] && require("filehash")) {
245                    db <- dbInit(DBControl(object)[["dbName"]], DBControl(object)[["dbType"]])                    db <- dbInit(DBControl(object)[["dbName"]], DBControl(object)[["dbType"]])
246                    result <- dbFetch(db, "DMetaData")                    result <- dbFetch(db, "DMetaData")
247                    index <- object@DMetaData[[1, "subset"]]                    index <- object@DMetaData[[1, "subset"]]
# Line 255  Line 255 
255  setGeneric("DMetaData<-", function(x, value) standardGeneric("DMetaData<-"))  setGeneric("DMetaData<-", function(x, value) standardGeneric("DMetaData<-"))
256  setReplaceMethod("DMetaData", "Corpus",  setReplaceMethod("DMetaData", "Corpus",
257                   function(x, value) {                   function(x, value) {
258                       if (DBControl(x)[["useDb"]]) {                       if (DBControl(x)[["useDb"]] && require("filehash")) {
259                           db <- dbInit(DBControl(x)[["dbName"]], DBControl(x)[["dbType"]])                           db <- dbInit(DBControl(x)[["dbName"]], DBControl(x)[["dbType"]])
260                           db[["DMetaData"]] <- value                           db[["DMetaData"]] <- value
261                           x@DMetaData[[1, "subset"]] <- NA                           x@DMetaData[[1, "subset"]] <- NA

Legend:
Removed from v.885  
changed lines
  Added in v.886

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business Powered By FusionForge