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?
Related
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.
The setup of the solution is a little bit complicated and restricts my options.
There is a project that contains all the GUI components; in it resides a control that contains a list of 'Project' items that each contains a list of 'Document' items. Initially both of these lists were implemented as ObservableCollections.
Project and Document are defined in a separate project, one that does not have access to System.Windows
One of the critical functions of the program generates a Document within a background thread (because it is slow and time-consuming); this Document needs to be added to a Project's Documents collection.
Since the document is being generated in a background thread, that thread cannot add the document to the collection - a NotSupportedException is generated.
There are several ways to extend ObservableCollections to be thread-safe - unfortunately all of the ones that I have seen so far rely on System.Windows.Threading.Dispatcher, which I cannot use due to (2).
I have discovered that I cannot use INotifyPropertyChanged on a list and must use a collection implementing INotifyCollectionChanged - basically ObservableCollection again. I'm not sure if it's a good idea to implement an extension of a List object when there are so many different methods that modify it, and what's to say it wouldn't have the same issues as ObservableCollection?
Using an explicit UpdateSourceTrigger on the binding does not look feasible, given that the Document is in a HierarchicalDataTemplate, and in any case passing the binding to the Project object looks to be a bit ugly.
Any suggestions?
Create the document on the background thread but use a callback on the primary thread to add it to the ObservableCollection (assuming the ObservableCollection is created on the primary thread).
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.
If I'm working with a DomainContext and HasChanges is true, is there a way to figure out what was changed? The answer to that would be good enough, but I'm specifically looking to find out if something is being deleted, though it doesn't neet to be that specific.
As far as I know, the changes are being kept on the Entity level. Each Entity has an EntityState that shows what type of change the Entity is in (that includes Deleted).
So in order to see what is changing or what type of changes are occuring, you have to look at each Entity itself. The good news is that each one of those has a HasChanges property as well.
I have a number of collection classes that implement their own custom update notification. It should be pretty easy to translate these notifications to an INotifyCollectionChanged implementation in a proxy class.
INotifyPropertyChanged is already taken care of; this question is just about collection proxies.
So, what I'm looking for is a way of creating the proxies that is relatively easy to use from XAML. This is particularly true for sub-collections. The custom collection classes are part of a library that cannot be modified (nor derived from). It's also not possible to replace the collection types with INotifyCollectionChanged-compatible equivalents, because the data-updating code is outside my control.
I'd prefer a solution that works with SL as well, but it's not a strict requirement.
So far, I believe the following approaches are viable:
Define a TypeDescriptionProvider registered for the collection classes that adds a Proxy property. This allows Binding paths to dot-into the proxy. It seems that this solution is easiest from a XAML perspective, but is not SL-compatible.
Define a value converter that creates the proxies. This would work with a bit more work from the XAML side. It should work for SL. However, it may require "intermediate" visual elements to hold the value converter result if more than one value conversion is necessary on a path.
I looked into ObjectDataProvider, but I don't think it can be used in this situation (the proxy creation method must be generic on the type of objects in the container).
Any recommendations on which of these two approaches is better, or any other approaches?
Paul Stovell created an editable collection adapter which in and of itself probably won't satisfy your needs, but it should give you a good starting point to create an appropriate adapter/proxy.
http://www.paulstovell.com/editable-collection-adapter
I've decided to move forward with a type converter that is also a MarkupExtension, as described by this blog post.
MarkupExtension isn't currently supported by Silverlight, but it will be in v5.