SCM

SCM Repository

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

Annotation of /trunk/R/textmin/R/textrepo.R

Parent Directory Parent Directory | Revision Log Revision Log


Revision 52 - (view) (download)

1 : feinerer 52 # Author: Ingo Feinerer
2 :    
3 :     setGeneric("TextRepository", function(object, metaname = "created", meta = date()) standardGeneric("TextRepository"))
4 :     setMethod("TextRepository",
5 :     c("TextDocCol"),
6 :     function(object, metaname, meta) {
7 :     tr <- new("TextRepository", .Data = list(object), RepresentationMetaData = list(created = meta))
8 :     names(tr@RepresentationMetaData) <- metaname
9 :     return(tr)
10 :     })
11 :    
12 :    
13 :     setMethod("attachData",
14 :     c("TextRepository","TextDocCol"),
15 :     function(object, data) {
16 :     object@.Data <- as(c(object@.Data, data), "TextRepository")
17 :     return(object)
18 :     })
19 :    
20 :     setMethod("attachMetaData",
21 :     c("TextRepository"),
22 :     function(object, name, metadata) {
23 :     object@RepresentationMetaData <- c(object@RepresentationMetaData, new = list(metadata))
24 :     names(object@RepresentationMetaData)[length(names(object@RepresentationMetaData))] <- name
25 :     return(object)
26 :     })

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