H Laurance,
From my (limitted) understanding doesnt the getConstraints give the constraints that are defined on an element, not those that are applied
 
What I was looking for is a way to say (for example) that 
1. an atribute value is limitted to a specific list of values because it is a keyRef.
2. that a specified value is invalid because it is not unique, and is part of a key or unique constraint
 
I am looking to build some UI tools to manage some documents that we use internally
 
I think that I will have to scan all of the document and build these reverse lookups.
 
Mike
 


From: Lawrence Jones [mailto:[EMAIL PROTECTED]
Sent: 10 October 2005 18:18
To: [email protected]
Subject: RE: Key/value detection

Hi Mike

 

The SchemaLocalElement interface (and hence SchemaGlobalElement too since it inherits from SchemaLocalElement) has a getIdentityConstraints() API which returns an array of SchemaIdentityConstraint objects which I think should be helpful to you.

 

You can navigate to an object that implements SchemaLocalElement from a given SchemaType using the getContentModel() API (possibly recursively) although you may have to do an instanceof check on the returned object and then cast it to a SchemaLocalElement before you can use it. All generated XmlBeans have a public static variable called type which will return the SchemaType.

 

Cheers,

 

Lawrence

 


From: Mike Skells [mailto:[EMAIL PROTECTED]
Sent: Sunday, October 09, 2005 4:27 PM
To: [email protected]
Subject: Key/value detection

 

Hi

Is there any way to detect that a field has constraints applied to it (unique key, keyref)

 

Mike

________________________________________________________________________________
BEAWorld 2005: coming to a city near you.  Everything you need for SOA and enterprise infrastructure success.

 
Register now at http://www.bea.com/4beaworld

 
London 11-12 Oct| Paris13-14 Oct| Prague18-19 Oct |Tokyo 25-26 Oct| Beijing 7-8 Dec

Reply via email to