Menu

Run Schema Builder

Alexander Ilyin

Schema Builder creates XSD schemes for classes to be serialized and sent to/from the client.

It is ran from cmd and usually has following parameters:

USEDIRHIERARCHY=true OVERWRITEEXISTINGSCHEMAS=false USECAPITALIZATION=true ROOTPATH=../com.yourcompany.yourproject/bin/com/com/yourcompany/yourproject/rightpanedatas/ OUTPATH=../com.yourcompany.yourproject/resources/schemas/ BASEPACKAGEPATH=../com.yourcompany.yourproject/bin/ STORAGEID=net://com.yourcompany.yourproject CLASSPATH=../com.yourcompany.yourproject/bin/,../DocFlowerServer/bin/ BUNDLES=net://com.yourcompany.yourproject,net://org.docflower.server

IMPORTANT: If you process enhanced classes like JDO classes usually are you have to clean your project first to get read another enhanced bytecode.

Be careful. It's smart for now to delete old xsds before running.

To generate proper schema for enum type the references to enum type should be with DataNucleus annotation like:

@Extensions({
  @Extension(vendorName = "datanucleus", key = "enum-getter-by-value", value = "getEnumByValue"),
  @Extension(vendorName = "datanucleus", key = "enum-value-getter", value = "getValue") })

F.g.:

    @Persistent
    @Column(length = 30)
    @Label("Test field")
    @Extensions({
            @Extension(vendorName = "datanucleus", key = "enum-getter-by-value", value = "getEnumByValue"),
            @Extension(vendorName = "datanucleus", key = "enum-value-getter", value = "getValue") })
    private TestEnumType someTestField;

NOTE:@Extensions must be the last annotation of the field defined right before field definition.


MongoDB Logo MongoDB