EGF Engine
Release 0.1.0

org.eclipse.egf.pattern.ecore
Class PatternSeeker

java.lang.Object
  extended by org.eclipse.egf.pattern.ecore.PatternSeeker

public class PatternSeeker
extends Object

A pattern seeker that takes a full id as parameter and is able to retrieve all corresponding patterns.
The full id can either be the id of a library or the id of a single pattern.


Constructor Summary
PatternSeeker(boolean searchInWorkspace_p)
          Constructor.
 
Method Summary
protected  void doGetPatternPaths(String partialId_p, IDescriptor library_p, List<PatternHandler.PatternData> data_p)
          Do retrieved all patterns data from reached library.
protected  void doResolveLibraryData(IDescriptor libraryChild_p, List<PatternHandler.PatternData> data_p)
          Do resolve given library child data.
protected  List<IDescriptor> getChildrenLibraries(IDescriptor parentLibrary_p)
          Get children libraries of given one.
 List<PatternHandler.PatternData> getPatternsData(String fullId_p)
          Get patterns from full id.
protected  void getPatternsData(String fullId_p, String partialId_p, IDescriptor library_p, List<PatternHandler.PatternData> data_p)
          Get patterns data from given full id.
protected  IDescriptor getRootLibraryFromId(String libraryId_p)
          Get root library from its id.
protected  void resolveLibraryData(IDescriptor library_p, List<PatternHandler.PatternData> data_p)
          Resolve library patterns data that should be produced.
protected  PatternHandler.PatternData resolvePatternData(IDescriptor pattern_p)
          Resolve pattern data from its descriptor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PatternSeeker

public PatternSeeker(boolean searchInWorkspace_p)
Constructor.

Parameters:
searchInWorkspace_p - Should extensions be read in workspace too ?
Method Detail

getPatternsData

public List<PatternHandler.PatternData> getPatternsData(String fullId_p)
Get patterns from full id.

Parameters:
fullId_p - The full id is composed of the chain of containing libraries and optionally the pattern id, separated by the # character.
E.g :
  • HelloWorld.Library1#Library2#Pattern1
    In this case, only Pattern1 will be produced.
  • HelloWorld.Library1#Library2
    In this one, the whole library Library2 will be produced, according to its orchestration class.
Returns:
not null, may be empty if no pattern to produce could be found.

getRootLibraryFromId

protected IDescriptor getRootLibraryFromId(String libraryId_p)
Get root library from its id.

Parameters:
libraryId_p -
Returns:

getChildrenLibraries

protected List<IDescriptor> getChildrenLibraries(IDescriptor parentLibrary_p)
Get children libraries of given one.

Parameters:
parentLibrary_p -
Returns:

getPatternsData

protected void getPatternsData(String fullId_p,
                               String partialId_p,
                               IDescriptor library_p,
                               List<PatternHandler.PatternData> data_p)
Get patterns data from given full id.

Parameters:
fullId_p - The original full id.
partialId_p - The partial id, as required by the search step.
library_p - The extension point element representing a library at given search step.
data_p - Resulting list of patterns data (to produce).

doGetPatternPaths

protected void doGetPatternPaths(String partialId_p,
                                 IDescriptor library_p,
                                 List<PatternHandler.PatternData> data_p)
Do retrieved all patterns data from reached library.

Parameters:
partialId_p - Either a library or pattern id.
library_p - Reached parent library.
data_p - Resulting patterns data list.

resolveLibraryData

protected void resolveLibraryData(IDescriptor library_p,
                                  List<PatternHandler.PatternData> data_p)
Resolve library patterns data that should be produced.

Parameters:
library_p -
data_p -

doResolveLibraryData

protected void doResolveLibraryData(IDescriptor libraryChild_p,
                                    List<PatternHandler.PatternData> data_p)
Do resolve given library child data.

Parameters:
libraryChild_p -
data_p -

resolvePatternData

protected PatternHandler.PatternData resolvePatternData(IDescriptor pattern_p)
Resolve pattern data from its descriptor.

Parameters:
pattern_p -
Returns:

EGF Engine
Release 0.1.0

Copyright (c) Thales Corporate Services S.A.S, 2009.

This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.