public class DirectoryModelAdapter extends ContainerModelAdapter
ModelAdapter which adapts the Audit framework to a directory in a content set. The @link ContentDirectory} object is the root construct of the model, its contained constructs are the model adapters for the Node and ContentDirectory elements corresponding to the files and directories in the directory.ModelAdapter, ContainerModelAdapter, DirectoryModelType| Modifier and Type | Method and Description | 
|---|---|
protected void | 
collectContainedElements()
Collects the contained  
Elements of the root construct. | 
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. 
 | 
boolean | 
contains(java.lang.Object construct, Location location)
Gets whether a construct in this model contains a location. 
 | 
ContainerModelAdapter | 
getContainingAdapter()
Gets the model adapter containing this model adapter, or null if this is the root node. 
 | 
ContentDirectory | 
getDirectory()
Gets the package directory containing this model, or null if none. 
 | 
Location[] | 
getElementLocations(Element element)
Gets the locations of the constructs in this model corresponding to an IDE element. 
 | 
Node | 
getNode()
Gets the IDE  
Node corresponding to this model, or null if none (in particular, if this is the root or a directory model). | 
java.net.URL | 
getUrl()
Gets the non-null URL corresponding to this model. 
 | 
javax.swing.Icon | 
icon(java.lang.Object construct)
Gets the icon for a construct of this model. 
 | 
java.lang.Object | 
label(java.lang.Object construct)
Gets the label for a construct of this model. 
 | 
java.lang.Object | 
summary(java.lang.Object construct)
Gets the summary for a construct of this model. 
 | 
java.lang.String | 
toString()  | 
addContainedElement, addContainedModel, addEmbeddedModel, getConstruct, getContainedConstructs, getContainedUnauditableElements, getLocation, getRoot, isFileacquireReadLock, acquireReadLock, beginRead, beginRead, beginReadHook, cancelRead, compareSiblings, contains, contextDescription, edit, endRead, endRead, endReadHook, enter, equals, exit, getAttribute, getCharacter, getColumnOffset, getConstruct, getDependency, getDirectoryAdapter, getElement, getEndLocation, getFactory, getFileAdapter, getFocusLocation, getFocusLocation, getIdeContext, getInitialLength, getLine, getLineOffset, getLocation, getLocation, getLock, getNavigationPoint, getPrimaryCollationKey, getProject, getProjectAdapter, getSecondaryCollationKey, getSecondaryCollationString, getShortLabel, getText, getType, getURL, getWorkspace, getWorkspaceAdapter, hashCode, icon, isEditable, isModifiable, isModified, isModified, isReadLockHeld, isWriteLockHeld, label, release, releaseReadLock, setAttribute, summary, verifyReadTransactionpublic java.net.URL getUrl()
ModelAdaptergetUrl in class ModelAdapterpublic ContainerModelAdapter getContainingAdapter()
ModelAdaptergetContainingAdapter in class ModelAdapterpublic ContentDirectory getDirectory()
ModelAdaptergetDirectory in class ModelAdapterpublic Location[] getElementLocations(Element element)
ModelAdapterImplementations need only deal with IDE element types that are returned by the getRootElementTypes and getContainedElementTypes methods of the model type for this model.
getElementLocations in class ContainerModelAdapterelement - an IDE Element of a type supported by this model.protected void collectContainedElements()
Elements of the root construct. Implementations must call ContainerModelAdapter.addContainedElement(oracle.ide.model.Element, java.net.URL) for each contained element. This method is invoked by the first invocation of ContainerModelAdapter.getContainedConstructs(java.lang.Object) or #getContainedUnauditableElements, unless {@link #addContainedModel} has already been invoked.
The Audit framework invokes this method with a read transaction active on this model.
Collects the Node and ContentDirectory elements corresponding to the files and directories directly contained by the adapted directory.
collectContainedElements in class ContainerModelAdapterpublic int compareTo(java.lang.Object object)
ModelAdapterModelFactory instances cannot be compared.compareTo in interface java.lang.ComparablecompareTo in class ModelAdapterobject - The model to which to compare this model.public boolean contains(ModelAdapter that)
ModelAdaptercontains in class ModelAdapterthat - The ModelAdapter to test.
public boolean contains(java.lang.Object construct,
               Location location)
ModelAdaptercontains in class ModelAdapterconstruct - The construct in this node to test.location - The Location to test.public java.lang.String toString()
toString in class ModelAdapterpublic Node getNode()
ModelAdapterNode corresponding to this model, or null if none (in particular, if this is the root or a directory model).getNode in class ModelAdapterpublic java.lang.Object label(java.lang.Object construct)
ModelAdapterObject, and Audit uses String.valueOf(Object) to get a string. Typically, implementations of this method will return a string, but the return type allows an implementation to return an object which defers expensive formatting to its toString() method. If necessary, the label should be localized.label in class ModelAdapterpublic java.lang.Object summary(java.lang.Object construct)
ModelAdapterObject, and Audit uses String.valueOf(Object) to get a string. Typically, implementations of this method will return a string, but the return type allows an implementation to return an object which defers expensive formatting to its toString() method. The summary should be localized.summary in class ModelAdapterpublic javax.swing.Icon icon(java.lang.Object construct)
ModelAdaptericon in class ModelAdapter