HTML service module

From WandoraWiki
(Difference between revisions)
Jump to: navigation, search
Line 3: Line 3:
 
  http://127.0.0.1:8898/topic  
 
  http://127.0.0.1:8898/topic  
  
This will open the same topic that is currently open in the Wandora application itself. To see other topics, use '''get''' parameter ''topic'' with the subject identifier of the topic you would like to see. For example  
+
This will open a HTML table visualization of the topic currently open in the Wandora application. Generated HTML pages contains links to all other related topics using this link format allowing very easy browsing of the topic map. To generate a visualization of any topic use URL parameter ''topic'' with a subject identifier of the topic. For example, you can generate a HTML view of topic '''Schema type''' with a request
  
 
  http://127.0.0.1:8898/topic?topic=http%3A%2F%2Fwww.wandora.org%2Fcore%2Fschema-type
 
  http://127.0.0.1:8898/topic?topic=http%3A%2F%2Fwww.wandora.org%2Fcore%2Fschema-type
  
Generated HTML pages contains links to all other related topics using this link format allowing very easy browsing of the topic map. Image below shows '''Schema type''' topic served by the this service.
+
Next screen capture views the generated HTML page.
  
 
[[Image:Embedded_http_server_example.gif|center]]
 
[[Image:Embedded_http_server_example.gif|center]]
  
This service uses [http://velocity.apache.org/ Apache velocity] to serve the pages. This means that it can also be used to server pages in other formats than HTML. The template used to build the pages can be changed in the service specific options. This template should be in the ''templates'' directory under the service specific directory. You can also place any static content needed for the pages in the ''static'' directory. You do not need to add the ''static'' in the path, just add the file name after the service name. For example <nowiki>http://localhost:8898/topic/wandora_logo.gif</nowiki> for the Wandora logo at the lower part of the page.
+
This service uses [http://velocity.apache.org/ Apache velocity] template engine to generate pages. Used template files locate in ''templates'' directory. Other web resources such as images locate in ''static'' folder. If you are familiar with Wandora's API and Velocity, it should be rather easy to modify default template file.
  
This is also the default handler for services unless something else is specified in the service specific options.
+
This is also the default handler for services if no specific service handle is not available.
  
 
== See also ==
 
== See also ==
  
 
* [[Embedded HTTP server]]
 
* [[Embedded HTTP server]]

Revision as of 19:43, 8 December 2011

This service provides a human friendly HTML access to the current topic map. HTML service name is topic. Service URL is

http://127.0.0.1:8898/topic 

This will open a HTML table visualization of the topic currently open in the Wandora application. Generated HTML pages contains links to all other related topics using this link format allowing very easy browsing of the topic map. To generate a visualization of any topic use URL parameter topic with a subject identifier of the topic. For example, you can generate a HTML view of topic Schema type with a request

http://127.0.0.1:8898/topic?topic=http%3A%2F%2Fwww.wandora.org%2Fcore%2Fschema-type

Next screen capture views the generated HTML page.

Embedded http server example.gif

This service uses Apache velocity template engine to generate pages. Used template files locate in templates directory. Other web resources such as images locate in static folder. If you are familiar with Wandora's API and Velocity, it should be rather easy to modify default template file.

This is also the default handler for services if no specific service handle is not available.

See also

Personal tools