com.bbn.swede.core.resources
Class OWLExternalDocument

java.lang.Object
  extended bycom.bbn.swede.core.resources.OWLElement
      extended bycom.bbn.swede.core.resources.OWLDocument
          extended bycom.bbn.swede.core.resources.OWLExternalDocument
All Implemented Interfaces:
IOWLDocument, IOWLElement, IOWLExternalDocument

public class OWLExternalDocument
extends OWLDocument
implements IOWLExternalDocument

Implementation for external OWL documents. An external document is a local copy of an OWL file downloaded from the web.

Author:
tself

Field Summary
protected  String _sourceURL
          The URL from which the document was originally downloaded.
 
Fields inherited from class com.bbn.swede.core.resources.OWLDocument
_mapGenLocs, _uri
 
Fields inherited from class com.bbn.swede.core.resources.OWLElement
_elemParent, _info, _resource, _sElementName
 
Constructor Summary
(package private) OWLExternalDocument(IFile file, String sourceURL)
          Creates an OWL external document based on an Eclipse file resource and source URL.
(package private) OWLExternalDocument(IFile file, String sourceURL, String uri)
          Creates an OWL external document based on an Eclipse file resource and source URL.
 
Method Summary
 String getSourceURL()
          Retrieves the URL the document was imported from.
 void setSourceURL(String url)
          Sets the document's external location.
 
Methods inherited from class com.bbn.swede.core.resources.OWLDocument
getAdapter, getCorrespondingElement, getDocumentInfo, getFile, getGeneratedCodeLocation, getGeneratedCodeMap, getLocalURI, getURI, setGeneratedCodeLocation, setURI
 
Methods inherited from class com.bbn.swede.core.resources.OWLElement
accept, contains, getCorrespondingResource, getElementInfo, getElementName, getParent, getPath, getResource, isReadOnly, setElementName, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.bbn.swede.core.IOWLDocument
getDocumentInfo, getFile, getGeneratedCodeLocation, getGeneratedCodeMap, getURI, setGeneratedCodeLocation, setURI
 
Methods inherited from interface com.bbn.swede.core.IOWLElement
accept, contains, getCorrespondingElement, getCorrespondingResource, getElementInfo, getElementName, getLocalURI, getParent, getPath, getResource, isReadOnly, setParent
 

Field Detail

_sourceURL

protected String _sourceURL
The URL from which the document was originally downloaded.

Constructor Detail

OWLExternalDocument

OWLExternalDocument(IFile file,
                    String sourceURL)
Creates an OWL external document based on an Eclipse file resource and source URL. The source URL will also be used as the document's XML base.

Parameters:
file - The Eclipse file
sourceURL - The URL the document was imported from

OWLExternalDocument

OWLExternalDocument(IFile file,
                    String sourceURL,
                    String uri)
Creates an OWL external document based on an Eclipse file resource and source URL. The XML base is set according to the uri parameter.

Parameters:
file - The Eclipse file
sourceURL - The URL the document was imported from
uri - The document's XML base
Method Detail

getSourceURL

public String getSourceURL()
Retrieves the URL the document was imported from. This may be different from its XML base.

Specified by:
getSourceURL in interface IOWLExternalDocument
Returns:
The source URL

setSourceURL

public void setSourceURL(String url)
                  throws MalformedURLException
Sets the document's external location. This may be different from the XML base, but should be resolvable so the document can be refreshed from the "official" copy online.

Parameters:
url - The new source URL
Throws:
MalformedURLException - if url is malformed.


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