Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-03

oracle.jdeveloper.merge
Class MergeURLFileSystemHelper

java.lang.Object
  extended by oracle.ide.net.URLFileSystemHelper
      extended by oracle.jdeveloper.merge.MergeURLFileSystemHelper

public class MergeURLFileSystemHelper
extends URLFileSystemHelper

Filesystem helper class for the "ide.merge" protocol used by merge node URLs.

Since:
10.1.3.0.3

Field Summary
static java.lang.String MERGE_PROTOCOL
           
 
Constructor Summary
MergeURLFileSystemHelper()
           
 
Method Summary
 boolean canWrite(java.net.URL url)
          Overriden to allow edits to the text buffer of a merge node.
 boolean exists(java.net.URL url)
          Oveerriden to simulate that the given URL does not exist.
 java.lang.String getFileName(java.net.URL url)
          Returns the name of the file contained by the URL, not including any protocol, hostname authentication, directory path, anchor, or query.
 java.lang.String getPlatformPathName(java.net.URL url)
          Returns the platform-dependent String representation of the URL; the returned string should be considered acceptable for users to read.
 boolean isReadOnly(java.net.URL url)
          Overriden to allow edits to the text buffer of a merge node.
 long lastModified(java.net.URL url)
          Overriden to simulate that the given URL has a zero (Epoch) timestamp.
static java.net.URL newMergeURL(CompareContributor source, CompareContributor target, CompareContributor ancestor)
           
static java.net.URL newMergeURL(java.net.URL url)
           
 java.io.InputStream openInputStream(java.net.URL url)
          Overriden to raise an exception on attempting to read the URL.
 
Methods inherited from class oracle.ide.net.URLFileSystemHelper
addURLFileSystemListener, appendRelativePath, areEqual, areEqualPathElems, canCreate, canDelete, canonicalize, canRead, code, convertSuffix, createReader, createTempFile, delete, ensureSuffix, equals, getBaseParent, getDefaultIcon, getLength, getName, getParent, getPath, getPathNoExt, getSuffix, getSystemDisplayName, getSystemIcon, getTempDirectory, hashCode, hasSuffix, haveSameAuthority, haveSameHost, haveSamePath, haveSamePort, haveSameProtocol, haveSameQuery, haveSameRef, haveSameUserInfo, isBaseURLFor, isDirectory, isDirectoryPath, isHidden, isLocal, isRegularFile, isValid, list, list, list, listRoots, ls, ls, lsCached, lsCached, mkdir, mkdirs, openOutputStream, removeURLFileSystemListener, rename, setLastModified, setReadOnly, toDisplayString, toEncodedString, toEncodedString, toRelativeSpec, toRelativeSpec, verifyList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MERGE_PROTOCOL

public static final java.lang.String MERGE_PROTOCOL
See Also:
Constant Field Values
Constructor Detail

MergeURLFileSystemHelper

public MergeURLFileSystemHelper()
Method Detail

newMergeURL

public static java.net.URL newMergeURL(java.net.URL url)

newMergeURL

public static java.net.URL newMergeURL(CompareContributor source,
                                       CompareContributor target,
                                       CompareContributor ancestor)

getFileName

public java.lang.String getFileName(java.net.URL url)
Description copied from class: URLFileSystemHelper
Returns the name of the file contained by the URL, not including any protocol, hostname authentication, directory path, anchor, or query. This simply returns the simple filename. For example, if you pass in an URL whose string representation is:
protocol://host:1010/dir1/dir2/file.ext#anchor?query
the returned value is "file.ext" (without the quotes).

The returned file name should only be used for display purposes and not for opening streams or otherwise trying to locate the resource indicated by the URL.

Overrides:
getFileName in class URLFileSystemHelper

getPlatformPathName

public java.lang.String getPlatformPathName(java.net.URL url)
Description copied from class: URLFileSystemHelper
Returns the platform-dependent String representation of the URL; the returned string should be considered acceptable for users to read. In general, the returned string should omit as many parts of the URL as possible. For the "file" protocol, therefore, the platform pathname should just be the pathname alone (no protocol) using the appropriate file separator character for the current platform. For other protocols, it may be necessary to reformat the URL string into a more human-readable form. That decision is left to each URLFileSystemHelper implementor. The default implementation returns url.toString(). If the URL is null, the empty string is returned.

Overrides:
getPlatformPathName in class URLFileSystemHelper
Returns:
The path portion of the specified URL in platform-dependent notation. This value should only be used for display purposes and not for opening streams or otherwise trying to locate the document.

openInputStream

public java.io.InputStream openInputStream(java.net.URL url)
Overriden to raise an exception on attempting to read the URL.

Overrides:
openInputStream in class URLFileSystemHelper
Parameters:
url - ignored.
Returns:
never, throws an IOException.
Throws:
java.io.IOException - always.
See Also:
IOException, URLConnection, UnknownServiceException

isReadOnly

public boolean isReadOnly(java.net.URL url)
Overriden to allow edits to the text buffer of a merge node.

Overrides:
isReadOnly in class URLFileSystemHelper
Parameters:
url - ignored.
Returns:
false, always.

canWrite

public boolean canWrite(java.net.URL url)
Overriden to allow edits to the text buffer of a merge node.

Overrides:
canWrite in class URLFileSystemHelper
Parameters:
url - ignored.
Returns:
true, always.

exists

public boolean exists(java.net.URL url)
Oveerriden to simulate that the given URL does not exist.

Overrides:
exists in class URLFileSystemHelper
Parameters:
url - ignored.
Returns:
false, always.

lastModified

public long lastModified(java.net.URL url)
Overriden to simulate that the given URL has a zero (Epoch) timestamp.

Overrides:
lastModified in class URLFileSystemHelper
Parameters:
url - ignored.
Returns:
0, always.
See Also:
URLConnection

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-03

Copyright © 1997, 2009, Oracle. All rights reserved.