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(java.lang.Object 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 package model.
|
java.net.URL |
getUrl()
Gets the non-null URL corresponding to this model.
|
boolean |
isFile()
Gets whether this model represents a "file".
|
acquireReadLock, acquireReadLock, beginRead, beginRead, beginReadHook, cancelRead, compareSiblings, contains, contains, contains, contextDescription, edit, endRead, endRead, endReadHook, enter, equals, exit, getAttribute, getCharacter, getColumnOffset, getConstruct, getConstruct, getContainedConstructs, getDirectory, getDirectoryAdapter, getElement, getElementLocations, getEndLocation, getFactory, getFocusLocation, getFocusLocation, getIdeContext, getInitialLength, getLine, getLineOffset, getLocation, getLocation, getLocation, getLock, getNavigationPoint, getNode, getPrimaryCollationKey, getProject, getProjectAdapter, getRoot, getSecondaryCollationKey, getSecondaryCollationString, getShortLabel, getText, getType, getURL, getWorkspace, getWorkspaceAdapter, hashCode, icon, icon, isEditable, isModifiable, isModified, isModified, isReadLockHeld, isWriteLockHeld, label, label, release, releaseReadLock, setAttribute, summary, summary, toString, verifyReadTransaction
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)
public java.net.URL getUrl()
ModelAdapter
getUrl
in class ModelAdapter
public ContainerModelAdapter getContainingAdapter()
ModelAdapter
getContainingAdapter
in class ModelAdapter
public Dependency getDependency()
ModelAdapter
Dependency
which tracks changes to this model. A read
transaction must be active on this model.
The default ModelAdapter
implementation returns a null dependency.
getDependency
in class ModelAdapter
public boolean isFile()
ContainerModelAdapter.isFile()
returns true.isFile
in class ModelAdapter
public FileModelAdapter getFileAdapter()
ModelAdapter
getFileAdapter
in class ModelAdapter
public boolean contains(ModelAdapter that)
ModelAdapter
contains
in class ModelAdapter
that
- The ModelAdapter
to test.public int compareTo(java.lang.Object object)
ModelAdapter
ModelFactory
instances cannot be compared.compareTo
in interface java.lang.Comparable
compareTo
in class ModelAdapter
object
- The model to which to compare this model.