public abstract class FileModelAdapter extends ModelAdapter
ModelAdapter which adapts a file (text or binary) node.ModelAdapter,
TextFileModelAdapter| Modifier | Constructor and Description |
|---|---|
protected |
FileModelAdapter(ModelFactory factory,
ModelType model,
ContainerModelAdapter workspace,
ContainerModelAdapter project,
ContainerModelAdapter directory,
Node node,
java.net.URL url) |
protected |
FileModelAdapter(ModelFactory factory,
ModelType model,
ContainerModelAdapter workspace,
ContainerModelAdapter project,
ContainerModelAdapter directory,
Node node,
java.net.URL url,
java.lang.String primaryCollationKey) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(ModelAdapter object)
Gets whether this model is less than, equal to, or greater than another
using the natural order defined by this class.
|
boolean |
contains(ModelAdapter that)
Gets whether this model contains a model.
|
ContainerModelAdapter |
getContainingAdapter()
Gets the model adapter containing this model adapter, or null if this is
the root node.
|
Dependency |
getDependency()
Gets a
Dependency which tracks changes to this model. |
FileModelAdapter |
getFileAdapter()
Gets the model adapter for the file containing this model, or null if this
is a root, workspace, project, or directory model.
|
java.lang.String |
getRelativePath()
Gets the slash-separated path of this file relative to its content
set root directory.
|
java.net.URL |
getUrl()
Gets the non-null URL corresponding to this model.
|
boolean |
isFile()
Gets whether this model represents a "file".
|
acquireReadLock, acquireReadLock, acquireReadLock, beginRead, beginRead, beginReadHook, cancelRead, compareSiblings, contains, contains, contains, contextDescription, createModelAccessError, createModelAccessError, createModelAccessError, edit, endRead, endRead, endReadHook, enter, equals, exit, getAttribute, getCharacter, getColumnOffset, getConstruct, getConstruct, getContainedConstructs, getDirectory, getDirectoryAdapter, getElement, getElementLocations, getEndLocation, getFactory, getFocusLocation, getFocusLocation, getIcon, getIcon, getIdeContext, getInitialLength, getLabel, getLabel, getLine, getLineOffset, getLocation, getLocation, getLocation, getLock, getNavigationPoint, getNode, getPrimaryCollationKey, getProject, getProjectAdapter, getRoot, getRootHook, getSecondaryCollationKey, getSecondaryCollationString, getShortLabel, getSimpleName, getSummary, getSummary, getText, getType, getURL, getUrl, getWorkspace, getWorkspaceAdapter, hashCode, isAccessible, isModifiable, isModified, isModified, isNavigable, isReadLockHeld, isWriteLockHeld, release, releaseReadLock, releaseReadLock, setAttribute, toString, verifyModelAccess, verifyReadTransactionprotected FileModelAdapter(ModelFactory factory, ModelType model, ContainerModelAdapter workspace, ContainerModelAdapter project, ContainerModelAdapter directory, Node node, java.net.URL url)
protected FileModelAdapter(ModelFactory factory, ModelType model, ContainerModelAdapter workspace, ContainerModelAdapter project, ContainerModelAdapter directory, Node node, java.net.URL url, java.lang.String primaryCollationKey)
public java.net.URL getUrl()
ModelAdaptergetUrl in class ModelAdapterpublic java.lang.String getRelativePath()
ModelAdapter.getDirectory()public ContainerModelAdapter getContainingAdapter()
ModelAdaptergetContainingAdapter in class ModelAdapterpublic Dependency getDependency()
ModelAdapterDependency which tracks changes to this model. A read
transaction may or may not be active on this model.
The default ModelAdapter implementation returns a null dependency.
getDependency in class ModelAdapterpublic boolean isFile()
ContainerModelAdapter.isFile() returns true.isFile in class ModelAdapterpublic FileModelAdapter getFileAdapter()
ModelAdaptergetFileAdapter in class ModelAdapterpublic boolean contains(ModelAdapter that)
ModelAdaptercontains in class ModelAdapterthat - The ModelAdapter to test.public int compareTo(ModelAdapter object)
ModelAdapterModelFactory instances cannot be compared.compareTo in interface java.lang.Comparable<ModelAdapter>compareTo in class ModelAdapterobject - The model to which to compare this model.