AJAX Interface
Set up the server
The server can be configured via the variables - these URLs are all relative to the used host-name by starting the server with "(rest-interface:start-tm-engine "data_base" :host-name "10.10.10.10 :port 8000").
The server handles JSON-data - the JSON-model is defined in JSON_model.pdf.
- rest-interface:*ajax-user-interface-url*
- URL-suffix of the entire user-interface
- default: http://localhost:8000/isidorus
- rest-interface:*json-get-prefix*
- URL-prefix to get a fragment depending on a topic-psi passed as suffix in the URL
- default: http://localhost:8000/json/get/<psi>
- rest-interface:*rdf-get-prefix*
- URL-prefix to get a RDF/XML answer of a topic map fragment which is mapped to RDF
- default: http://localhost:8000/json/get/rdf/<psi>
- rest-interface:*json-commit-url*
- URL to commit fragments via HTTP-POST or HTTP-PUT
- default: http://localhost:8000/json/commit
- rest-interface:*json-get-all-psis*
- URL-suffix to get all topic-psis of the DB
- default: http://localhost:8000/json/psis/
- rest-interface:*json-get-summary-url*
- URL-suffix to request a summary of all topics in the DB
- The HTTP-variables "start" and "end" can be used as topic-indices to limmit the data
- default: http://localhost:8000/json/summary/?start=0&end=nil
- rest-interface:*json-get-all-type-psis*
- URL-suffix to request topic-PSIs of all valid topic-types TMCL
- default: http://localhost:8000/json/tmcl/types/
- rest-interface:*json-get-all-instance-psis*
- URL-suffix to request topic-PSIs of all valid topic-instances from valid topic-types
- default: http://localhost:8000/json/tmcl/instances/
- rest-interface:*json-get-topic-stub-prefix*
- URL-prefix to request topicStub-information of the topic corresponding to the requestes PSI
- default: http://localhost:8000/json/topicstubs/<psi>
- rest-interface:*json-get-type-tmcl-url*
- URL-suffix to request some TMCL-information of topic(s) handled as types
- The topic PSIs have to be sent as HTTP-PUT or POST as a JSON-list
- default: http://localhost:8000/json/tmcl/type/
- rest-interface:*json-get-instance-tmcl-url*
- URL-suffix to request some TMCL-information of one topic that is treated as a topic-instance
- The PSI have to be sent as a list with exactly one PSI-item
- default: http://localhost:8000/json/tmcl/instance/
- rest-interface:*json-get-overview*
- URL-suffix to request a JSON-data that represents a Topic Maps Overview as a Topic-Tree. Every Topic-node has sub-nodes with the topic's instances and subtypes
- default: http://localhost:8000/isidorusjson/tmcl/overview/
- rest-interface:*ajax-user-interface-css-prefix*
- URL-preifx for requesting css-files
- default: http://localhost:8000/css
- rest-interface:*ajax-user-interface-css-directory-path*
- relative directory path of all css-files (relative to src/)
- default: ajax/css
- rest-interface:*ajax-user-interface-file-path*
- relative file path to the entry-file (isidorus.html) which includes all javascript- and css-files
- default: ajax/isidorus.html
- rest-interface:*ajax-javascript-directory-path*
- relative fiel path to all javascript-files
- default: ajax/javascripts
- rest-interface:*ajax-javascript-url-prefix*
- URL-prefix for all javascript files
- default: /javascripts
- rest-interface:*mark-as-deleted-url*
- URL-suffix to mark the passed object in JSON-notation as deleted
- default: /mark-as-deleted
- rest-interface:*sparql-url*
- URL-suffix to query the TM backend via TM-SPARQL
- default: /json/tm-sparql
To stop the server you can use the statement "(rest-interface:shutdown-tm-engine)". After the next call the server will shut down.
Set up the client
To configure the client you just need to set the constant HOST_PREF in src/ajax/javascripts/constants.js to the host-name you use. The constants
- GET_PREFIX
- GET_STUB_PREFIX
- TMCL_TYPE_URL
- TMCL_INSTANCE_URL
- COMMIT_URL
- ALL_PSIS_URL
- TYPE_PSIS_URL
- INSTANCE_PSIS_URL
- OWN_URL
- SUMMARY_URL
- TM_OVERVIEW
must be set to the corresponding values explained in "Set up the Server".
Note to be able to create new topic-instances via the client there is needed a TMCL (draft 07.08.2008) template. The lates template is currently not supported.
Topic Maps Overview
When you call the Isidoprus-page you will see the "home"-section. This section represents a tree-view of all valid- "topic types" and "topic instances".
There can exist more trees, if there is no topictype-constraint - otherwise the topic "topictype" is the single root. So every topic that is not an instance and subtype of any other topic is a root topic.
A node containes all PSIs of the representing topic, a link to edit the selected topic, a link to create a new topic-instance for the selected topic-type, sub-nodes with instance and subtypes of the current topic.
By clicking on nodes that contain sub-nodes it's possible to hide/show all sub-nodes of a specific node. After hiding some subnodes the parent-element will be displayed with an orange-color.
Depending on the amount of topics that Isidorus has to handle - it can take a few seconds to load this page.
Search Topics
At the moment, this section is not implemented!
Edit Topcis
First all editable topics have to be requested - so it is possible to select a topic-psi. After selecting a psi the fragment-template will be generated from the requested fragment- and TMCL-data.
All elements that are displayed with an orange colour as default or by hovering them - are able to execute any kind of action. This can be hiding, showing, disabling or enabling something.
Optional elements like itemIdentifiers are disabled when they own no content. Optionl names and occurrences are also disabled and additionaly minimized. You can maximize/minimize those elements by clicking the ">>"/"<<" buttons.
Elements that owns a bigger range of allowed instances can be added or removed by clicking "+"/"-". But note you are not able to remove all elements, one must stay, you can disable this element by a double click on it.
Name-variants are as deafault always disabled unless they have any content. At the moment it is not possible to set any scope on variants.
To check if a fragment is valid you can use the button "validate fragment" or send it directly by clicking on "commit fragment". It will be validated automatically and sent only when the fragment ist valid.
Otherwise you will see a message similar to this one.
Create Topics
This section is very similar to "Edit Topics" - the difference is that you choose one or more topics which are valid types. By committing the fragment there won't be edit a topic but created a new instance of the selected types.
If there exist any exclusive-instance-constraint the client handles this conflict and displays a message.
The functionality of the fragment-template is the same as explained in "Edit Topics".
Attachments (8)
-
ac003.png (247.5 KB) - added by 15 years ago.
topic maps overview
-
ac14.png (97.9 KB) - added by 15 years ago.
loading
-
ac05.png (169.4 KB) - added by 15 years ago.
action
-
ac07.png (148.2 KB) - added by 15 years ago.
minimize
-
ac08.png (145.3 KB) - added by 15 years ago.
variants
-
ac09.png (155.2 KB) - added by 15 years ago.
validate
-
ac10.png (168.8 KB) - added by 15 years ago.
commit
-
ac20.png (119.1 KB) - added by 15 years ago.
exclusive-instance-constraint
Download all attachments as: .zip