Item types need to have their own class

Bug #935666 reported by Rodolfo Ochoa
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
Fix Released
Low
Markos Zaharioudakis

Bug Description

Items need to be extended to have a class that define base types, currently we have a class named:
zorba::TypeIdentifier
which has some functionality, but is not implemented all along zorba, also the class:
zorba::IdentTypes
with two sets:
kind_t
quantifier_t

We should have another set for basic types, for example in the Item case, when you get the type, you actually get another Item that gives you the type in a String, this is not efficient for XQJ API implementation trying to identify the type and convert it into a constant.

Here is a link where you can see how XQJ defines all types and node kinds: http://www.xqj.net/javadoc/javax/xml/xquery/XQItemType.html

Related branches

Revision history for this message
Rodolfo Ochoa (rodolfo-ochoa) wrote :

This can also provide the functionality to create any item with a defined base type.

Revision history for this message
Till Westmann (tillw) wrote :

There's bug 924987 (with a merge proposal that still needs some work) that addresses a similar problem.
I think that the goal in both cases is the same: to provide complete information about a sequence type on the public API.
Probably we can extend/modify TypeIdentifier in a way that provides sufficient information to be able to efficiently build an instance of XQItemType for XQJ.
(If we actually need to modify TypeIdentifier, this would be an incompatible change and thus would need to go into 3.0).

Revision history for this message
Chris Hillery (ceejatec) wrote :

There is a (possibly partial) solution to this problem implemented on the lp:~zorba-coders/zorba/temp-csx-schema branch. Luis introduced Item::getTypeCode(), which returns an enum for atomic types. This information already existed in the store; the change exposes it through the public API.

Changed in zorba:
importance: Undecided → Low
assignee: nobody → Markos Zaharioudakis (markos-za)
Revision history for this message
Markos Zaharioudakis (markos-za) wrote :

I think this bug has been fixed. If not open it again.

Changed in zorba:
status: New → Fix Committed
Changed in zorba:
milestone: none → 2.7
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.