org.fcrepo.client.objecteditor
Class RDFTupleEditor

java.lang.Object
  extended by org.fcrepo.client.objecteditor.ContentViewer
      extended by org.fcrepo.client.objecteditor.ContentEditor
          extended by org.fcrepo.client.objecteditor.RDFTupleEditor
All Implemented Interfaces:
ActionListener, WindowListener, PropertyChangeListener, EventListener, DocumentListener

public class RDFTupleEditor
extends ContentEditor
implements DocumentListener, ActionListener, PropertyChangeListener, WindowListener

An RDF editor/viewer.


Field Summary
protected  String dsid
           
protected  JButton m_add
           
protected  JPanel m_component
           
protected  ActionListener m_dataChangeListener
           
protected  org.fcrepo.client.objecteditor.RDFTupleEditor.RDFDataModel m_dataModel
           
protected  JButton m_delete
           
protected  boolean m_dirty
           
protected  JButton m_edit
           
protected  JTable m_editor
           
protected  org.trippi.io.TripleIteratorFactory m_factory
           
protected  boolean m_isEditable
           
protected  HashMap<String,String> m_map
           
protected  org.fcrepo.client.objecteditor.RDFTupleEditor.RDFDataModel m_origContent
           
protected  JScrollPane m_scrollPane
           
protected  String pid
           
static String[] s_types
          This class handles the RDF MIME type.
 
