On 07/12/06, Frank Budinsky <[EMAIL PROTECTED]> wrote:
Pete is right about how it works and that it is kind of ugly. We have an
internal way of doing it more easily, but the only way an SDO client can
do it is the way Pete said. Maybe we need to open an SDO 3 spec issue for
adding a convenient way to access "non-sequenced" properties of a
sequenced object (i.e., instanceProperties that are not also in the
sequence).
Frank.
That's a good idea. getNonSequencedProperties() which would return the same
list of properties as getInstanceProperties() if the SDO was not sequenced.
We could add something like this as a Tuscany extra until it gets spec
approval.
Actually maybe this would be a method on Sequence and would only return the
list of non-sequenced Properties that had been set, similar to the way
Sequence only contains Properties that are set.
Anyho... food for thought. Fixing C++ implementation will be a good first
step!
Cheers,
"Pete Robbins" <[EMAIL PROTECTED]> wrote on 12/07/2006 11:56:12 AM:
> On 07/12/06, Simon Laws <[EMAIL PROTECTED]> wrote:
> >
> >
> > >
> > > Thanks for that Frank. When a data object has an XSD based type is
there
> > are way of getting all of it's properties which the XSD says are
> > attributes.
> >
> > This is where it gets a bit ugly. It's ok if you know what the
attribute
> names are as you can just do a getXXX("attribute_name") but if you are
> dealing with an object whose type you do not know you would have to
iterate
> through the instance properties and do a getXXX for each one that
> prop.isAttribute() is true.
>
> Easy... except we don't have that prop.isAttribute() method in C++. We
have
> an internal way of determining this but that is not currently exposed in
our
> API. I really do not like these methods being on XSDHelper as they are
in
> Java. IMO it is simpler and more logical to have these as attributes of
the
> Property.
>
> Cheers,
>
>
> --
> Pete
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Pete