1 /*
2 * Copyright 2006-2008 The FLWOR Foundation.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 #include "stdafx.h"
17
18 #include <typeinfo>
19
20 #include <zorba/error.h>
21 #include "diagnostics/xquery_diagnostics.h"
22 #include "diagnostics/assert.h"
23
24 #include "zorbatypes/datetime.h"
25
26 #include "store/api/item.h"
27 #include "store/api/iterator.h"
28 #include "store_defs.h"
29 #include "atomic_items.h"
30 #include "node_items.h"
31 #ifdef ZORBA_WITH_JSON
32 # include "json_items.h"
33 #endif
34
35 #include "runtime/function_item/function_item.h"
36
37
38 namespace zorba
39 {
40
41 namespace store
42 {
43
44
addReference() const45 void Item::addReference() const
46 {
47 #if defined WIN32 && !defined CYGWIN && !defined ZORBA_FOR_ONE_THREAD_ONLY
48 if (isNode())
49 {
50 InterlockedIncrement(theUnion.treeRCPtr);
51 InterlockedIncrement(&theRefCount);
52 }
53 else
54 {
55 InterlockedIncrement(&theRefCount);
56 }
57
58 #else
59
60 switch (getKind())
61 {
62 case NODE:
63 {
64 SYNC_CODE(static_cast<const simplestore::XmlNode*>(this)->getRCLock()->acquire());
65 ++(*theUnion.treeRCPtr);
66 ++theRefCount;
67 SYNC_CODE(static_cast<const simplestore::XmlNode*>(this)->getRCLock()->release());
68 return;
69 }
70 #ifdef ZORBA_WITH_JSON
71 case JSONIQ:
72 {
73 SYNC_CODE(static_cast<const simplestore::json::JSONItem*>(this)->getRCLock()->acquire());
74 ++theRefCount;
75 SYNC_CODE(static_cast<const simplestore::json::JSONItem*>(this)->getRCLock()->release());
76 return;
77 }
78 #endif
79 case ATOMIC:
80 case ERROR_:
81 {
82 SYNC_CODE(static_cast<const simplestore::AtomicItem*>(this)->getRCLock()->acquire());
83 ++theRefCount;
84 SYNC_CODE(static_cast<const simplestore::AtomicItem*>(this)->getRCLock()->release());
85 return;
86 }
87 case LIST:
88 {
89 SYNC_CODE(static_cast<const simplestore::ItemVector*>(this)->getRCLock()->acquire());
90 ++theRefCount;
91 SYNC_CODE(static_cast<const simplestore::ItemVector*>(this)->getRCLock()->release());
92 return;
93 }
94 case FUNCTION:
95 {
96 SYNC_CODE(static_cast<const FunctionItem*>(this)->getRCLock()->acquire());
97 ++theRefCount;
98 SYNC_CODE(static_cast<const FunctionItem*>(this)->getRCLock()->release());
99 return;
100 }
101 case PUL:
102 {
103 ++theRefCount;
104 return;
105 }
106 default:
107 {
108 ZORBA_ASSERT(false);
109 }
110 }
111 #endif
112 }
113
114
removeReference()115 void Item::removeReference()
116 {
117 #if defined WIN32 && !defined CYGWIN && !defined ZORBA_FOR_ONE_THREAD_ONLY
118 if (isNode())
119 {
120 InterlockedDecrement(&theRefCount);
121 if (!InterlockedDecrement(theUnion.treeRCPtr))
122 {
123 free();
124 return;
125 }
126 }
127 else if (!InterlockedDecrement(&theRefCount))
128 {
129 free();
130 return;
131 }
132
133 #else
134
135 switch (getKind())
136 {
137 case NODE:
138 {
139 SYNC_CODE(static_cast<const simplestore::XmlNode*>(this)->getRCLock()->acquire());
140
141 --theRefCount;
142 if (--(*theUnion.treeRCPtr) == 0)
143 {
144 SYNC_CODE(static_cast<const simplestore::XmlNode*>(this)->getRCLock()->release());
145 free();
146 return;
147 }
148
149 SYNC_CODE(static_cast<const simplestore::XmlNode*>(this)->getRCLock()->release());
150 return;
151 }
152 #ifdef ZORBA_WITH_JSON
153 case JSONIQ:
154 {
155 SYNC_CODE(static_cast<const simplestore::json::JSONItem*>(this)->getRCLock()->acquire());
156
157 if (--theRefCount == 0)
158 {
159 SYNC_CODE(static_cast<const simplestore::json::JSONItem*>(this)->getRCLock()->release());
160 free();
161 return;
162 }
163
164 SYNC_CODE(static_cast<const simplestore::json::JSONItem*>(this)->getRCLock()->release());
165 return;
166 }
167 #endif
168 case ATOMIC:
169 case ERROR_:
170 {
171 SYNC_CODE(static_cast<const simplestore::AtomicItem*>(this)->getRCLock()->acquire());
172
173 if (--theRefCount == 0)
174 {
175 SYNC_CODE(static_cast<const simplestore::AtomicItem*>(this)->getRCLock()->release());
176 free();
177 return;
178 }
179
180 SYNC_CODE(static_cast<const simplestore::AtomicItem*>(this)->getRCLock()->release());
181 return;
182 }
183 case LIST:
184 {
185 SYNC_CODE(static_cast<const simplestore::ItemVector*>(this)->getRCLock()->acquire());
186
187 if (--theRefCount == 0)
188 {
189 SYNC_CODE(static_cast<const simplestore::ItemVector*>(this)->getRCLock()->release());
190 free();
191 return;
192 }
193
194 SYNC_CODE(static_cast<const simplestore::ItemVector*>(this)->getRCLock()->release());
195 return;
196 }
197 case FUNCTION:
198 {
199 SYNC_CODE(static_cast<const FunctionItem*>(this)->getRCLock()->acquire());
200
201 if (--theRefCount == 0)
202 {
203 SYNC_CODE(static_cast<const FunctionItem*>(this)->getRCLock()->release());
204 free();
205 return;
206 }
207
208 SYNC_CODE(static_cast<const FunctionItem*>(this)->getRCLock()->release());
209 return;
210 }
211 case PUL:
212 {
213 if (--theRefCount == 0)
214 free();
215
216 return;
217 }
218 default:
219 {
220 ZORBA_ASSERT(false);
221 }
222 }
223
224 #endif
225 }
226
227
getKind() const228 Item::ItemKind Item::getKind() const
229 {
230 //if (theUnion.treeRCPtr == 0)
231 // return UNKNOWN;
232
233 if ((reinterpret_cast<uint64_t>(theUnion.treeRCPtr) & 0x1) == 0)
234 return NODE;
235
236 return static_cast<ItemKind>(theUnion.itemKind);
237 }
238
239
isNode() const240 bool Item::isNode() const
241 {
242 return ((reinterpret_cast<uint64_t>(theUnion.treeRCPtr) & 0x1) == 0 &&
243 theUnion.treeRCPtr != 0);
244 }
245
246
isAtomic() const247 bool Item::isAtomic() const
248 {
249 return (theUnion.itemKind == ATOMIC);
250 }
251
252
isList() const253 bool Item::isList() const
254 {
255 return (theUnion.itemKind == LIST);
256 }
257
258
isPul() const259 bool Item::isPul() const
260 {
261 return (theUnion.itemKind == PUL);
262 }
263
264
isError() const265 bool Item::isError() const
266 {
267 return (theUnion.itemKind == ERROR_);
268 }
269
270
isFunction() const271 bool Item::isFunction() const
272 {
273 return (theUnion.itemKind == FUNCTION);
274 }
275
276
277 #ifdef ZORBA_WITH_JSON
278
isJSONItem() const279 bool Item::isJSONItem() const
280 {
281 return (theUnion.itemKind == JSONIQ);
282 }
283
284
isJSONObject() const285 bool Item::isJSONObject() const
286 {
287 return false;
288 }
289
290
isJSONArray() const291 bool Item::isJSONArray() const
292 {
293 return false;
294 }
295
296 #endif
297
298
printKind() const299 zstring Item::printKind() const
300 {
301 if (isNode())
302 return "node";
303
304 switch (theUnion.itemKind)
305 {
306 case ATOMIC:
307 return "atomic";
308
309 #ifdef ZORBA_WITH_JSON
310 case JSONIQ:
311 return "json";
312 #endif
313
314 case FUNCTION:
315 return "function";
316
317 case PUL:
318 return "pul";
319
320 case ERROR_:
321 return "error";
322
323 default:
324 return "unknown";
325 }
326 }
327
328
getBaseItem() const329 Item* Item::getBaseItem() const
330 {
331 return NULL;
332 }
333
334
getTypeCode() const335 store::SchemaTypeCode Item::getTypeCode() const
336 {
337 throw ZORBA_EXCEPTION(
338 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
339 ERROR_PARAMS( __FUNCTION__, typeid(*this).name() )
340 );
341 }
342
343
getType() const344 Item* Item::getType() const
345 {
346 throw ZORBA_EXCEPTION(
347 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
348 ERROR_PARAMS( __FUNCTION__, typeid(*this).name() )
349 );
350 }
351
352
hash(long timezone,const XQPCollator * coll) const353 uint32_t Item::hash(long timezone, const XQPCollator* coll) const
354 {
355 throw ZORBA_EXCEPTION(zerr::ZSTR0040_TYPE_ERROR,
356 ERROR_PARAMS(ZED(NoHashItemOfType_2), getType()->getStringValue()));
357 };
358
359
equals(const store::Item * other,long timezone,const XQPCollator * aCollation) const360 bool Item::equals(
361 const store::Item* other,
362 long timezone,
363 const XQPCollator* aCollation) const
364 {
365 throw ZORBA_EXCEPTION(zerr::ZSTR0040_TYPE_ERROR,
366 ERROR_PARAMS(ZED(NoCompareTypes_23),
367 getType()->getStringValue(),
368 other->getType()->getStringValue()));
369 }
370
371
compare(const store::Item * other,long timezone,const XQPCollator * aCollation) const372 long Item::compare(
373 const store::Item* other,
374 long timezone,
375 const XQPCollator* aCollation) const
376 {
377 throw ZORBA_EXCEPTION(zerr::ZSTR0040_TYPE_ERROR,
378 ERROR_PARAMS(ZED(NoCompareTypes_23),
379 getType()->getStringValue(),
380 other->getType()->getStringValue()));
381 }
382
383
getEBV() const384 bool Item::getEBV() const
385 {
386 throw ZORBA_EXCEPTION(zerr::ZSTR0040_TYPE_ERROR,
387 ERROR_PARAMS(ZED(OperationNotDef_23),
388 ZED(EffectiveBooleanValue),
389 getType()->getStringValue()));
390 }
391
392
getStringValue() const393 zstring Item::getStringValue() const
394 {
395 throw ZORBA_EXCEPTION(
396 zerr::ZSTR0040_TYPE_ERROR,
397 ERROR_PARAMS(
398 ZED( OperationNotDef_23 ), "string-value",
399 getType()->getStringValue()
400 )
401 );
402 }
403
404
getStringValue2(zstring & val) const405 void Item::getStringValue2(zstring& val) const
406 {
407 throw ZORBA_EXCEPTION(
408 zerr::ZSTR0040_TYPE_ERROR,
409 ERROR_PARAMS(
410 ZED( OperationNotDef_23 ), "string-value",
411 getType()->getStringValue()
412 )
413 );
414 }
415
416
appendStringValue(zstring & buf) const417 void Item::appendStringValue(zstring& buf) const
418 {
419 throw ZORBA_EXCEPTION(
420 zerr::ZSTR0040_TYPE_ERROR,
421 ERROR_PARAMS(
422 ZED( OperationNotDef_23 ), ZED( EffectiveBooleanValue ),
423 getType()->getStringValue()
424 )
425 );
426 }
427
428
429 #ifndef ZORBA_NO_FULL_TEXT
430 FTTokenIterator_t
getTokens(TokenizerProvider const &,Tokenizer::State &,locale::iso639_1::type,bool) const431 Item::getTokens( TokenizerProvider const&, Tokenizer::State&,
432 locale::iso639_1::type, bool ) const
433 {
434 throw ZORBA_EXCEPTION(
435 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
436 ERROR_PARAMS( __FUNCTION__, typeid(*this).name() )
437 );
438 }
439 #endif /* ZORBA_NO_FULL_TEXT */
440
441 /* --------------------- Methods for AtomicValues --------------------------- */
442
443
444 /**
445 * Accessor for xs:qname
446 */
getNamespace() const447 const zstring& Item::getNamespace() const
448 {
449 throw ZORBA_EXCEPTION(
450 zerr::ZSTR0040_TYPE_ERROR,
451 ERROR_PARAMS(
452 ZED( OperationNotDef_23 ), "Item::getNamespace()",
453 getType()->getStringValue()
454 )
455 );
456 }
457
458
459 /**
460 * Accessor for xs:qname
461 */
getPrefix() const462 const zstring& Item::getPrefix() const
463 {
464 throw ZORBA_EXCEPTION(
465 zerr::ZSTR0040_TYPE_ERROR,
466 ERROR_PARAMS(
467 ZED( OperationNotDef_23 ), "Item::getPrefix()",
468 getType()->getStringValue()
469 )
470 );
471 }
472
473
474 /**
475 * Accessor for xs:qname
476 */
getLocalName() const477 const zstring& Item::getLocalName() const
478 {
479 throw ZORBA_EXCEPTION(
480 zerr::ZSTR0040_TYPE_ERROR,
481 ERROR_PARAMS(
482 ZED( OperationNotDef_23 ), "Item::getLocalName()",
483 getType()->getStringValue()
484 )
485 );
486 }
487
488
489 /**
490 * Accessor for xs:untypedAtomic and xs:string and its subtypes
491 */
getString() const492 const zstring& Item::getString() const
493 {
494 throw ZORBA_EXCEPTION(
495 zerr::ZSTR0040_TYPE_ERROR,
496 ERROR_PARAMS(
497 ZED( OperationNotDef_23 ), "Item::getString()",
498 getType()->getStringValue()
499 )
500 );
501 }
502
503
504 /**
505 * Accessor for xs:base64Binary
506 */
getBase64BinaryValue(size_t &) const507 const char* Item::getBase64BinaryValue(size_t&) const
508 {
509 throw ZORBA_EXCEPTION(
510 zerr::ZSTR0040_TYPE_ERROR,
511 ERROR_PARAMS(
512 ZED( OperationNotDef_23 ), "Item::getBase64BinaryValue()",
513 getType()->getStringValue()
514 )
515 );
516 }
517
518
519 /**
520 * Checks whether a base64 item's content is already encoded
521 *
522 * @return true only if it is.
523 */
isEncoded() const524 bool Item::isEncoded() const
525 {
526 throw ZORBA_EXCEPTION(
527 zerr::ZSTR0040_TYPE_ERROR,
528 ERROR_PARAMS(
529 ZED( OperationNotDef_23 ), "Item::isEncoded()",
530 getType()->getStringValue()
531 )
532 );
533 }
534
535
536 /**
537 * Accessor for xs:boolean
538 */
getBooleanValue() const539 bool Item::getBooleanValue() const
540 {
541 throw ZORBA_EXCEPTION(
542 zerr::ZSTR0040_TYPE_ERROR,
543 ERROR_PARAMS(
544 ZED( OperationNotDef_23 ), "Item::getBooleanValue()",
545 getType()->getStringValue()
546 )
547 );
548 }
549
550 /**
551 * Accessor for xs:decimal, xs:integer, xs:nonPositiveInteger xs:negativeInteger,
552 * xs:nonNegativeInteger xs:positiveInteger, xs:(unsigned)long, xs:(unsigned)int,
553 * xs:(unsigned)short, xs:(unsigned)byte
554 */
getDecimalValue() const555 xs_decimal Item::getDecimalValue() const
556 {
557 throw ZORBA_EXCEPTION(
558 zerr::ZSTR0040_TYPE_ERROR,
559 ERROR_PARAMS(
560 ZED( OperationNotDef_23 ), "Item::getDecimalValue()",
561 getType()->getStringValue()
562 )
563 );
564 }
565
566
567 /**
568 * Accessor for xs:integer, xs:nonPositiveInteger xs:negativeInteger,
569 * xs:nonNegativeInteger xs:positiveInteger, xs:(unsigned)long, xs:(unsigned)int,
570 * xs:(unsigned)short, xs:(unsigned)byte
571 */
getIntegerValue() const572 xs_integer Item::getIntegerValue() const
573 {
574 throw ZORBA_EXCEPTION(
575 zerr::ZSTR0040_TYPE_ERROR,
576 ERROR_PARAMS(
577 ZED( OperationNotDef_23 ), "Item::getIntegerValue()",
578 getType()->getStringValue()
579 )
580 );
581 }
582
583
584 /**
585 * Accessor for xs:long, xs:int, xs:short, xs:byte
586 */
getLongValue() const587 xs_long Item::getLongValue() const
588 {
589 throw ZORBA_EXCEPTION(
590 zerr::ZSTR0040_TYPE_ERROR,
591 ERROR_PARAMS(
592 ZED( OperationNotDef_23 ), "Item::getLongValue()",
593 getType()->getStringValue()
594 )
595 );
596 }
597
598
599 /**
600 * Accessor for xs:int, xs:short, xs:byte
601 */
getIntValue() const602 xs_int Item::getIntValue() const
603 {
604 throw ZORBA_EXCEPTION(
605 zerr::ZSTR0040_TYPE_ERROR,
606 ERROR_PARAMS(
607 ZED( OperationNotDef_23 ), "Item::getIntValue()",
608 getType()->getStringValue()
609 )
610 );
611 }
612
613
614 /**
615 * Accessor for xs:short, xs:byte
616 */
getShortValue() const617 xs_short Item::getShortValue() const
618 {
619 throw ZORBA_EXCEPTION(
620 zerr::ZSTR0040_TYPE_ERROR,
621 ERROR_PARAMS(
622 ZED( OperationNotDef_23 ), "Item::getShortValue()",
623 getType()->getStringValue()
624 )
625 );
626 }
627
628 /**
629 * Accessor for xs:byte
630 */
getByteValue() const631 xs_byte Item::getByteValue() const
632 {
633 throw ZORBA_EXCEPTION(
634 zerr::ZSTR0040_TYPE_ERROR,
635 ERROR_PARAMS(
636 ZED( OperationNotDef_23 ), "Item::getByteValue()",
637 getType()->getStringValue()
638 )
639 );
640 }
641
642
643 /**
644 * Accessor for xs:unsignedLong, xs:unsignedInt, xs:unsignedShort,
645 * xs:unsignedByte, xs:nonNegativeInteager, xs:positiveInteger
646 */
getUnsignedIntegerValue() const647 xs_nonNegativeInteger Item::getUnsignedIntegerValue() const
648 {
649 throw ZORBA_EXCEPTION(
650 zerr::ZSTR0040_TYPE_ERROR,
651 ERROR_PARAMS(
652 ZED( OperationNotDef_23 ), "Item::getUnsignedIntegerValue()",
653 getType()->getStringValue()
654 )
655 );
656 }
657
658
659 /**
660 * Accessor for xs:unsignedLong, xs:unsignedInt, xs:unsignedShort, xs:unsignedByte
661 */
getUnsignedLongValue() const662 xs_unsignedLong Item::getUnsignedLongValue() const
663 {
664 throw ZORBA_EXCEPTION(
665 zerr::ZSTR0040_TYPE_ERROR,
666 ERROR_PARAMS(
667 ZED( OperationNotDef_23 ), "Item::getUnsignedLongValue()",
668 getType()->getStringValue()
669 )
670 );
671 }
672
673
674 /**
675 * Accessor for xs:unsignedInt, xs:unsignedShort, xs:unsignedByte
676 */
getUnsignedIntValue() const677 xs_unsignedInt Item::getUnsignedIntValue() const
678 {
679 throw ZORBA_EXCEPTION(
680 zerr::ZSTR0040_TYPE_ERROR,
681 ERROR_PARAMS(
682 ZED( OperationNotDef_23 ), "Item::getUnsignedIntValue()",
683 getType()->getStringValue()
684 )
685 );
686 }
687
688
689 /**
690 * Accessor for xs:unsignedShort, xs:unsignedByte
691 */
getUnsignedShortValue() const692 xs_unsignedShort Item::getUnsignedShortValue() const
693 {
694 throw ZORBA_EXCEPTION(
695 zerr::ZSTR0040_TYPE_ERROR,
696 ERROR_PARAMS(
697 ZED( OperationNotDef_23 ), "Item::getUnsignedShortValue()",
698 getType()->getStringValue()
699 )
700 );
701 }
702
703
704 /**
705 * Accessor for xs:unsignedByte
706 */
getUnsignedByteValue() const707 xs_unsignedByte Item::getUnsignedByteValue() const
708 {
709 throw ZORBA_EXCEPTION(
710 zerr::ZSTR0040_TYPE_ERROR,
711 ERROR_PARAMS(
712 ZED( OperationNotDef_23 ), "Item::getUnsignedByteValue()",
713 getType()->getStringValue()
714 )
715 );
716 }
717
718
719 /**
720 * Accessor for xs:float
721 */
getFloatValue() const722 xs_float Item::getFloatValue() const
723 {
724 throw ZORBA_EXCEPTION(
725 zerr::ZSTR0040_TYPE_ERROR,
726 ERROR_PARAMS(
727 ZED( OperationNotDef_23 ), "Item::getFloatValue()",
728 getType()->getStringValue()
729 )
730 );
731 }
732
733
734 /**
735 * Accessor for xs:double
736 */
getDoubleValue() const737 xs_double Item::getDoubleValue() const
738 {
739 throw ZORBA_EXCEPTION(
740 zerr::ZSTR0040_TYPE_ERROR,
741 ERROR_PARAMS(
742 ZED( OperationNotDef_23 ), "Item::getDoubleValue()",
743 getType()->getStringValue()
744 )
745 );
746 }
747
748
749 /**
750 * Accessor for xs:dateTime, xs:date
751 */
getDateValue() const752 const xs_date& Item::getDateValue() const
753 {
754 throw ZORBA_EXCEPTION(
755 zerr::ZSTR0040_TYPE_ERROR,
756 ERROR_PARAMS(
757 ZED( OperationNotDef_23 ), "Item::getDateValue()",
758 getType()->getStringValue()
759 )
760 );
761 }
762
763 /**
764 * Accessor for xs:dateTime
765 */
getDateTimeValue() const766 const xs_dateTime& Item::getDateTimeValue() const
767 {
768 throw ZORBA_EXCEPTION(
769 zerr::ZSTR0040_TYPE_ERROR,
770 ERROR_PARAMS(
771 ZED( OperationNotDef_23 ), "Item::getDateTimeValue()",
772 getType()->getStringValue()
773 )
774 );
775 }
776
777
778 /**
779 * Accessor for xs:time
780 */
getTimeValue() const781 const xs_time& Item::getTimeValue() const
782 {
783 throw ZORBA_EXCEPTION(
784 zerr::ZSTR0040_TYPE_ERROR,
785 ERROR_PARAMS(
786 ZED( OperationNotDef_23 ), "Item::getTimeValue()",
787 getType()->getStringValue()
788 )
789 );
790 }
791
792
793 /**
794 * Accessor for xs:gDay
795 */
getGDayValue() const796 const xs_gDay& Item::getGDayValue() const
797 {
798 throw ZORBA_EXCEPTION(
799 zerr::ZSTR0040_TYPE_ERROR,
800 ERROR_PARAMS(
801 ZED( OperationNotDef_23 ), "Item::getGDayValue()",
802 getType()->getStringValue()
803 )
804 );
805 }
806
807 /**
808 * Accessor for xs:gMonth
809 */
getGMonthValue() const810 const xs_gMonth& Item::getGMonthValue() const
811 {
812 throw ZORBA_EXCEPTION(
813 zerr::ZSTR0040_TYPE_ERROR,
814 ERROR_PARAMS(
815 ZED( OperationNotDef_23 ), "Item::getGMonthValue()",
816 getType()->getStringValue()
817 )
818 );
819 }
820
821 /**
822 * Accessor for xs:gMonthDay
823 */
getGMonthDayValue() const824 const xs_gMonthDay& Item::getGMonthDayValue() const
825 {
826 throw ZORBA_EXCEPTION(
827 zerr::ZSTR0040_TYPE_ERROR,
828 ERROR_PARAMS(
829 ZED( OperationNotDef_23 ), "Item::getGMonthDayValue()",
830 getType()->getStringValue()
831 )
832 );
833 }
834
835 /**
836 * Accessor for xs:gYear
837 */
getGYearValue() const838 const xs_gYear& Item::getGYearValue() const
839 {
840 throw ZORBA_EXCEPTION(
841 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
842 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
843 );
844 }
845
846 /**
847 * Accessor for xs:gYearMonth
848 */
getGYearMonthValue() const849 const xs_gYearMonth& Item::getGYearMonthValue() const
850 {
851 throw ZORBA_EXCEPTION(
852 zerr::ZSTR0040_TYPE_ERROR,
853 ERROR_PARAMS(
854 ZED( OperationNotDef_23 ), "Item::getGYearMonthValue()",
855 getType()->getStringValue()
856 )
857 );
858 }
859
860 /**
861 * Accessor for xs:duration
862 */
getDurationValue() const863 const xs_duration& Item::getDurationValue() const
864 {
865 throw ZORBA_EXCEPTION(
866 zerr::ZSTR0040_TYPE_ERROR,
867 ERROR_PARAMS(
868 ZED( OperationNotDef_23 ), "Item::getDurationValue()",
869 getType()->getStringValue()
870 )
871 );
872 }
873
874 /**
875 * Accessor for xs:dayTimeDuration
876 */
getDayTimeDurationValue() const877 const xs_dayTimeDuration& Item::getDayTimeDurationValue() const
878 {
879 throw ZORBA_EXCEPTION(
880 zerr::ZSTR0040_TYPE_ERROR,
881 ERROR_PARAMS(
882 ZED( OperationNotDef_23 ), "Item::getDayTimeDurationValue()",
883 getType()->getStringValue()
884 )
885 );
886 }
887
888 /**
889 * Accessor for xs:yearMonthDuration
890 */
getYearMonthDurationValue() const891 const xs_yearMonthDuration& Item::getYearMonthDurationValue() const
892 {
893 throw ZORBA_EXCEPTION(
894 zerr::ZSTR0040_TYPE_ERROR,
895 ERROR_PARAMS(
896 ZED( OperationNotDef_23 ), "Item::getYearMonthDurationValue()",
897 getType()->getStringValue()
898 )
899 );
900 }
901
902
903 /**
904 * Accessor for xs:hexBinary
905 */
getHexBinaryValue() const906 xs_hexBinary Item::getHexBinaryValue() const
907 {
908 throw ZORBA_EXCEPTION(
909 zerr::ZSTR0040_TYPE_ERROR,
910 ERROR_PARAMS(
911 ZED( OperationNotDef_23 ), "Item::getHexBinaryValue()",
912 getType()->getStringValue()
913 )
914 );
915 }
916
917
918 /**
919 * Helper method for numeric atomic items
920 * @return true, if containing number is not-a-number (possible for floating-point numbers)
921 */
isNaN() const922 bool Item::isNaN() const
923 {
924 return false;
925 }
926
927 /**
928 * Helper method for numeric atomic items
929 * @return true, if containing numbers represents -INF or +INF
930 */
isPosOrNegInf() const931 bool Item::isPosOrNegInf() const
932 {
933 throw ZORBA_EXCEPTION(
934 zerr::ZSTR0040_TYPE_ERROR,
935 ERROR_PARAMS(
936 ZED( OperationNotDef_23 ), "Item::isPosOrNegInf()",
937 getType()->getStringValue()
938 )
939 );
940 }
941
942
943 /* ----------------------- Methods for Nodes -------------------------------- */
944
945
isValidated() const946 bool Item::isValidated() const
947 {
948 throw ZORBA_EXCEPTION(
949 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
950 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
951 );
952 }
953
954
markValidated()955 void Item::markValidated()
956 {
957 throw ZORBA_EXCEPTION(
958 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
959 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
960 );
961 }
962
963
isRecursive() const964 bool Item::isRecursive() const
965 {
966 return true;
967 }
968
969
getDocumentURI(zstring & uri) const970 void Item::getDocumentURI(zstring& uri) const
971 {
972 throw ZORBA_EXCEPTION(
973 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
974 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
975 );
976 }
977
978
getBaseURI(zstring & uri) const979 void Item::getBaseURI(zstring& uri) const
980 {
981 throw ZORBA_EXCEPTION(
982 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
983 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
984 );
985 }
986
987
getAttributes() const988 store::Iterator_t Item::getAttributes() const
989 {
990 throw ZORBA_EXCEPTION(
991 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
992 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
993 );
994 }
995
996
getChildren() const997 store::Iterator_t Item::getChildren() const
998 {
999 throw ZORBA_EXCEPTION(
1000 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1001 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1002 );
1003 }
1004
1005
isId() const1006 bool Item::isId() const
1007 {
1008 throw ZORBA_EXCEPTION(
1009 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1010 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1011 );
1012 }
1013
1014
isIdRefs() const1015 bool Item::isIdRefs() const
1016 {
1017 throw ZORBA_EXCEPTION(
1018 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1019 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1020 );
1021 }
1022
1023
getNamespaceBindings(NsBindings & bindings,StoreConsts::NsScoping ns_scoping) const1024 void Item::getNamespaceBindings(
1025 NsBindings& bindings,
1026 StoreConsts::NsScoping ns_scoping) const
1027 {
1028 throw ZORBA_EXCEPTION(
1029 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1030 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1031 );
1032 }
1033
1034
getNilled() const1035 store::Item_t Item::getNilled() const
1036 {
1037 throw ZORBA_EXCEPTION(
1038 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1039 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1040 );
1041 }
1042
1043
getNodeKind() const1044 NodeKind Item::getNodeKind() const
1045 {
1046 throw ZORBA_EXCEPTION(
1047 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1048 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1049 );
1050 }
1051
1052
getNodeName() const1053 store::Item* Item::getNodeName() const
1054 {
1055 throw ZORBA_EXCEPTION(
1056 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1057 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1058 );
1059 }
1060
getCollection() const1061 const store::Collection* Item::getCollection() const
1062 {
1063 throw ZORBA_EXCEPTION(
1064 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1065 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1066 );
1067 }
1068
1069
getParent() const1070 Item* Item::getParent() const
1071 {
1072 throw ZORBA_EXCEPTION(
1073 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1074 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1075 );
1076 }
1077
1078
getTypedValue(store::Item_t & val,store::Iterator_t & iter) const1079 void Item::getTypedValue(store::Item_t& val, store::Iterator_t& iter) const
1080 {
1081 throw ZORBA_EXCEPTION(
1082 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1083 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1084 );
1085 }
1086
1087
isInSubstitutionGroup() const1088 bool Item::isInSubstitutionGroup() const
1089 {
1090 throw ZORBA_EXCEPTION(
1091 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1092 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1093 );
1094 }
1095
1096
getUnparsedEntityPublicId(zstring & val) const1097 void Item::getUnparsedEntityPublicId(zstring& val) const
1098 {
1099 throw ZORBA_EXCEPTION(
1100 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1101 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1102 );
1103 }
1104
1105
getUnparsedEntitySystemId(zstring & val) const1106 void Item::getUnparsedEntitySystemId(zstring& val) const
1107 {
1108 throw ZORBA_EXCEPTION(
1109 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1110 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1111 );
1112 }
1113
1114
getTarget() const1115 const zstring& Item::getTarget() const
1116 {
1117 throw ZORBA_EXCEPTION(
1118 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1119 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1120 );
1121 }
1122
1123
show() const1124 zstring Item::show() const
1125 {
1126 return std::string ( typeid ( *this ).name() ) + ": 'show' not implemented!";
1127 }
1128
1129
finalizeNode()1130 void Item::finalizeNode()
1131 {
1132 throw ZORBA_EXCEPTION(
1133 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1134 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1135 );
1136 }
1137
1138 bool
isAncestor(const store::Item_t &) const1139 Item::isAncestor(const store::Item_t&) const
1140 {
1141 throw ZORBA_EXCEPTION(
1142 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1143 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1144 );
1145 }
1146
1147 bool
isFollowingSibling(const store::Item_t &) const1148 Item::isFollowingSibling(const store::Item_t&) const
1149 {
1150 throw ZORBA_EXCEPTION(
1151 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1152 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1153 );
1154 }
1155
1156 bool
isFollowing(const store::Item_t &) const1157 Item::isFollowing(const store::Item_t&) const
1158 {
1159 throw ZORBA_EXCEPTION(
1160 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1161 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1162 );
1163 }
1164
1165 bool
isInSubtreeOf(const store::Item_t &) const1166 Item::isInSubtreeOf(const store::Item_t&) const
1167 {
1168 throw ZORBA_EXCEPTION(
1169 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1170 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1171 );
1172 }
1173
1174 bool
isDescendant(const store::Item_t &) const1175 Item::isDescendant(const store::Item_t&) const
1176 {
1177 throw ZORBA_EXCEPTION(
1178 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1179 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1180 );
1181 }
1182
1183 bool
isPrecedingSibling(const store::Item_t &) const1184 Item::isPrecedingSibling(const store::Item_t&) const
1185 {
1186 throw ZORBA_EXCEPTION(
1187 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1188 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1189 );
1190 }
1191
1192 bool
isPreceding(const store::Item_t &) const1193 Item::isPreceding(const store::Item_t&) const
1194 {
1195 throw ZORBA_EXCEPTION(
1196 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1197 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1198 );
1199 }
1200
1201 bool
isChild(const store::Item_t &) const1202 Item::isChild(const store::Item_t&) const
1203 {
1204 throw ZORBA_EXCEPTION(
1205 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1206 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1207 );
1208 }
1209
1210 bool
isAttribute(const store::Item_t &) const1211 Item::isAttribute(const store::Item_t&) const
1212 {
1213 throw ZORBA_EXCEPTION(
1214 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1215 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1216 );
1217 }
1218
1219 bool
isParent(const store::Item_t &) const1220 Item::isParent(const store::Item_t&) const
1221 {
1222 throw ZORBA_EXCEPTION(
1223 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1224 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1225 );
1226 }
1227
1228 bool
isPrecedingInDocumentOrder(const store::Item_t &) const1229 Item::isPrecedingInDocumentOrder(const store::Item_t&) const
1230 {
1231 throw ZORBA_EXCEPTION(
1232 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1233 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1234 );
1235 }
1236
1237 bool
isFollowingInDocumentOrder(const store::Item_t &) const1238 Item::isFollowingInDocumentOrder(const store::Item_t&) const
1239 {
1240 throw ZORBA_EXCEPTION(
1241 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1242 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1243 );
1244 }
1245
1246 store::Item_t
getLevel() const1247 Item::getLevel() const
1248 {
1249 throw ZORBA_EXCEPTION(
1250 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1251 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1252 );
1253 }
1254
1255 bool
isSibling(const store::Item_t &) const1256 Item::isSibling(const store::Item_t&) const
1257 {
1258 throw ZORBA_EXCEPTION(
1259 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1260 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1261 );
1262 }
1263
1264 bool
isAttributeRef() const1265 Item::isAttributeRef() const
1266 {
1267 throw ZORBA_EXCEPTION(
1268 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1269 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1270 );
1271 }
1272
1273 bool
isCommentRef() const1274 Item::isCommentRef() const
1275 {
1276 throw ZORBA_EXCEPTION(
1277 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1278 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1279 );
1280 }
1281
1282 bool
isDocumentRef() const1283 Item::isDocumentRef() const
1284 {
1285 throw ZORBA_EXCEPTION(
1286 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1287 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1288 );
1289 }
1290
1291
1292 bool
isElementRef() const1293 Item::isElementRef() const
1294 {
1295 throw ZORBA_EXCEPTION(
1296 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1297 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1298 );
1299 }
1300
1301 bool
isProcessingInstructionRef() const1302 Item::isProcessingInstructionRef() const
1303 {
1304 throw ZORBA_EXCEPTION(
1305 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1306 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1307 );
1308 }
1309
1310 bool
isTextRef() const1311 Item::isTextRef() const
1312 {
1313 throw ZORBA_EXCEPTION(
1314 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1315 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1316 );
1317 }
1318
1319 bool
inSameTree(const store::Item_t &) const1320 Item::inSameTree(const store::Item_t&) const
1321 {
1322 throw ZORBA_EXCEPTION(
1323 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1324 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1325 );
1326 }
1327
1328 bool
inCollection() const1329 Item::inCollection() const
1330 {
1331 throw ZORBA_EXCEPTION(
1332 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1333 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1334 );
1335 }
1336
1337 bool
inSameCollection(const store::Item_t &) const1338 Item::inSameCollection(const store::Item_t&) const
1339 {
1340 throw ZORBA_EXCEPTION(
1341 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1342 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1343 );
1344 }
1345
1346 store::Item_t
leastCommonAncestor(const store::Item_t &) const1347 Item::leastCommonAncestor(const store::Item_t&) const
1348 {
1349 throw ZORBA_EXCEPTION(
1350 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1351 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1352 );
1353 }
1354
1355
1356 #if 0
1357 Item* Item::copy(
1358 store::Item* parent,
1359 vsize_t pos,
1360 const CopyMode& copymode) const
1361 {
1362 throw ZORBA_EXCEPTION(
1363 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1364 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1365 );
1366 }
1367 #endif
1368
copy(store::Item * parent,const CopyMode & copymode) const1369 Item* Item::copy(
1370 store::Item* parent,
1371 const CopyMode& copymode) const
1372 {
1373 throw ZORBA_EXCEPTION(
1374 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1375 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1376 );
1377 }
1378
1379
1380 #ifdef ZORBA_WITH_JSON
1381
getJSONItemKind() const1382 store::StoreConsts::JSONItemKind Item::getJSONItemKind() const
1383 {
1384 throw ZORBA_EXCEPTION(
1385 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1386 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1387 );
1388 }
1389
1390
1391 xs_integer
getArraySize() const1392 Item::getArraySize() const
1393 {
1394 throw ZORBA_EXCEPTION(
1395 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1396 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1397 );
1398 }
1399
1400 store::Item_t
getArrayValue(const xs_integer &) const1401 Item::getArrayValue(const xs_integer&) const
1402 {
1403 throw ZORBA_EXCEPTION(
1404 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1405 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1406 );
1407 }
1408
1409 store::Iterator_t
getArrayValues() const1410 Item::getArrayValues() const
1411 {
1412 throw ZORBA_EXCEPTION(
1413 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1414 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1415 );
1416 }
1417
1418 store::Iterator_t
getObjectKeys() const1419 Item::getObjectKeys() const
1420 {
1421 throw ZORBA_EXCEPTION(
1422 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1423 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1424 );
1425 }
1426
1427 store::Item_t
getObjectValue(const store::Item_t &) const1428 Item::getObjectValue(const store::Item_t&) const
1429 {
1430 throw ZORBA_EXCEPTION(
1431 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1432 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1433 );
1434 }
1435
1436 #endif // ZORBA_WITH_JSON
1437
1438
getError() const1439 ZorbaException* Item::getError() const
1440 {
1441 throw ZORBA_EXCEPTION(
1442 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1443 ERROR_PARAMS( __FUNCTION__, "ErrorItem" )
1444 );
1445 }
1446
getFunctionName() const1447 const Item_t Item::getFunctionName() const
1448 {
1449 throw ZORBA_EXCEPTION(
1450 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1451 ERROR_PARAMS( __FUNCTION__, "FunctionItem" )
1452 );
1453 }
1454
isStreamable() const1455 bool Item::isStreamable() const
1456 {
1457 return false;
1458 }
1459
isSeekable() const1460 bool Item::isSeekable() const
1461 {
1462 return false;
1463 }
1464
getStream()1465 std::istream& Item::getStream()
1466 {
1467 throw ZORBA_EXCEPTION(
1468 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1469 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1470 );
1471 }
1472
getStreamReleaser()1473 StreamReleaser Item::getStreamReleaser()
1474 {
1475 throw ZORBA_EXCEPTION(
1476 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1477 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1478 );
1479 }
1480
setStreamReleaser(StreamReleaser)1481 void Item::setStreamReleaser(StreamReleaser /*aReleaser*/)
1482 {
1483 throw ZORBA_EXCEPTION(
1484 zerr::ZSTR0050_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE,
1485 ERROR_PARAMS( __FUNCTION__, getType()->getStringValue() )
1486 );
1487 }
1488
1489 } // namespace store
1490 } // namespace zorba
1491 /* vim:set et sw=2 ts=2: */
1492