Busa/Matteo; As stated before, this is a known defect that has been
fixed for our next release to TopBraid suite.  We plan to have a beta
version of 3.6 soon and release 3.6 in a couple of months.

In the meantime, you can get the same effect by naming your enumerated
datatype.  This has an advantage that the enumerated datatype can be
reused in your model.  To do this

a. Create a class definition.
b. Create a owl:oneOf axiom on the class.
  b.i. Right-click in the form,
  b.ii. add owl:OneOf, and
  b.iii. paste your enumeration in an empty text field.  The syntax is
slightly different as square brackets need to be used instead of
curly.  E.g. ["male","female"]

Follow your steps except that in step 5, you define the range to be
the named class defined above.

-- Scott

On Sep 9, 8:43 am, Busa <[email protected]> wrote:
> Hi everyone,
>   I'm again on this topic (already posted on enumeration  error on 3.5 
> here<https://groups.google.com/forum/?hl=it#!searchin/topbraid-users/Diagr...>
> ).
>
> I can imagine that is always a metter of how TB 3.5 treast enumeration of
> datatype range but at the moment really I can't understand how to define the
> enumerated datatype property and then use it for valorize an individual via
> Form.
> You can reproduce the exception easy in this way:
>
> 1. Create a new ontology owl
> 2. Create a class Person
> 3. create a datatypeProperty "gender"
> 4. set the rdfs:domain of gender to Person
> 5. set the rdfs:range of gender to {"male", "female"} as explained in the TB
> 3.5 help (and as I ever done in 3.4)
>
> Now:
>
> 6. create a new instance of Person (i.e Person1)
> *7. try to valorize the gender property in the form and when click on "Add
> empty row..." it RISE THE EXCEPTION:*
>
> =========================================================================
> An unexpected error has occured.
>
> If you believe this is due to a bug in TopBraid Composer, then please
> consider to report the problem to [email protected] and
> ideally include an export of the Error Log View (Window > Show View > Error
> Log).
>
> On: 9-set-2011 15.29.52
>
> Reason:
> java.lang.NullPointerException
>
> at org.topbraid.owl.model.OWLDataRange.getOnDatatype(OWLDataRange.java:169)
>
> at
> org.topbraid.owl.model.OWLDataRange.getNamedSuperDataRange(OWLDataRange.java:114)
>
> at
> org.topbraid.owl.model.OWLDataRange.getNamedSuperDataRange(OWLDataRange.java:109)
>
> at
> org.topbraid.owl.model.OWLDataRange.getSystemBaseDatatype(OWLDataRange.java:146)
>
> at
> org.topbraidcomposer.widgets.row.RowWidgetRow.createTypeLabel(RowWidgetRow.java:251)
>
> at
> org.topbraidcomposer.widgets.row.RowWidgetRow.<init>(RowWidgetRow.java:128)
>
> at
> org.topbraidcomposer.widgets.row.ObjectRowWidgetRow.<init>(ObjectRowWidgetRow.java:26)
>
> at
> org.topbraidcomposer.widgets.row.ObjectRowWidget.createRowWidgetRow(ObjectRowWidget.java:225)
>
> at org.topbraidcomposer.widgets.row.RowWidget.addRow(RowWidget.java:199)
>
> at
> org.topbraidcomposer.widgets.row.RowWidget.addEmptyRow(RowWidget.java:181)
>
> at
> org.topbraidcomposer.widgets.row.RowWidget.addEmptyRow(RowWidget.java:175)
>
> at
> org.topbraidcomposer.widgets.row.AbstractRowWidget.addEmptyValue(AbstractRowWidget.java:70)
>
> at
> org.topbraidcomposer.widgets.row.actions.AddRowAction.run(AddRowAction.java:28)
>
> at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
>
> at
> org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
>
> at
> org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
>
> at
> org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
>
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
>
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
>
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
>
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
>
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2629)
>
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2593)
>
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2427)
>
> at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:670)
>
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:663)
>
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
>
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
>
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>
> at java.lang.reflect.Method.invoke(Unknown Source)
>
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
>
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
>
> at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
> ==================================================================
>
> Any idea on how to do that?
> Is there any new way to do that due to the new compliancy to OWL2? Why not
> stay compatible also with the 1.1 version?
>
> Thanks in advance for the help,
> Matteo.

-- 
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en

Reply via email to