Constructor Summary
RDFTupleEditor()
           
 
Method Summary
 void actionPerformed(ActionEvent e)
           
 void changedUpdate(DocumentEvent e)
           
 void changesSaved()
          Called when the caller wants what is in the view to be considered "not dirty" because it's been saved that way.
 JComponent getComponent()
          Get the JComponent.
 InputStream getContent()
          Gets the content in its edited state.
 String[] getTypes()
          Returns a list of content types that this component can handle.
 void init(String type, InputStream data, boolean viewOnly)
          Initializes the handler.
 void insertUpdate(DocumentEvent e)
           
 boolean isDirty()
          Returns true if the content should be considered "dirty" (e.g.
 void propertyChange(PropertyChangeEvent arg0)
           
 void removeUpdate(DocumentEvent e)
           
 void setContent(InputStream data)
          Re-initializes the handler given new input data.
 void setContentChangeListener(ActionListener listener)
          Sets the listener that this ContentEditor will notify via listener.actionPerformed(...) when any content-changing events occur that could potentially affect its "dirty state" (whether going from not dirty to dirty, or dirty to not dirty).
 void setPIDAndDSID(String pid, String dsid)
           
 void undoChanges()
          Called when the caller wants to update the view back to the data was originally passed in.
 void windowActivated(WindowEvent e)
           
 void windowClosed(WindowEvent e)
           
 void windowClosing(WindowEvent e)
           
 void windowDeactivated(WindowEvent e)
           
 void windowDeiconified(WindowEvent e)
           
 void windowIconified(WindowEvent e)
           
 void windowOpened(WindowEvent e)
           
 
Methods inherited from class org.fcrepo.client.objecteditor.ContentEditor
isEditor
 
Methods inherited from class org.fcrepo.client.objecteditor.ContentViewer
newInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

s_types

public static String[] s_types
This class handles the RDF MIME type.


m_dirty

protected boolean m_dirty

m_dataChangeListener

protected ActionListener m_dataChangeListener

m_editor

protected JTable m_editor

m_scrollPane

protected JScrollPane m_scrollPane

m_component

protected JPanel m_component

m_origContent

protected org.fcrepo.client.objecteditor.RDFTupleEditor.RDFDataModel m_origContent

m_dataModel

protected org.fcrepo.client.objecteditor.RDFTupleEditor.RDFDataModel m_dataModel

m_isEditable

protected boolean m_isEditable

m_add

protected JButton m_add

m_edit

protected JButton m_edit

m_delete

protected JButton m_delete

pid

protected String pid

dsid

protected String dsid

m_map

protected HashMap<String,String> m_map

m_factory

protected org.trippi.io.TripleIteratorFactory m_factory
Constructor Detail

RDFTupleEditor

public RDFTupleEditor()
Method Detail

getTypes

public String[] getTypes()
Description copied from class: ContentViewer
Returns a list of content types that this component can handle. This will usually be a list of MIME Types, but may also include other notions of type known to be understood by the users of ContentHandlerFactory.

Specified by:
getTypes in class ContentViewer

setPIDAndDSID

public void setPIDAndDSID(String pid,
                          String dsid)
Overrides:
setPIDAndDSID in class ContentEditor

init

public void init(String type,
                 InputStream data,
                 boolean viewOnly)
          throws IOException
Description copied from class: ContentViewer
Initializes the handler. This should only be called once per instance, and is guaranteed to have been called when this component is provided by the ContentHandlerFactory. The viewOnly parameter signals to ContentEditor implementations that editing capabilities are not desired by the caller.

Specified by:
init in class ContentViewer
Throws:
IOException

setContent

public void setContent(InputStream data)
                throws IOException
Description copied from class: ContentViewer
Re-initializes the handler given new input data. The old data can be discarded.

Specified by:
setContent in class ContentViewer
Throws:
IOException

getComponent

public JComponent getComponent()
Description copied from class: ContentViewer
Get the JComponent.

Specified by:
getComponent in class ContentViewer

changesSaved

public void changesSaved()
Description copied from class: ContentEditor
Called when the caller wants what is in the view to be considered "not dirty" because it's been saved that way.

Specified by:
changesSaved in class ContentEditor

undoChanges

public void undoChanges()
Description copied from class: ContentEditor
Called when the caller wants to update the view back to the data was originally passed in.

Specified by:
undoChanges in class ContentEditor

isDirty

public boolean isDirty()
Description copied from class: ContentEditor
Returns true if the content should be considered "dirty" (e.g. it has changed due to some form of editing).

Specified by:
isDirty in class ContentEditor

setContentChangeListener

public void setContentChangeListener(ActionListener listener)
Description copied from class: ContentEditor
Sets the listener that this ContentEditor will notify via listener.actionPerformed(...) when any content-changing events occur that could potentially affect its "dirty state" (whether going from not dirty to dirty, or dirty to not dirty).

Specified by:
setContentChangeListener in class ContentEditor

getContent

public InputStream getContent()
                       throws IOException
Description copied from class: ContentEditor
Gets the content in its edited state.

Specified by:
getContent in class ContentEditor
Throws:
IOException

changedUpdate

public void changedUpdate(DocumentEvent e)
Specified by:
changedUpdate in interface DocumentListener

insertUpdate

public void insertUpdate(DocumentEvent e)
Specified by:
insertUpdate in interface DocumentListener

removeUpdate

public void removeUpdate(DocumentEvent e)
Specified by:
removeUpdate in interface DocumentListener

propertyChange

public void propertyChange(PropertyChangeEvent arg0)
Specified by:
propertyChange in interface PropertyChangeListener

actionPerformed

public void actionPerformed(ActionEvent e)
Specified by:
actionPerformed in interface ActionListener

windowActivated

public void windowActivated(WindowEvent e)
Specified by:
windowActivated in interface WindowListener

windowClosed

public void windowClosed(WindowEvent e)
Specified by:
windowClosed in interface WindowListener

windowClosing

public void windowClosing(WindowEvent e)
Specified by:
windowClosing in interface WindowListener

windowDeactivated

public void windowDeactivated(WindowEvent e)
Specified by:
windowDeactivated in interface WindowListener

windowDeiconified

public void windowDeiconified(WindowEvent e)
Specified by:
windowDeiconified in interface WindowListener

windowIconified

public void windowIconified(WindowEvent e)
Specified by:
windowIconified in interface WindowListener

windowOpened

public void windowOpened(WindowEvent e)
Specified by:
windowOpened in interface WindowListener


Copyright © 2012 DuraSpace. All Rights Reserved.