Subject locator previews

From WandoraWiki
Jump to: navigation, search

Subject locator is an URI that is the subject of a topic. In Wandora, each topic may have at most one subject locators. Wandora's Traditional topic panel views subject locator URI. In Wandora, a subject locator can be a

  • Local resources that is addressed by a file URI.
  • External resource addressed by an URL. Usually URL's protocol is http or https.
  • Internal data URI resource where the data is encoded inside the URI itself.

Traditional topic panel views the subject locator resource if option View subject locators is enabled. The option is set by selecting a menu option View > Traditional w ... > View subject locators. Another method to toggle the subject locator previews is to press the icon button right to the subject locator label. Wandora doesn't view subject locator resources by default. Once subject locator preview is enabled, Wandora resolves mimetype for the subject locator resource and chooses a viewer for the resource.


Contents

Supported preview formats

Wandora selects a viewer for the subject locator resouce using resources mimetype. At the moment Wandora has a viewer for images, videos, web pages etc. Next table lists all viewers and supported data formats (2016-05-10).

Mimetype(s) File extension(s) Handler Description and notes

application/zip

zip

ApplicationZip

Zip archive preview. Views the content of zip archive and allows the extraction of zipped files.

application/x.zx.*
application/x-spectrum-*
application/x.spectrum.*

z80
slt
tap
sna
rom

ApplicationZX

Sinclair ZX emulator based on Qaop created by Jan Bobrowski.

application/d64
application/x-d64
application/x-cbm-d64
application/t64
application/x-t64
application/x-cbm-t64
application/x-c64-program
application/x-c64-snaphot

d64
t64
prg
p00

ApplicationC64

Commodore 64 emulator based on JSwingC64 created by Joerg Jahnke.

audio/midi
application/x-midi

mid
midi
rmf

AudioMidi

Midi audio player. The midi player is based on Java's midi system.


audio/x-flac

flac

AudioFlac

Flac audio player. Wandora's flac audio player uses Daniel Becker's Javamod player. The Javamod player is embedded in Wandora and requires no extra installations.



audio/ogg
application/ogg

ogg
ogx

AudioOgg

Ogg Vorbis audio player. Wandora's ogg audio player uses Daniel Becker's Javamod player.



audio/x-sidtune
audio/sidtune
audio/x-psid
audio/psid
audio/prs.sid
audio/x-sid

sid

AudioSid

Sid tune audio player. See also The High Voltage SID Collection. Wandora's sid tune audio player uses Daniel Becker's Javamod player.



audio/mod
audio/xm
audio/wow
audio/it
audio/stm
audio/s3m
audio/xm

mod
wow
it
stm
s3m
xm

AudioMod

Mod audio player. Wandora's mod audio player uses Daniel Becker's Javamod player. See also The Mod Archive.



audio/x-wav
audio/x-aiff
audio/basic

wav
aif
au

AudioWav

Basic audio sample player for wav and aiff files. Basic audio sample player uses Java's native audio libraries.


audio/mpeg
audio/x-mpeg-3
audio/mpeg3

mp3

AudioMP3v2

Audio MP3 player. Wandora's mod audio player uses Daniel Becker's Javamod player. The Javamod player is embedded in Wandora and requires no additional installations.



image/*

gif
jpg
jpeg
tif
tiff
png

Image

Image viewer. Even though the viewer captures all image mimetypes, viewer supports only image types supported by Java.



application/pdf

pdf

ApplicationPDF

PDF viewer.



text/rtf
application/rtf

rtf

TextRTF

RTF viewer.



text/html

html
htm

TextHTML

General web viewer uses JavaFX. If Java doesn't support JavaFX, the web viewer doesn't work.




application/xml
text/xml

xml

ApplicationXML

General XML viewer. The XML is viewed as text.



text/*

txt
text
asm
asp
bat
c
....

Text

General text viewer that captures all text type mimetypes and many text file formats.



video/mp4
video/x-flv
video/x-javafx
application/vnd.apple.mpegurl
audio/mpegurl
audio/x-m4a
video/x-m4v

mp4
flv
fxm
m3u8
m4a
m4v

VideoMp4

Video player can view MP4 videos, for example. The video player requires JavaFX. Oracle's Java 8 includes JavaFX by default.



application/x-zmachine
application/x-zmachine-1
application/x-zmachine-2
application/x-zmachine-3
application/x-zmachine-4
application/x-zmachine-5
application/x-zmachine-6
application/x-zmachine-7
application/x-zmachine-8 application/x-blorb

z1
z2
z3
z4
z5
z6
z7
z8
zblorb
zlb

ApplicationZMachine

Viewer runs interactive fiction files in Z machine format and the user can play the games. Viewer is based on Z-Machine Preservation Project (ZMPP) created by Wei-ju Wu. Wandora fork is avalable in GitHub as a separate project. See The Interactive Fiction Archive for playable games.





Values in Handler column are Java classes in package org.wandora.application.gui.previews.formats.

Examples

Z machine preview example

Wandora user has created a topic Adventure 3 with a subject locator http://www.ifarchive.org/if-archive/games/zcode/adv550.z8. It addresses a playable Z machine application. User opens the topic with Tradition topic panel by double clicking the topic. Next Wandora user toggles the subject locator preview on by clicking the icon right to the subject locator field. Wandora opens up the subject locator preview, a playable Adventure 3, the 550 point version of Adventure aka Colossal Cave, by Dave Platt, from 1979, converted to C99 and compiled as Z-code with a modified vbccz compiler by Arthur O'Dwyer.


Sl preview example zmachine.png

MP3 audio preview example

Wandora user has a local folder that contains MP3 audio files. The user drags and drops the folder into Wandora's empty topic panel. Wandora ensures the user wants to extract dropped files with Simple File Extractor. The user confirms and clicks Yes to all button. Wandora creates topics for each MP3 file in the folder. Each created topic has a subject locator, a file URI addressing MP3 resource. User double mouse clicks one of the created topics, Wandora opens up the topic with Traditional topic panel. After the user has activated subject locator preview, Wandora opens the MP3 player. Now Wandora user can listen the MP3 audio track by pressing player's Play button.


Sl preview example mp3 1.png


Sl preview example mp3 2.png


Sl preview example mp3 3.png


Image preview example

In this example, Wandora user creates a topic without subject locator, and opens the topic into Traditional topic panel. Next the user drops a local JPG image file into the subject locator field. The user confirms to create a data uri out of dropped file resource. Wandora creates a data URI out of dropped resource and sets topic's subject locator. Finally user switches subject locator preview on by clicking the icon right to the subject locator field. The reader should note that the image data is now inside Wandora's topic map, encoded inside the data URI.


Sl preview example image 1.png


Sl preview example image 2.png


Sl preview example image 3.png


Web preview example

First the user double mouse clicks the topic Schema type in Wandora's topic tree. Wandora opens the topic in a Traditional topic panel. The user right mouse clicks the subject identifier http://wandora.org/si/core/schema-type and selects the menu option Copy to subject locator. Wandora sets topic's subject locator. The user sets subject locator previews visible and Wandora previews the URL http://wandora.org/si/core/schema-type. Next Wandora user changes the subject locator to http://www.bbc.com and Wandora reloads the preview.


Sl preview example web 1.png


Sl preview example web 2.png


Sl preview example web 3.png

Preview player options

All preview players have an user interface that is used to manage and tune the preview. Available managing and tuning options depend on viewed media format. Next chapters briefly describe available options in each preview player (2015-11-13).

AudioMidi

AudioMidi preview player is used to play midi audio files. The player has simple user interface to play and stop audio play, copy subject locator URI, fork external application for the URI, and to save the URL resource to a local file. The midi player has no progress bar nor time display.

Sl preview ui play.png Play the midi audio resource.
Sl preview ui stop.png Stop playing the midi resource.
Sl preview ui copy location.png Copy subject locator URI to system clipboard.
Sl preview ui open ext.png Open the subject locator URI with external application registered to handle midi resources.
Sl preview ui save as.png Save subject locator resource to a local file.

AudioFlac

AudioFlac preview player is used to play FLAC (Free Lossless Audio Codec) audio files. The FLAC player has a progress bar and time display during playback.

Sl preview ui play.png Plays the FLAC audio file.
Sl preview ui pause.png Pause the play.
Sl preview ui stop.png Stops the play.
Sl preview ui backward.png Move the play cursor backward.
Sl preview ui forward.png Move the play cursor forward.
Sl preview ui copy location.png Copy subject locator URI to system clipboard.
Sl preview ui open ext.png Open the subject locator URI with external application registered to handle FLAC files.
Sl preview ui save as.png Save subject locator resource to local file system as a FLAC file.

AudioOgg

AudioOgg preview player is used to play OGG audio files. The OGG player has a progress bar and time display during playback.

Sl preview ui play.png Plays the OGG audio file.
Sl preview ui pause.png Pause the play.
Sl preview ui stop.png Stops the play.
Sl preview ui backward.png Move the play cursor backward.
Sl preview ui forward.png Move the play cursor forward.
Sl preview ui copy location.png Copy subject locator URI to system clipboard.
Sl preview ui open ext.png Open the subject locator URI with external application registered to handle OGG files.
Sl preview ui save as.png Save subject locator resource to local file system as a OGG file.

AudioSid

AudioSid preview player is used to play sid audio files. The sid player has a progress bar which views current tune in sid file.

Sl preview ui play.png Plays the sid audio file.
Sl preview ui pause.png Pause the play.
Sl preview ui stop.png Stops the play.
Sl preview ui previous.png Play previous tune in sid file.
Sl preview ui next.png Play next tune in sid file.
Sl preview ui copy location.png Copy subject locator URI to system clipboard.
Sl preview ui open ext.png Open the subject locator URI with external application registered to handle sid files.
Sl preview ui save as.png Save subject locator resource to local file system as a sid file.

AudioMod

AudioMod preview player is used to play MOD audio files. The MOD player has a progress bar and time display during playback.

Sl preview ui play.png Plays the MOD audio file.
Sl preview ui pause.png Pause the play.
Sl preview ui stop.png Stops the play.
Sl preview ui backward.png Move the play cursor backward.
Sl preview ui forward.png Move the play cursor forward.
Sl preview ui copy location.png Copy subject locator URI to system clipboard.
Sl preview ui open ext.png Open the subject locator URI with external application registered to handle MOD files.
Sl preview ui save as.png Save subject locator resource to local file system as a MOD file.

AudioWav

AudioWav preview player is used to play WAV audio files. The WAV player contains a waveform view and buttons to control the playback and the subject locator resource. Next image views WAV player's waveform.


Sl preview wav waveform.png


Buttons to control the playback and the subject locator resource are


Sl preview ui play.png Plays the WAV audio file.
Sl preview ui stop.png Stops the play.
Sl preview ui copy location.png Copy subject locator URI to system clipboard.
Sl preview ui open ext.png Open the subject locator URI with external application registered to handle WAV files.
Sl preview ui save as.png Save subject locator resource to local file system as a WAV file.

AudioMP3v2

AudioMP3v2 preview player is used to play MP3 audio files. The MP3 player has a progress bar and time display during playback.

Sl preview ui play.png Plays the MP3 audio file.
Sl preview ui pause.png Pause the play.
Sl preview ui stop.png Stops the play.
Sl preview ui backward.png Move the play cursor backward.
Sl preview ui forward.png Move the play cursor forward.
Sl preview ui copy location.png Copy subject locator URI to system clipboard.
Sl preview ui open ext.png Open the subject locator URI with external application registered to handle MP3 files.
Sl preview ui save as.png Save subject locator resource to local file system as a MP3 file.

Image

Image views general images. User can zoom, copy and print the image, for example.

Sl preview ui zoom in.png Zoom in the image.
Sl preview ui zoom out.png Zoom out the image.
Sl preview ui reset size.png Reset image size. Image is viewed in an original size.
Sl preview ui copy image.png Copy subject locator image resource to system clipboard.
Sl preview ui copy location.png Copy subject locator URI to system clipboard.
Sl preview ui open ext.png Open the subject locator URI with external application registered to handle image files.
Sl preview ui save.png Save subject locator resource to a local image file.
Sl preview ui print.png Print subject locator resource image.

ApplicationPDF

ApplicationPDF views PDF resources. PDF options include PDF navigation and view zooming.

Sl preview ui first page.png View first page in PDF document.
Sl preview ui previous page.png View previous page in PDF document.
Sl preview ui next page.png View next page in PDF document.
Sl preview ui last page.png View last page in PDF document.
Sl preview ui zoom in.png Zoom in the PDF preview.
Sl preview ui zoom out.png Zoom out the PDF preview.
Sl preview ui copy image.png Copy current page of PDF document to system clipboard.
Sl preview ui copy location.png Copy subject locator URI to system clipboard.
Sl preview ui save.png Save subject locator resource to a local file.

TextRTF

TextRTF views RTF (Rich Text Format) formatted text files.

Sl preview ui copy location.png Copy subject locator URI to system clipboard.
Sl preview ui open ext.png Open the subject locator URI with external application registered to handle image files.
Sl preview ui save.png Save subject locator resource to a local image file.

TextHTML

TextHTML is a generic web viewer. It contains a web browser and a set of buttons to control the web view and the subject locator. The web viewer uses and requires JavaFX. Next list describes the preview buttons.

Sl preview ui reload.png User can leave the web page addresses by the subject locator URL. Reload button is used to reopen the subject locator URL.
Sl preview ui open ext.png Open the subject locator URL with external application registered to handle URLs.
Sl preview ui copy location.png Copy subject locator URI to system clipboard.
Sl preview ui copy selection.png Copy selected text to system clipboard.
Sl preview ui copy image.png Copy preview to system clipboard.
Sl preview ui save as.png Save subject locator resource to a local file.
Sl preview ui set basename.png Selected text is set as topic's basename.
Sl preview ui set display name.png Selected text is set as topic's display name.
Sl preview ui set occurrence.png Selected text is set as topic's occurrence.

ApplicationXML

ApplicationXML contains a text area and buttons to control the preview and the subject locator.

Sl preview ui copy location.png Copy subject locator URI to system clipboard.
Sl preview ui open ext.png Open the subject locator URI with external application registered to handle the resource.
Sl preview ui save.png Save subject locator resource to a local file.

Text

Text contains a scrollable text area and buttons to control the text area and the subject locator. The user can not edit the text in the text area. Selection and copy is allowed. Next image views an example of the text area.


Sl preview text view.png


Available options to control the preview and subject locator follow


Sl preview ui copy location.png Copy subject locator URI to system clipboard.
Sl preview ui open ext.png Open the subject locator URI with external application registered to handle the resource.
Sl preview ui save.png Save subject locator resource to a local file.

VideoMp4

Wandora uses VideoMp4 to view subject locator resources that are MP4 resources, for example. The view contains a video, progress bar and several buttons to control the video and the subject locator. The preview is based on and requires JavaFX. Next image views an example of video area.


Sl preview mp4 view.png


Available buttons to control the video and the subject locator are


Sl preview ui play.png Play media resource.
Sl preview ui pause.png Pause playing the media resource. Play continues by pressing the pause button again or by pressing the play button.
Sl preview ui stop.png Stop playing the media resource. Stopping play restores play cursor to the beginning to media resource.
Sl preview ui backward.png Move the play cursor backward. Pressing the backward button has effect only if the media resource is being played.
Sl preview ui forward.png Move the play cursor forward. Pressing the forward button has effect only if the media resource is being played.
Sl preview ui restart.png Restart playing the media resource.
Sl preview ui copy location.png Copy subject locator URI to system clipboard.
Sl preview ui open ext.png Open the subject locator URI with external application registered to handle media file.
Sl preview ui save as.png Save subject locator resource to a local file.

ApplicationZMachine

ApplicationZMachine is used to view interactive fiction games created for the Z machine. The view includes a game window and few buttons to control the view and subject locator.

Sl preview ui preferences.png Open preferences dialog of Z machine player. Preferences dialog is used to set font sizes, background and foreground colors, and antialising of text. Preferences changes take effect after game restarts. Game restarts if subject locator preview is toggled off and on.
Sl preview ui copy location.png Copy subject locator URI to system clipboard.
Sl preview ui open ext.png Open the subject locator URI with external application registered to handle media file.
Sl preview ui save.png Save subject locator resource to a local file.

Additional notes

  • Some preview players can't view (play) a data URI resources directly. These preview players save the data URI resource into a local file and view (play) the local file. These temporary files are stored in computer's default temporary directory. Temporary files are deleted when Wandora application is closed.
  • Java has security limitations that prevent the user to open data URIs with system's default application.
Personal tools