I have to represent IFC files on an Android application. First I have to get them from a server (I will use BIM Server), and then extract the geometry out of the IFC file, and try to display them. The parsing is my first concern at this point. Is there any JAVA library that mounts on the BIM server to directly give us the .obj data so we can show them on Android? Or maybe it is better to parse IFC files at the client side, and then display it?
Sorry, there is no robust documentation on it.
I found there are two tools for it: OpenIFCTools, and IFCOpenShell which provides a plugin. I'm not sure which one to use, and which one gives a better JAVA API to go for.
You can not directly visualize them on Android as it is not supported (based on what I know so far). You may need to parse them somehow on the client side, or use some tools to parse them on server, then send the corresponding .obj files (such as IFCOpenShell's IFCOBJ conversion tool)
Related
I have more then 50 fields that is continiously writing in the .proto file but my query is that
1) if I need to read only 10 fields then how can this be achieve.
2) If I need to read partial data from the particular field then how can I achieve.
this should be done without loading all the data from the .proto file.
Thanks for your concern.
This is not really possible with Protobufs. In theory you could write a streaming parser that might be able to extract part of the message without parsing the whole thing, but it would only work if the fields you needed happened to be located towards the front of the message, since you'd at least have to parse through everything before the fields you want. In any case, none of the standard protobuf implementations provide an easy way to do streaming parses, because this isn't the way protobuf is designed to be used. Some third-party implementations, such as upb, might help.
On the other hand, Cap'n Proto, an alternative to Protocol Buffers, does support reading just one field out of a large file, without having to parse the fields before it. It does this by placing fields at fixed offsets and taking advantage of mmap() for large files.
Disclosure: I am the author of both Cap'n Proto and Protocol Buffers v2 (the version open sourced by Google).
recently I came across protocol buffer
and my understanding so far is that it is a substitute for XML/JSON.
So mostly in android applications we get the data in XML/JSON format and parse it and then display the contents in our app. but I never came across any scenario where a JSON or XML was created at application side and then uploaded to the server.
So our current requirement asks us to capture some data and upload it in Protocol buffer format.
I just wanted to know the use cases for Protocol buffer.
Is this requirement feasible ?
Yes, that is entirely feasible; all you need is a protobuf library that targets your stack; based on the library list, I would suggest you look at the official Google protobuf java implementation, or "square/wire" - assuming you are coding in java.
I am working on a telehealth device showcase.
I have found Mirth Connect but no able to get hold on it that much. Is there any other api or frees source or library which can be used on our android client to convert xml into HL7 or any other format to HL7.
It seems no one wants to speak up so I'll try. First of all, there are two distinct HL7 formats – HL7v2 and HL7v3. So your first question would be – I have some data stored in the database (in a flat file in the XML format; in a flat file in JSON; etc) and I’d like to map it to HL7v2/HL7v3/CDA/etc.
Since both HL7v2 and HL7v3 cover multiple domains (e.g., Patient Administration, Medical Records, Genomics, etc.) your next question would be to specify what you are trying to achieve. If it’s a single domain solution, i.e., Pharmacy Dispensing System notifications or a full-fledged multi-domain solution.
The next one, what open-source system to use if any – Mirth Connect or something else. It also depends on where the data mapping or transformation is done – on the client side or on the server side (i.e., you can send a request message in your own format and transform it to the HL7 on the server side before passing to other players).
I presume, and I might be incorrect, we are talking about the patient demographic data using HL7v2 running on a patient's mobile phone. The Mirth Connect, as your initial format to HL7v2 translator, may be Ok for prototyping, running as a black box somewhere, but for the real solution on the mobile phone it might be too excessive. If there are quite a few request messages I would build them as my own proprietary code. If your solution is more complex, then it requires reviewing the solution architecture to find out all transformation points and this goes a bit beyond than a discussion on this site.
Again, this is my very subjective opinion.
And the last, but not least, there is an "Unofficial Mirth Connect Developer's Guide" book which may help in initial understanding what the Mirth Connect is capable of.
(Disclaimer: I'm the author of this book, so any comments or suggestions are welcome.)
For creation of some simple HL7 v2 messages you don't need any special libraries or tools or as it is almost simple text piped format (actually it is a binary format but if you take care about correct segment delimiters and don't use other then ASCII characters then it is straightforward to create).
Once you have the HL7 packet you can send it to an IP address with HL7 listening endpoint using the HL7 Minimal Lower Layer Protocol (MLLP).
Some open source code base that might be useful even on Adroid device are Java libraries used by the dcm4chee project.
e.g. the DICOM Clinical Data Manager system - image archive is able to communicate with both DICOM and HL7 systems and internally uses code that translates HL7 v2 messages into XML intermediate representation and back. Look for XSLT (*.xsl) transformation scripts.
I am looking to develop a transit app using GTFS static data. One of the constraints I've set to myself is that the app should use minimal mobile data transfers. Therefore, I would like to embed all the data in the app.
My issue is that GTFS data sets are usually quite large (85MB uncompressed for the city of Sydney for example). I've done a bit of reverse engineering on other apps out there and found out that some of them have managed to compress all that data into a much smaller file (I'm talking about a few MB at most).
Using 7zip, I've managed to compress my 85MB data set down to 5MB which is acceptable for me. The next step is for me to use that 7z file into my app and that's where I'm stuck. There's no way I'm going to uncompress it and put it in a SQL database as that will use too much space on the phone. So I was wondering what are my other options.
Thanks
First, for embedding, I recommend using the Embedded XZ library (similar to 7zip). I have embedded this in a project and had good luck with it. Just be sure to compress data using 'xz --check=crc32' so it's compatible with Embedded XZ, and remember to initialize the CRC table.
As for a decompression strategy, you may need to segment the data in such a way that you can decompress different parts of it on demand (i.e., a tree of databases). I'm not familiar with your data's characteristics. Will a user need it all loaded at the same time? Or can it easily be compartmentalized?
Also, XZ can be a bit slow, even to decode. Have you evaluated how well regular gzip performs? That tends to be A) very fast; and B) available as a standard part of all embedded and mobile frameworks.
Use protocol binary format (pbf) formely google and now open source. It is compact and very fast searchable, so no need to decompress it on a device and load it into a database on that device because pbf acts as a database. Just include pbf library in your code to query it. Of course you have to compress it once before distributing the data online.
I am developing an application that is required to retreive information from an XML file stored on a server.
I have written a parser class, using SAX, that reads in the data and pops it into an object which I can then access as required.
How would I go about querying the data, for instance searching for particular values and then only reading in the relevant elements. Server side, I can easily write an XQuery in order to return the required elements, however I am unsure how to do this from my application.
Is it possible to execute querys server side and then parse the resulting XML file?
I'm a little lost. If anyone can point me in the right direction, I'd be very grateful!
If you are developing on Android 2.2 or later, you can take advantage of the javax.xml.xpath's functionality (introduced in API level 8).
If you are developing on Android 2.1 or earlier, the server side filter (as you suggested: xquery or xpath) would be the best, otherwise you should hard-filter your xml data, or wrap all of it into java Objects in a List<?>, and filter that list. Both ways are quite resource-eating.
In my opinion, if handling huge amount of data at once, but displaying just a small part of it, the server side filtering is better (even though it needs multiple http requests: on changing data sets this is unevitable anyway).