I'm exploring samples from the OpenEHR CKM app (http://openehr.org/ckm/) and see that XML schema namespace for the OET templates is "openEHR/v1/Template". Where that XML Schema is hosted?
As far as I understood, the "openEHR/v1/Template" namespace points to an XML template schema definition for version 1.0.1 which is not available for download (http://www.openehr.org/releases/1.0.1/its/XML-schema/)
Tried to use OET XML Schema taken from 1.0.2 distr (http://www.openehr.org/releases/1.0.2/its/XML-schema/) but sample template OET files taken from CKM do not pass v1.0.2 XML schema validation.
Which OpenEHR template XML schema is actual and up-to-date?
Check the Ocean Template Designer, under Template Designer\Schemas. I think what you are looking for is CompositionTemplate.xsd
Also check the Java libs, oet-parser component: https://github.com/openEHR/java-libs/tree/master/oet-parser/src/main/xsd
Take into account that OET is an internal format of the Ocean Template Designer, in software you should be using Operational Templates (OPTs) that can be generated from OET templates.
You might find other usefull XSDs on my knowledge repo. I took some of the openEHR XSDs and flattened them to make automatic XML validation development easier: https://github.com/ppazos/knowledge
Related
There are only ugly HTML pages as download (HTML, HTML2 and dynamic all ugly), but the site, eg. edited https://app.swaggerhub.com/apis/{user}/{project}/{version}
(and many others!) offers pretty HTML interface... How to download this pretty HTML?
Complete and autonomous HTML code (file or zip of files).
I have a good and valid swagger.yaml or swagger.json file of my API, so another solution is to run a open sourse (plug and play!) tool with my API-description file.
The pretty:
The ugly:
The "pretty interface" on your screenshot is Swagger UI. It's free and open-source. There's a demo at http://petstore.swagger.io, where you can load your own YAML/JSON files from an URL and see how they would be rendered.
To use Swagger UI locally:
Go to https://github.com/swagger-api/swagger-ui and download the repository as ZIP:
Edit the dist\index.html file and change the line
url: "http://petstore.swagger.io/v2/swagger.json",
to the URL of your Swagger .json or .yaml file, e.g.
url: "http://api.mysite.com/swagger.json",
(Optional) Add/change other configuration parameters in the SwaggerUIBundle initialization code in dist\index.html.
Open the dist\index.html file in your browser to preview your API docs.
Note: If the spec does not load or "try it out" does not work, you probably need to enable CORS on the your server. See https://github.com/swagger-api/swagger-ui/blob/master/docs/usage/cors.md and https://enable-cors.org.
Upload the files from the dist folder somewhere to your server - and now you have pretty API docs too!
Alternatively, SwaggerHub (which you mentioned) provides cloud hosting for Swagger specs among other things, and has Swagger UI integrated. You can import your Swagger .json/.yaml files there and have your API docs hosted on SwaggerHub. A free plan is available.
Thanks to #tleyden at swagger-ui/issues for good clues!
Use the index and assets folder of this project, https://github.com/okfn-brasil/swagger-ui-html
The help for swashbuckle mentions that the ui for Swagger is driven by the generated json schema.
Where is this json file located?
I cannot find it in the folder for my asp.net project
When I actually run the application and navigate to http://localhost:51659/swagger/v1/swagger.json
then I see the json
Where is it on disk? Or is it only in memory?
There is no file generated, it is only on memory.
You might want to read a bit the code:
https://github.com/domaindrivendev/Swashbuckle/blob/master/Swashbuckle.Core/Swagger/SwaggerGenerator.cs
If you need a file you could create an IDocumentFilter to generate one. I have an example here generating a Yaml file:
https://github.com/heldersepu/Swagger-Net-Test/blob/master/Swagger_Test/App_Start/SwaggerConfig.cs#L378
There are many tools for Swagger yaml file editing . But with all of them I found, we have to edit the yaml files and we only can see the output. I want to know any editor which those yaml are generated according to a UI application where we can visually design. (for example, dreamweaver, it allows the user to design visually, meanwhile it generates all the html for us).
You might be looking for: https://studio.restlet.com
(There is a free plan for personal use)
I've looked at some plugins but no success.
I tried Export Plugin 1.6 as well but the view doesn't recognize r:.. and export:.. tags.
What is the best way to export rows of data from postgresql database into an excel file from a click of a button?
Thank you.
you could create a gsp which renders a .csv-file and set the content-type of the response to application/vnd.ms-excel within the controller.
that's the easiest way, but you will not be able to control the format of cells.
Apache POI - as mentioned by Abincepto - is another solution which is more complex but gives you full control over the generated excel file
Did you try directly with apache poi ?
From the website:
The Apache POI Project's mission is to create and maintain Java APIs for manipulating various file formats based upon the Office Open XML standards (OOXML) and Microsoft's OLE 2 Compound Document format (OLE2). In short, you can read and write MS Excel files using Java. In addition, you can read and write MS Word and MS PowerPoint files using Java. Apache POI is your Java Excel solution (for Excel 97-2008). We have a complete API for porting other OOXML and OLE2 formats and welcome others to participate.
EDIT:
Here is a tutorial: Read / Write Excel file in Java using Apache POI
and a quick guide
EDIT2:
I just found another link using Grails that could help you. The example use another library: jexcelapi
The export plugin is dependent on the resources plugin. You can add the resources plugin and try again. I use resources 1.2.8. Also you need to add this to your dependencies:
dependencies {
............
// Needed for the export plugin?
compile 'commons-beanutils:commons-beanutils:1.8.3'
plugins {
............
runtime ":resources:1.2.8"
I have on the one hand a wsdl url/file and on the other hand a number of xsd schema files (are the latte called binding files?).
All of these describe a webservice that I would like to consume using jax-ws.
I understand I need to generate client stubs using the wsimport utility.
I have a requirement for one distinct package per xsd schema/binding file for the generated stubs files. The generated stubs for the wsdl would be located in another package.
Does that make sense?
Is this possible? If so how?
I am missing something?
edit: I don't fully understand the difference of intent between files generated against the wsdl and files generated against the xsd binding files as when using wsimport. Can someone please explain?
baleto
first thing the xjb files are used to resolve conflicts and customizing schemas.
You can create a distinct package for a XSD if it has a specfic namespace defined for it.
For example you need a package name like com.foo.healthcare.claims then you need to have a name space for the schema as http://www.foo.com/healthcare/claims.