|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.9.0) E52944-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.jdeveloper.audit.model.ModelAdapter
oracle.jdeveloper.audit.model.ContainerModelAdapter
oracle.jdevimpl.audit.model.RootModelAdapter
public class RootModelAdapter
A ModelAdapter
which adapts the Audit framework to the (vestigial) model of the singleton Workspaces
node. The node is the root construct of the model, its contained constructs are the model adapters for its Workspace
children.
ModelAdapter
, ContainerModelAdapter
, RootModelType
Constructor Summary | |
---|---|
RootModelAdapter(ModelFactory factory, ModelType type) Creates a root document adapter. |
Method Summary | |
---|---|
protected void |
collectContainedElements() Collects the contained Element s 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(Location location) Gets whether this model contains a location. |
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. |
boolean |
equals(java.lang.Object object) Gets whether this model is equal to an object. |
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. |
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). |
Project |
getProject() Gets the project containing this model. |
java.net.URL |
getUrl() Gets the non-null URL corresponding to this model. |
Workspace |
getWorkspace() Gets the workspace containing this model. |
int |
hashCode() |
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. |
Methods inherited from class oracle.jdeveloper.audit.model.ContainerModelAdapter |
---|
addContainedElement, addContainedModel, addEmbeddedModel, getConstruct, getContainedConstructs, getContainedUnauditableElements, getElementLocations, getLocation, getRoot, isFile |
Methods inherited from class oracle.jdeveloper.audit.model.ModelAdapter |
---|
acquireReadLock, beginRead, beginRead, beginReadHook, cancelRead, compareSiblings, contains, contextDescription, edit, endRead, endRead, endReadHook, enter, exit, getAttribute, getCharacter, getColumnOffset, getConstruct, getDependency, getDirectoryAdapter, getElement, getEndLocation, getFactory, getFileAdapter, getFocusLocation, getFocusLocation, getIdeContext, getInitialLength, getLine, getLineOffset, getLocation, getLocation, getLock, getPrimaryCollationKey, getProjectAdapter, getSecondaryCollationKey, getSecondaryCollationString, getShortLabel, getText, getType, getURL, getWorkspaceAdapter, icon, isEditable, isModifiable, isModified, isModified, isReadLockHeld, isWriteLockHeld, label, release, releaseReadLock, setAttribute, summary, toString, verifyReadTransaction |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RootModelAdapter(ModelFactory factory, ModelType type)
RootModelType
.Method Detail |
---|
public java.net.URL getUrl()
ModelAdapter
getUrl
in class ModelAdapter
public ContainerModelAdapter getContainingAdapter()
ModelAdapter
getContainingAdapter
in class ModelAdapter
public Workspace getWorkspace()
ModelAdapter
getWorkspace
in class ModelAdapter
public Project getProject()
ModelAdapter
getProject
in class ModelAdapter
public ContentDirectory getDirectory()
ModelAdapter
getDirectory
in class ModelAdapter
protected void collectContainedElements()
ContainerModelAdapter
Element
s 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.
collectContainedElements
in class ContainerModelAdapter
public boolean equals(java.lang.Object object)
ModelAdapter
ModelFactory
instances cannot be compared.equals
in class ModelAdapter
public int hashCode()
hashCode
in class ModelAdapter
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.public boolean contains(Location location)
ModelAdapter
contains
in class ModelAdapter
location
- The Location
to test.public boolean contains(ModelAdapter that)
ModelAdapter
contains
in class ModelAdapter
that
- The ModelAdapter
to test.public boolean contains(java.lang.Object construct, Location location)
ModelAdapter
The default ModelAdapter
location returns true if the construct is this
or the location returned for the construct by ModelAdapter.getLocation(Object)
contains the construct (getLocation(construct).contains(location)
.
Subclasses that can determine containment trivially for some constructs, or can extract offset and length directly from some constructs and so avoid the expense of creating a object should override this method, delegating to super for any constructs they can't optimize. To determine containment of the location by an offset and length, use ModelAdapter.contains(int, int, Location)
to ensure correct results containment of an empty location.
contains
in class ModelAdapter
construct
- The construct in this node to test.location
- The Location
to test.public Node getNode()
ModelAdapter
Node
corresponding to this model, or null if none (in particular, if this is the root or a directory model).getNode
in class ModelAdapter
public java.lang.Object label(java.lang.Object construct)
ModelAdapter
Object
, 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 ModelAdapter
public java.lang.Object summary(java.lang.Object construct)
ModelAdapter
Object
, 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 ModelAdapter
public javax.swing.Icon icon(java.lang.Object construct)
ModelAdapter
icon
in class ModelAdapter
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.9.0) E52944-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |