Which API operation is used for uploading a custom ontology to an Azure Digital Twins instance? - azure-digital-twins

In the documentation there's a paragraph about Graph extensibility that reads:
Use extensibility to customize the underlying Digital Twins object models with new types and ontologies. Your Digital Twins data also can be enriched with extensible properties and values.
I found operations in the Digital Twins Service Management API for Listing, Retrieving and Update status for the preloaded ontologies but not for uploading a new custom one.
If I try to create/upload a new Ontology using the Update operation I receive a error result:
{
"error": {
"code": "404.600.000.001",
"message": "Specified Ontology was not found."
}
}
Is it possible to upload new ontologies in the public preview and if so, what API operation should I use to upload my custom ontology to my Digital Twins instance?
Thanks!

In the paragraph about Ontologies in the swagger documentation i found the following:
Ontologies are managed by the system and new ontologies or new type names are regularly added. Users can load or unload ontologies.
I understand now that this means it is not possible to add a custom ontology, only load or unload the ones already provided by the system.

For public preview release you cannot author and upload your own ontology. This feature is possible currently only with our support. You need to contact us, we’ll provide you with a schema and we’ll upload it for you. However, this will change in GA. We’ll create a library of ontologies having a public schema and we reserve the right to certify the authors. After certification, we’ll import the ontologies into the platform. It’s our goal to expose publicly standardized ontologies and not end up with thousands of flavors of these. However, I understand that some users might want to import new ontologies, without making them public. This is something we are considering as well.

Related

How to enable Watson conversation service to use your own database for serving user's request

I want to build a smart search agent which would use Watson conversation to process the request and give response but will use my own database say SQL server to search the desired output.
In Short Instead of writing intents and dialogues manually or importing from a csv file, I want to write my won code in .net in such a way that all the request and responses are influenced by my own data stored in my database. I only intent to use watson's processing and interpreting capability. But the processing must happen on my data.
E.g If the user searches for a word say "Dog", the Watson conversation service must search in my database and give relevant answers to the user based on the search.
Take a look at the solution architecture in the Watson Conversation documentation. Your database would be one of the depicted backend systems. Your application would be, as you mentioned, written in .NET and would use WCS to process the user input. It would return a response with all the associated metadata. Instead of having complete answers configured in a dialog, you would use something I have described as "replaced markers" in my collection of examples. Those markers are kind of hints to your application of which database query or which action to perform.
Note that WCS requires some intents and entities to work on. If you want to rely just on the detected intents and entities, you could work with one or two generic dialog nodes. As another technique you could use data from your database to generate intents and entities as an initial setup. In my "Mutating EgoBot" I use the Watson Conversation API to add intents and entities on the fly.
I believe you should use the standard trick:
instead of defining resposnses in the node of your diaglog, define an action on the output object of the node and let your applicatation take care of providing response (see https://console.bluemix.net/docs/services/conversation/develop-app.html#building-a-client-application)

Privacy on Hyperledger Fabric v1.0

Can you explain some mechanisms of privacy in Hyperledger Fabric v1.0 - those already implemented and those planned to be implemented in the future?
I understand channels are like seperate blockchains. I also went through the document on https://jira.hyperledger.org/browse/FAB-1151, where I have found two more mechanisms: one is private data, and other is encryption. Can you explain what would be the beast approach to use in the following scenario.
Each car needs car insurance. Let's say the owner of the car wants to change his insurance company. He signs the contract with new insurance company. Let's say there is also a regulator. The new insurance company informs the regulator about the new contract. The regulator then informs the old insurance company that the car is no longer insured there, but does not inform them about the name of the new insurance company. So we have assets that are shared in the network, but also some private data which only some participants can see. I am guessing this is one chain, so the use of multiple channels makes no sense here.
I do not completely grasp the concept of private data. Is that data supposed to be private only for one peer / company, or can it be shared between multiple companies, but not all of them? Is this the way to go in the scenario? What would be different reasons / use cases to use encryption vs. private data? What mechanism should be used in the described scenario?
First of all, these two concepts of encryption and private data are not mutual exclusive, the intent is to being able to use them both.
The concept behind having private data is to keep certain data keys out, to prevent them to being sent to the orderering service and to distribute them separately across the peers via gossip.
Now, the encryption needed to divide private data into portions which will be encrypted according to the visibility rules, e.g. to allow to read and see the relevant portions of the data to only involved parties.
With all that said, please note that FAB-1151 is still under development/design process and to be added post v1.0 of Hyperledger Fabrics.

Core Data Sync With Multiple Users

I would like to sync a core data app with a user with a different iCloud ID and I am trying to figure out the most graceful way to do this. I do not want the data to sync with all users, but want to be able to sync among family members for instance. From the research I have done, I do not think I can do that using iCloud Core Data sync because it only syncs between devices with the same iCloud ID. I have looked at this stackoverflow answer and read a little bit about Ensembles, Parcelkit and TICoreDataSync, Parse etc., but it is not clear to me if any of those options will allow me to sync with multiple users. Does anyone have a good method for syncing a Core Data app with multiple users?
Ensembles and TiCoreDataSync might work. They can use Dropbox file syncing, so in principle they should work with Dropbox shared folders. I don't think these are the main intended uses, so I suggest contacting the developers and/or doing some good testing yourself before assuming this would actually work.
You'll need to think about the user experience, though. At a minimum, your users would both need Dropbox accounts and would have to set up a shared folder before beginning to sync data this way.
Parcelkit probably won't work. It uses Dropbox's data store API which, unlike other Dropbox services, doesn't appear to support shared data.
Services that do support this kind of sharing exist-- for example, Parse and Firebase-- but make sure to review their pricing carefully before using them. Also of course, there have been any number of projects that have their own custom server back end, but that obviously requires having someone on the team who can do that kind of work.
You need to think about other device types (Android at least) if you want your application to be reaching more users.
I'm doing the same now by the following way:
Setup an online database with proper web services (careful with implementation for security matters - DB should NEVER be exposed by anything other than the web services).
Create a Class for your communication with the server (using Class methods with security handling like authentication and authorisation).
Use the class in your app to communicate with the server (SQL operations are done on the server).
To integrate with CoreData you need to create the model in your app similar to the structure in the backend database. Then you need to create a similar class for the app that deals with only local CoreData.
A higher level class might be required if you want to make sure that operations done on both server and local data storage.
Besides, you have to implement a lot of conditions to make sure that data written in local ONLY after making sure that it is stored online (or create an engine for differed operations to run later).
Another Way if you are familiar with notifications:
Use structured notifications between devices for data operations in order to keep everything in sync with other users. The problem with this is the "Autonomy" of the operations. If two operations were done in approximately the same time, you have to find a way to make sure the order of the operations is done properly (maybe timestamp or something).
I'm looking into the same thing for my app and I 'think' you can do a fairly unsecured version of what you are after using using the public folder in cloud kit as mentioned in this question (no accepted answer at time of posting) : Private data sharing using CloudKit
You would need to find a way to differentiate between data that is truly public and those shared among the users you need and some level of authentication.
I'm going to try exporting a permission file with access permission in it to whomever I want to share with combined with a unique identifier located in that permission file.
Keep in mind, as mentioned in the comments of the linked answer, my implementation will be security by obscurity (thanks for that phrase) unless you find a way of adding proper validation to it but my data is relatively insensitive.
Hope this, or any ridicule in the comments, points you in the right direction : )

