xquery/XQuery__ConnectCommand.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Mon, 02 Jul 2018 08:46:01 +0200
changeset 305 bad21c4f64bf
parent 296 ea3dbc023c80
permissions -rw-r--r--
Tagged Smalltalk/X 8.0.0

"{ Package: 'stx:goodies/xmlsuite/xquery' }"

"{ NameSpace: XQuery }"

TriggerCommand subclass:#ConnectCommand
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'XQuery-Trigger Creating'
!


!ConnectCommand class methodsFor:'priorities'!

priority
    "Superclass says that I am responsible to implement this method"

    ^5

    "Created: / 25-03-2012 / 15:18:19 / Adam Senk <senkadam@gmail.com>"
! !

!ConnectCommand methodsFor:'accessing'!

targetSequence
    ^ targetSequence
!

targetSequence:something
    targetSequence := something.
!

triggerDefSequence
    ^ sourceSequence

    "Modified: / 25-03-2012 / 13:31:24 / Adam Senk <senkadam@gmail.com>"
!

triggerDefSequence:something
    sourceSequence := something.

    "Modified: / 25-03-2012 / 13:32:02 / Adam Senk <senkadam@gmail.com>"
! !

!ConnectCommand methodsFor:'connecting'!

connect: triggerDefNode to: node

    node documentAdaptor
       connectTriggerDef: triggerDefNode nodeId to: node nodeId

    "Created: / 25-03-2012 / 13:35:49 / Adam Senk <senkadam@gmail.com>"
! !

!ConnectCommand methodsFor:'executing'!

execute
    "Superclass says that I am responsible to implement this method"

    self sourceSequence
        do:[:node|self connect: node  to: self targetSequence first]

    "Created: / 25-03-2012 / 13:33:53 / Adam Senk <senkadam@gmail.com>"
! !

!ConnectCommand class methodsFor:'documentation'!

version_SVN
    ^ '$Id$'
! !