SCM

SCM Repository

[tm] Diff of /trunk/R/textmin/R/textrepo.R
ViewVC logotype

Diff of /trunk/R/textmin/R/textrepo.R

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

revision 54, Wed Sep 13 09:08:20 2006 UTC revision 62, Tue Oct 24 10:08:58 2006 UTC
# Line 2  Line 2 
2    
3  setGeneric("TextRepository", function(object, metaname = "created", meta = date()) standardGeneric("TextRepository"))  setGeneric("TextRepository", function(object, metaname = "created", meta = date()) standardGeneric("TextRepository"))
4  setMethod("TextRepository",  setMethod("TextRepository",
5            c("TextDocCol"),            signature(object = "TextDocCol"),
6            function(object, metaname, meta) {            function(object, metaname, meta) {
7                tr <- new("TextRepository", .Data = list(object), RepresentationMetaData = list(created = meta))                tr <- new("TextRepository", .Data = list(object), RepresentationMetaData = list(created = meta))
8                names(tr@RepresentationMetaData) <- metaname                names(tr@RepresentationMetaData) <- metaname
# Line 10  Line 10 
10            })            })
11    
12  setMethod("attachData",  setMethod("attachData",
13            c("TextRepository","TextDocCol"),            signature(object = "TextRepository", data = "TextDocCol"),
14            function(object, data) {            function(object, data) {
15                object@.Data <- as(c(object@.Data, data), "TextRepository")                object@.Data <- as(c(object@.Data, data), "TextRepository")
16                return(object)                return(object)
17            })            })
18    
19  setMethod("attachMetaData",  setMethod("attachMetaData",
20            c("TextRepository"),            signature(object = "TextRepository"),
21            function(object, name, metadata) {            function(object, name, metadata) {
22                object@RepresentationMetaData <- c(object@RepresentationMetaData, new = list(metadata))                object@RepresentationMetaData <- c(object@RepresentationMetaData, new = list(metadata))
23                names(object@RepresentationMetaData)[length(names(object@RepresentationMetaData))] <- name                names(object@RepresentationMetaData)[length(names(object@RepresentationMetaData))] <- name

Legend:
Removed from v.54  
changed lines
  Added in v.62

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