Looking at this again, I see I have answered it from the perspective of XSD
generation of types and you are using the dynamic API.  You are free to
create open content properties of your own using
TypeHelper.defineOpenContentProperty and use them to annotate your types, so
that you can retrieve those annotations later with
Type.get(myOpenContentProperty)
and interpret them however you want.

Regards, Kelvin.

On 20/12/2007, Joerg Selig <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> is it possible to restrict a SDO DataType via the SDO API? For instance,
> i should like to restrict a 'commonj.sdo.String' to a maximal length of
> 2 characters or a 'commonj.sdo.Integer' to a maximal value of 999.
>
> I create the SDOs dynamically.
>
> Example:
> 8< --------------------------------------------------------
>
> Type stringType =
>     TypeHelper.INSTANCE.getType("commonj.sdo", "String");
>
> DataObject fooType =
>     DataFactory.INSTANCE.create("commonj.sdo", "Type");
> fooType.set("uri", "http://example.com/foo";);
> fooType.set("name", "Foo");
>
> DataObject fooProperty =
>     fooType.createDataObject("property");
> fooProperty.set("name", "fooProperty");
> fooProperty.set("type", stringType);
>
> -------------------------------------------------------- >8
>
> I should like to replace the 'stringType' with a restricted string type.
> I don't need a validation, it's enough to have the information about the
> restriction inside of annotations or the like.
>
>
> Thanks in advance
>
> Regards,
> Joerg Selig
> --
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to