How many ways to share data among activities in monodroid?

I need to share some sensitive data among activities.
I have two EditText which are basically username and password
I am consuming a webservice which on the base of provided username and password return some user info (DataType:String). Like userid,useremail etc.. which is basically in CSV format
I need these piece of information throughout my application.But i can't figure out which is the better way.
-- One way i could found out so far is to use sqlite with MonoAndroid
-- Other way i found out is using Application class
I just started to learn android today , but i want to know if there are some other ways to share data ?
As you mentioned, a global Application class and the database are two good ways to share application-wide data. One thing to be careful with is that your Application class could be recycled when the app is in the background, so you would lose any data that hasn't been persisted to something more permanent.
In addition to the database, you can also persist data down to the filesystem as well. This recipe from Xamarin has an example of writing directly to a file. Most of the classes you'll need to do file access are found in the System.IO namespace. Mono for Android also supports isolated storage, which provides a higher level API for reading and writing files.
If you simply need to pass data directly between activities, you can do so by adding it as an extra to the intent. This recipe explains how to do that.
If you want to wrap up access to a particular resource in a more managed fashion that can be accessed by either other parts of your application or even external applications, you can look into implementing a content provider. Android itself provides several built-in content providers for resources like contacts and media, if you need an example of what it's like to use one. This recipe explains how to read from the contacts provider.

How to make contentprovider data available to all applications in android

i've used contentproviders with DB.it has some data in it.i need to make those data available to all other applications.How? Usually the main use of content provider is to store and retrieve data and make it accessible to all applications. They’re the only way to share data across applications; there’s no common storage area that all Android packages can access.I used the code from below link..
http://ashwinrayaprolu.wordpress.com/2011/03/16/custom-content-provider-in-android/
Distribute your Content URI and define your API.
Provide the string of your Content Authority and the paths you recognize. Explain to your users how the tables in your DB map to your paths. Document what the columns in your tables are. Users with your content URI can read and write your databases using standard calls to ContentResolver and the insert/delete/update/query calls.
Provide access control in your <provider> tag in your AndroidManifest.xml. Look at The documentation especially with regard to android:exported, android:grantUriPermissions, android:permission, android:readPermission and android:writePermission. You'll need to decide how to use those based on your use cases. Also, the <grant-uri-permission> tag will give you even more fine-grained control.
Write other apps to use those calls you just documented and allowed permissions for.

Resources