Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.core.resources.mapping
Class CompositeResourceMapping


java.lang.Object
  extended by 

org.eclipse.core.runtime.PlatformObject
      extended by 

org.eclipse.core.resources.mapping.ResourceMapping
          extended by 
org.eclipse.core.resources.mapping.CompositeResourceMapping
All Implemented Interfaces:
IAdaptable

public final class CompositeResourceMapping
extends ResourceMapping

A resource mapping that obtains the traversals for its model object from a set of child mappings.

This class is not intended to be subclasses by clients.

Since:
3.2

Constructor Summary
CompositeResourceMapping ( String providerId, Object modelObject, ResourceMapping[] mappings)
          Create a composite mapping that obtains its traversals from a set of sub-mappings.
 
Method Summary
 boolean contains ( ResourceMapping mapping)
          Return whether this resource mapping contains all the resources of the given mapping.
  ResourceMapping[] getMappings ()
          Return the resource mappings contained in this composite.
  Object getModelObject ()
          Returns the application model element associated with this resource mapping.
  String getModelProviderId ()
          Returns the id of the model provider that generated this resource mapping.
  IProject[] getProjects ()
          Returns the projects that contain the resources that constitute this application model.
  ResourceTraversal[] getTraversals ( ResourceMappingContext context, IProgressMonitor monitor)
          Returns one or more traversals that can be used to access all the physical resources that constitute the logical resource.
 
Methods inherited from class org.eclipse.core.resources.mapping. ResourceMapping
accept, equals, findMarkers, getModelProvider, hashCode
 
Methods inherited from class org.eclipse.core.runtime. PlatformObject
getAdapter
 
Methods inherited from class java.lang. Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeResourceMapping

public CompositeResourceMapping(
String providerId,
                                
Object modelObject,
                                
ResourceMapping[] mappings)
Create a composite mapping that obtains its traversals from a set of sub-mappings.

Parameters:
modelObject - the model object for this mapping
mappings - the sub-mappings from which the traversals are obtained
Method Detail

contains

public boolean contains(
ResourceMapping mapping)
Description copied from class: ResourceMapping
Return whether this resource mapping contains all the resources of the given mapping.

This method always returns false when the given resource mapping's model provider id does not match that the of the receiver.

Overrides:
contains in class ResourceMapping
Parameters:
mapping - the given resource mapping
Returns:
true if this mapping contains all the resources of the given mapping, and false otherwise.

getMappings

public 
ResourceMapping[] getMappings()
Return the resource mappings contained in this composite.

Returns:
Return the resource mappings contained in this composite.

getModelObject

public 
Object getModelObject()
Description copied from class: ResourceMapping
Returns the application model element associated with this resource mapping.

Specified by:
getModelObject in class ResourceMapping
Returns:
the application model element associated with this resource mapping.

getModelProviderId

public 
String getModelProviderId()
Description copied from class: ResourceMapping
Returns the id of the model provider that generated this resource mapping.

Specified by:
getModelProviderId in class ResourceMapping
Returns:
the model provider id

getProjects

public 
IProject[] getProjects()
Description copied from class: ResourceMapping
Returns the projects that contain the resources that constitute this application model.

Specified by:
getProjects in class ResourceMapping
Returns:
the projects

getTraversals

public 
ResourceTraversal[] getTraversals(
ResourceMappingContext context,
                                         
IProgressMonitor monitor)
                                  throws 
CoreException
Description copied from class: ResourceMapping
Returns one or more traversals that can be used to access all the physical resources that constitute the logical resource. A traversal is simply a set of resources and the depth to which they are to be traversed. This method returns an array of traversals in order to provide flexibility in describing the traversals that constitute a model element.

Subclasses should, when possible, include all resources that are or may be members of the model element. For instance, a model element should return the same list of resources regardless of the existence of the files on the file system. For example, if a logical resource called "form" maps to "/p1/form.xml" and "/p1/form.java" then whether form.xml or form.java existed, they should be returned by this method.

In some cases, it may not be possible for a model element to know all the resources that may constitute the element without accessing the state of the model element in another location (e.g. a repository). This method is provided with a context which, when provided, gives access to the members of corresponding remote containers and the contents of corresponding remote files. This gives the model element the opportunity to deduce what additional resources should be included in the traversal.

Specified by:
getTraversals in class ResourceMapping
Parameters:
context - gives access to the state of remote resources that correspond to local resources for the purpose of determining traversals that adequately cover the model element resources given the state of the model element in another location. This parameter may be null, in which case the implementor can assume that only the local resources are of interest to the client.
monitor - a progress monitor, or null if progress reporting is not desired
Returns:
a set of traversals that cover the resources that constitute the model element
Throws:
CoreException - if the traversals could not be obtained.

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire