net.dowhatimean.jme
Class ModelEditor

java.lang.Object
  extended bynet.dowhatimean.jme.ModelEditor

public class ModelEditor
extends Object

A Swing-based GUI window that provides a simple Turtle-based editor and inspector for Jena models. Useful for debugging GUI and web applications. To open an editor window, pass the model instance to the static open(Model) method.

The editor has basic reporting of Turtle syntax errors. It also updates the namespace prefixes of the model. Several windows for different models may be open at the same time. Concurrent changes to the model are reported.

The class has a main(java.lang.String[]) method for demonstration purposes. It loads one or more RDF files into Jena models and displays an editor for each.

Version:
$Id$
Author:
Richard Cyganiak (richard@cyganiak.de)

Method Summary
static void main(String[] args)
          Main method for demonstration purposes.
static ModelEditor open(Model sourceModel)
          Opens a new editor window and binds it to the given model.
static ModelEditor open(Model sourceModel, String title)
          Opens a new editor window and binds it to the given model.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

open

public static ModelEditor open(Model sourceModel)
Opens a new editor window and binds it to the given model.

Parameters:
sourceModel - A Jena model
Returns:
A reference to the new editor window

open

public static ModelEditor open(Model sourceModel,
                               String title)
Opens a new editor window and binds it to the given model. A custom title is useful to distinguish multiple editor windows for different models.

Parameters:
sourceModel - A Jena model
title - A custom title for the editor window
Returns:
A reference to the new editor window

main

public static void main(String[] args)
Main method for demonstration purposes. Takes a number of filename or URL arguments. Reads them as RDF/XML or Turtle (if ends with ".n3" or ".ttl"). Displays an editor for each. If the same filename appears twice, then both editors will use the same model.

Parameters:
args -