xquery/XQuery__UntypedAtomicToAnyAtomicTypeCast.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Tue, 12 May 2015 12:20:53 +0100
changeset 296 ea3dbc023c80
parent 241 xquery/trunk/XQuery__UntypedAtomicToAnyAtomicTypeCast.st@e28ef0f20186
permissions -rw-r--r--
Post-convert fixes Removed intermediate `trunk` directories used for branching in SVN

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

"{ NameSpace: XQuery }"

AnyAtomicTypeToAnyAtomicTypeCast subclass:#UntypedAtomicToAnyAtomicTypeCast
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'XQuery-TypeCasting'
!


!UntypedAtomicToAnyAtomicTypeCast methodsFor:'casting'!

cast
    self checkLexicalForm.
    ^ AtomicItem withValue: atomicValue nodeId asType: anotherType typeName.

    "Created: / 17-11-2009 / 16:21:46 / Jan Kurs <kursj1@fel.cvut.cz>"
!

checkLexicalForm
    (anotherType checkLexicalForm: atomicValue stringValue) ifFalse: [
        self raiseError: '[err:FORG0001]' withMessage: 'lexical form is wrong'.
    ].

    "Created: / 17-11-2009 / 16:52:45 / Jan Kurs <kursj1@fel.cvut.cz>"
! !

!UntypedAtomicToAnyAtomicTypeCast class methodsFor:'documentation'!

version_SVN
    ^ '$Id$'
! !