com.bbn.swede.editor
Class OWLEditorInput

java.lang.Object
  extended byFileEditorInput
      extended bycom.bbn.swede.editor.OWLEditorInput

public class OWLEditorInput
extends FileEditorInput

Customization of FileEditorInput that provides easy access to SWeDE-specific information about the associated IFile.

Author:
jlerner
See Also:
Serialized Form

Field Summary
protected  IOWLDocument _doc
          The OWL document element represented by the editor input.
 
Constructor Summary
OWLEditorInput(IFile file)
          Creates an editor input based off the given file resources.
 
Method Summary
 IOWLDocument getDocument()
          Provides access to the IOWLDocument that represents this editor input's file in the OWLModel.
 InputStream getInputStream()
          Creates a clean input stream for the IOWLDocument represented by this editor input.
 Model getModel()
          Provides access to the Jena model for the IOWLDocument represented by this editor input.
 OAST getOAST()
          Provides access to the OAST for the IOWLDocument represented by this editor input.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_doc

protected IOWLDocument _doc
The OWL document element represented by the editor input.

Constructor Detail

OWLEditorInput

public OWLEditorInput(IFile file)
Creates an editor input based off the given file resources.

Parameters:
file - The file resource
Method Detail

getDocument

public IOWLDocument getDocument()
Provides access to the IOWLDocument that represents this editor input's file in the OWLModel.

Returns:
The IOWLDocument that corresponds to the editor input's file

getOAST

public OAST getOAST()
Provides access to the OAST for the IOWLDocument represented by this editor input.

Returns:
The OAST for this editor input's IOWLDocument

getModel

public Model getModel()
Provides access to the Jena model for the IOWLDocument represented by this editor input.

Returns:
The com.hp.hpl.jena.rdf.model.Model for this editor input's IOWLDocument

getInputStream

public InputStream getInputStream()
                           throws CoreException
Creates a clean input stream for the IOWLDocument represented by this editor input. Since the resulting stream has unparseable regions blanked out, it is guarunteed to be parseable XML, but it may contain RDF errors.

Returns:
An input stream for this editor input's file resource with the unparseable regions blanked out. The user must close the stream when they are done with it.
Throws:
CoreException - if the file's contents cannot be read.


Copyright © 2004-2005 BBN Technologies. All Rights Reserved.