Hi Pinaki,

They can't be distinguished in the current version of SDO metadata, you 
need to look at the original XSD. The next version of SDO (SDO 3) is 
planning to provide an api for accessing extended XSD metadata. In 
Tuscany, you can currently determine this by downcasting to the EMF 
implementation class, although we don't recommend people do that:

      System.out.println("  Property isID: " + 
((property.getType().isDataType()) && ((EAttribute)property).isID()));

Frank.

"Pinaki Poddar" <[EMAIL PROTECTED]> wrote on 07/24/2007 01:00:03 AM:

> 
> Hi,
> 
> A newbie question:
>    How does two Property: one defined as xsd:string and other as xsd:ID
> can be distiguished?
> 
> Assume:
>  1. we have a simple XML schema defining a Person SDO Type with two
> properties as follows:
>     <xsd:complexType name="Person">
>          <xsd:attribute name="firstName" type="xsd:string"/>
>          <xsd:attribute name="id"        type="xsd:ID"/>
>     </xsd:complexType>
> 
>  2. TypeHelper.INSTANCE.define()
>     defines SDO Type with two commonj.sdo.Property, p1 (for firstName)
> and p2 (for id)
> 
>  3. both p1.getType().getInstanceClass() and
> p2.getType().getInstanceClass() return java.lang.String
>     both p1.getType().isDataType() and p2.getType().isDataType() return
> true
> 
> The question is, what can be done to identify p2 as a property that were
> defined as xsd:ID?
> 
> 
> Thanks for your help --
> 
> 
> 
> 
> Pinaki Poddar
> 972.834.2865
> 
> Notice:  This email message, together with any attachments, may 
> contain information  of  BEA Systems,  Inc.,  its subsidiaries  and 
> affiliated entities,  that may be confidential,  proprietary, 
> copyrighted  and/or legally privileged, and is intended solely for 
> the use of the individual or entity named in this message. If you 
> are not the intended recipient, and have received this message in 
> error, please immediately return this by email and then delete it.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to