Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embedding visualizations in external web pages - issue#226(1b) #388

Merged
merged 3 commits into from
Feb 27, 2015

Conversation

zangsir
Copy link
Collaborator

@zangsir zangsir commented Feb 2, 2015

[issue#226, 1b] A new method (evaluateFragmentVis() ) is created in SearchUI class for parsing URL call parameters and displaying the htmldoc visualization view of a requested document in the corpus. This functionality is realized by first parsing the url query parameters of corpus name(c), visualizer (vis=htmldoc), stylesheet name(sty), document name(doc) (e.g., #c=shenoute.a22, vis=htmldoc, doc=YA421-428, sty=dipl, in base64), and directly calling the HTMLVis.createComponent() method. This creates and returns a Panel and the resulting panel containing the htmldoc visualization of requested document is then displayed (css style is correctly applied). Meanwhile a notification is given showing the parameter values (corpus, document, visualization, stylesheets) of the url call. The result should be exactly the same as clicking the document visualization in DocBrowser.

…ent with specification of corpus name, document, and visualizer, etc. Then it will retrieve the html code generated for that document view and display the document. This is doen with a single URL call. in this version, I am parsing plain strings in URL instead of base64 (with no "_" preceding each parameter) for simplicity of testing.next I will try with base64 strings.
…c. css is not correctly realized (such as line numbers in Hebrew text).
…of a document in corpus. in this final version we call HTMLVis.createComponent() directly from the evaluateFragmentVis() method in SearchUI upon parsing the url parameters, and the resulting html view of the document (with specified css applied) should be exactly the same with that obtained from clicking the document view in DocBrowser.
@thomaskrause thomaskrause self-assigned this Feb 16, 2015
@thomaskrause thomaskrause merged commit c21b2d9 into korpling:develop Feb 27, 2015
@thomaskrause
Copy link
Member

In the updated implementation I also changed the URL scheme, now you have to use:

http://example.com/annis/embeddedvis/<vis>/<corpus>/<doc>?config=<was sty before>

as URL with

  • vis: visualizer name (currently only "htmldoc" is supported)
  • corpus: corpus name
  • doc: name of the document to visualize

Example with pcc2:
https://korpling.german.hu-berlin.de/annis3-snapshot/embeddedvis/htmldoc/pcc2/11299?config=infstr

@thomaskrause
Copy link
Member

Update: currently there is an ugly error message when the corpus does not exist.

@thomaskrause thomaskrause added this to the 3.3.0 milestone May 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants