TinCan.Statement Class
Constructor
TinCan.Statement
    
        - 
                    
                        [cfg]
- 
                    
                        [initCfg]
Parameters:
- 
                    
                        [cfg]Object optionalValues to set in properties - 
                                
                                    [id]String optionalStatement ID (UUID) 
- 
                                
                                    [actor]TinCan.Agent optionalActor of statement 
- 
                                
                                    [verb]TinCan.Verb optionalVerb of statement 
- 
                                
                                    [object]TinCan.Activity | TinCan.Agent | TinCan.Group | TinCan.StatementRef | TinCan.SubStatement optionalAlias for 'target' 
- 
                                
                                    [target]TinCan.Activity | TinCan.Agent | TinCan.Group | TinCan.StatementRef | TinCan.SubStatement optionalObject of statement 
- 
                                
                                    [result]TinCan.Result optionalStatement Result 
- 
                                
                                    [context]TinCan.Context optionalStatement Context 
- 
                                
                                    [authority]TinCan.Agent optionalStatement Authority 
- 
                                
                                    [attachments]TinCan.Attachment optionalStatement Attachments 
- 
                                
                                    [timestamp]String optionalISO8601 Date/time value 
- 
                                
                                    [stored]String optionalISO8601 Date/time value 
- 
                                
                                    [version]String optionalVersion of the statement (post 0.95) 
 
- 
                                
                                    
- 
                    
                        [initCfg]Object optionalConfiguration of initialization process - 
                                
                                    [storeOriginal]Integer optionalWhether to store a JSON stringified version of the original options object, pass number of spaces used for indent 
- 
                                
                                    [doStamp]Boolean optionalWhether to automatically set the 'id' and 'timestamp' properties (default: true) 
 
- 
                                
                                    
Item Index
Methods
asVersion
    
        - 
                    
                        [version]
Parameters:
- 
                    
                        [version]String optionalVersion to return (defaults to newest supported) 
fromJSON
    
        ()
    
    
        
            Object
        
    
    
    
    
    
        static
    
    
    
    
    Returns:
Statement
hasAttachmentsWithContent
    
        ()
    
    
    
    
    
    
    
    
    
    Checks if the Statement has at least one attachment with content
init
    
        - 
                    
                        [properties]
- 
                    
                        [cfg]
Parameters:
- 
                    
                        [properties]Object optionalConfiguration used to set properties (see constructor) 
- 
                    
                        [cfg]Object optionalConfiguration used to initialize (see constructor) 
log
    
        ()
    
    
    
    
    
    
    
    
    
    stamp
    
        ()
    
    
    
    
    
    
    
    
    
    Sets 'id' and 'timestamp' properties if not already set
toString
    
        ()
    
    
        
            String
        
    
    
    
    
    
    
    
    
    Returns:
String representation of the statement
Properties
attachments
    Array of TinCan.Attachment
    
    
    
    
    
    context
    Object
    
    
    
    
    
    degraded
    Boolean
    
    
    
    
    
    Default: false
id
    String
    
    
    
    
    
    inProgress
    Boolean
    
        deprecated
    
    
    
    
    
    LOG_SRC
    Unknown
    
    
    
    
    
    originalJSON
    String
    
    
    
    
    
    result
    Object
    
    
    
    
    
    stored
    String
    
    
    
    
    
    target
    TinCan.Activity | TinCan.Agent | TinCan.Group | TinCan.StatementRef | TinCan.SubStatement | Null
    
    
    
    
    
    timestamp
    String
    
    
    
    
    
    version
    String
    
    
    
    
    
    voided
    Boolean
    
        deprecated
    
    
    
    
    
    Default: null
