owl:topDataProperty under Data Property in Protege - owl

I'm not sure if this is a bug or something broken with my Protege but when I'm adding new value to a data property in Protege, suddenly an owl:topDataProperty will be under one of my data property as shown below.
Is it something wrong with my Protege or my ontology structure?

Looks like your property is inferred to be equivalent to owl:topDataProperty - and so it is both a superproperty and a subproperty of your property. We can't tell from this screenshot though, it's necessary to see the rest of the ontology.

Related

Transitive is not replicated to Inverse property

Protege 5.5.0
I made two properties, the second I made InverseOf first property.
When I check the Transitive on any of the property, Transitive on another doesn't appear.
I'm newby in Ontology, the book I'm reading saying that it should appear in Protege 4.1.
Is that something new in Protege 5.5.0, or am I doing something wrong?

DevExpress and SimpleMvvmToolkit - Serialization error

I have a DevExpress DxGrid bound to an ObservableCollection of viewmodels (based on SimpleMvvmToolkit).
The viewmodel has 2 properties exposed by itself (a string and a boolean) and a few other properties are exposed by its base class (ViewModelDetailBase), one of them is the model behind the viewmodel.
Everytime I use the grid to modify the contents of one of the properties (e.g. the boolean value), I get an error saying "The type xxx cannot be serialized.." (xxx is the type of the Model) followed by the suggestion to use DataContractAttribute to circomvent the issue.
I am not sure how and where to look for a solution. Maybe I should read up on it, but why is serialization needed here??
Anyway, I hope you can shed a light on this. I'd appreciate some pointers to get me looking in the right direction.
edit: Since the situation is too intricate to post the relevant code here, I made a sandbox project that reproduces the error. You can find it via this WeTransfer link.
Best regards,
~Rob
Thanks to great help of the Simple MVVM Toolkit community I found out that the solution was simple.
In Simple MVVM Toolkit, A viewmodel needs to be serializable because it gets cloned. This is to easily roll-back data when an action is canceled. The reason my viewmodel could not be cloned whas because its "model" property was missing a default (parameter-less) constructor.
There's no need to decorate the viewmodel and its properties with [DataContract] or [DataMember].
I hope this helps others.

Can protobuf-net deserialize protected/friend fields in Silverlight?

I have a complex object hierarchy that I've been wrestling with to get passed across the wire in its entirety when using Silverlight with WCF. I've tried DataContractSerializer to death and the main problem is that I'm trying to use Dictionary, with multiple cyclical references and just couldn't get it to work.
I've switched to look at protobuf-net thinking that it might be better all round to use a binary format anyway. I was hoping to be able to just do a lot of find and replace to add the ProtoMember attributes on to the properties. However a lot of the properties that were being serialized with DataMember attributes are declared as Friend (vb.net). I've found that protobuf-net throws an error when deserializing, saying
Attempt by method <blah> to access field <fieldname> failed.
I've found that setting the field to protected causes the same error, and the only way around it is to set the field to public - which is something I don't want to do. Is it possible to do this with a protected setter or similar on the property the field backs? While this would be a pain (many fields/properties and classes) it would at least solve the problem. The serialization on the back end works fine.
If this is not possible, can anyone suggest how I can get a complex object hierarchy with cyclical references that include multiple dictionaries across the wire in their complete form? I realise Silverlight adds a few constraints to this process, but hopefully someone has already succeeded with this.
Note this is Silverlight 5
In Silverlight: no; the runtime has a higher level of paranoia, and you just can't get at the non-public parts of other types. Even the Silverlight DataContractSerializer page has the caveat:
You can serialize fields and properties, provided they are publicly accessible.
My understanding is that this can't be avoided on Silverlight.

FlowDocument - How to Implement KeepWithNext

I have a FlowDocument with multiple BlockUIContainers back to back with one another. These UIContainers each represent a different type of content coming from a different source, but are all related and I would like them to stay together on a page. To word it differently, I don't want them split between pages.
The Paragraph class has a property called KeepWithNext that will make sure that the paragraph that follows it always stays on the same page as the given paragraph.
I would like to add this functionality to the BlockUIContainer (or subclass BlockUIContainer to add it) but I don't know how the KeepWithNext property gets used for the Paragraph class.
I've tried using Reflector to get some insight, but as far as I can tell it's just a boolean property with no real usage inside of the Paragraph class. This leads me to believe that the paginator somehow knows what to do with the property.
Does anyone have a clue about how I should approach this? Where should I look to find out what I need to do to match the Paragraph functionality?
I'm not sure how the internal pagination works, but...
Instead of extending BlockUIContainer, it may be much easier to use the existing KeepWithNext property on Paragraph and convert your BlockUIContainers to InlineUIContainers inside Paragraphs.

Is this a crazy way to handle multi Validation types with IDataError and WPF?

We are using the standard method for our controls to report broken BO rules. This is done via the interface IDataError in our BO’s and in XAML the control is bound to the BO’s property etc. This approach works OK. But we need to show 2 types of visuals in the UI depending on the type (or category if you like) of the invalidation error. If it’s a required field then we show a CueBanner (water mark) but for other types we change the colour of the controls boarder. In both scenarios we set the tool type of the error message.
The Problem with IDataError is that it doesn’t support a method/property to distinguish between error types.
The only way I can do that is by examining the error text, required field text must contain the key word “required”. The following approach doesn’t feel right but it’s the only way I can determine the type of error and then deal with it accordingly. All required field rules must have as part of the error text “required field”.
To make this all work I have created a custom dependency property called ErrorMessage. In my ResourceDictionary I have a Style.Trigger for Validation.HasError. In there I set my dependency properties value to the ErrorContent. Now when my dependency properties value changes I can examine the text and set the Validation.SetErrorTemplate( myControl, newErrorTemplate) to the template to suit the error type. I have to wire up a few events to the control such as lost and got focus to manage removing or adding the cueBanner template but the whole thing will work. It’s just that I’m not sure it’s the best way to do it.
PS. When I set the ErrorTemplate i’m doing this in code, thats building and adding it. Is there a way to point Validation.SetErrorTemplate to a static resource keeping in mind that I need to switch between at least 2 types?
Your thoughts please..
Would it be possible to derive an interface IDataError that adds an extra property which is an enumeration of the error type. Then you could try and bind against it.
If you're okay with an (untested)approach that suffers a little bit of clarity, then you could do the following:
throw an exception instead of returning an string with the IDataErrorInfo Interface. In your ErrorTemplate, you can access the ValidationErrors (and the ValidationError.Exception Property).
Then, you use a DataTrigger on the Exception in combination with a converter, that checks for the right Exception-Type and return true or false. It should be enough to do the job.

Resources