how can I have picture to my ontology - ontology

How can I have a picture for my ontology where you can read the names of all content (class, object properties and data properties) using protege?

See the OntoGraph or OWLViz tab in Protege editor. From there, you can save the graph (if that's what you want).

Related

Serialize model instances only

I have an ontology that I load into Jena using a ModelFactory and a TurtleReader. Works great.
I then use that mode to create individuals via the createIndividuals() method. I can add those back to the original model and serialize it using an RDFDataMgr and I get good output containing the original ontology along with the new individuals.
However, what I would really like to be able to do is to just get the correctly serialized individuals (complete with required #prefix statements) NOT the entire original ontology along with the individuals.
Is there a way to do that? Thanks!

Breeze delete Projection

In my application I have an "Event". And to this Event, I can attach documents.
Now when I show a dialog of this Event, I want to list all the documents, that are related and I do this with a "select"-Projection (because I don't want the property in the document, that has the binary representation in it, which would be huge).
Now from this list, I should be able to delete a document. As I did a projection, I don't have a breeze entity for the document so I cannot call setDeleted() on the entityAspect.
How would this be done? Do I have to query the whole document just to delete it?
I do all of this in a sandboxed DataContext so just sending a command to the server to delete the document and requery is not an option - as the dialog can be cancelled.
If I do this with standard queries and navigation properties everything works fine but potentially slow if there are big images.
Check out this answer. Essentially, you can create an entity with the id of the entity you want deleted and set the entityaspect to 'deleted' and that should take care of it.

Merging JSON-LD results with original JSON

I'm working on visualizing several geojson files with a large set of properties. I would like to use json-ld to add some meaning to some of these properties. I don't have a lot experience with JSON-LD, but sucessfully applied the jsonld.js to expand, compact, etc. my geojson file and #context. In doing so I noticed that the end results only returns the graph that is actually described in the context. I can understand that, but since it only represents a small part of all my properties, I have some difficulty using the results.
It would help me if I could somehow merge the results of the jsonld operation with the original geojseon file. eg:
"properties": {
"<http://purl.org/dc/terms/title>": "My Title",
"<http://purl.org/dc/terms/type>": "<http://example.com/mytype>",
"NonJSONLDPropertyKey" : "NonJSONLDPropertyValue",
etc.
I would still be able to recognize the properties with an URI, but could also work with the non-json-ld properties. Any suggestions how this might work? Or is there a better approach?
You could map all other properties to blank nodes... that is identifiers that are scoped to the document. The simplest way to do so is to add a
"#vocab": "_:"
declaration to your context.

Core Data modeler not updating when entity names change

I am having an issue using Core Data modeler. I had an issue where I needed to change the names of entities in the modeler. When I did so, I deleted the associated managed object subclasses, did a clean, then went back the modeler, highlighted the entities with the new names, then generated subclasses using
Editor > Create NSManagedObject Subclass
When I did so, the newly generated subclasses still have the original names. Am I missing something?
In the model editor, you set the class name separately from the entity name. They don't have to be the same. If you only change the entity name name, what you're seeing is normal.
Select the ENTITY you want to change
Select Data Model from right hand top corner as shown below, and change as u want. Entity name and Class no need to be the same.
Finally Clean and Build the project.

smartgwt beginner- how to display xml entered in text area into tree

I am working with Smart GWT 3.0 LGPL- I am trying to display in a tree the entire block of XML entered by user into a text area.
I can get the nodelist from the xml entered by user, however in Smart GWT, Tree widget accepts only TreeNode[] members as data.
How do I convert the NodeList (obtained using GWT's inbuilt XML parser) into TreeNode[]? Is my approach correct(to display the xml in tree form)? Or is the solution to solve this problem completely different from what I am thinking?
I assume you use the SmartGWT's TreeGrid object to create the tree. The TreeGrid is just a specialized ListGrid and, as the later, it can be databounded to a Datasource, which can easily parse an XML. Look at this example. It should help you to create a solution to your problem. You can just show only one field in your TreeGrid, if all you need is a simple tree.
In the case that you can't access the xml data through a URL, like accessing them through your text area, after you have parsed them as a NodeList, you should iterate them and create an array of TreeNode objects. For each Something object you should set its associated TreeNode object's attributes using the setAttribute(attributeName, attributeValue) methods. Then create a Tree object, and starting from the root you can add the TreeNode objects using the various methods of the Tree, at the required position. Then a simple: treeGrid.setData(Tree tree) will load and show your data in your TreeGrid.
You can create an array TreeNode[] which have size as nodelist's length, and in a cycle to put on a value. And after that you can set in a tree this TreeNode[].

Resources