| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="de"> |
| <head> |
| <!-- Generated by javadoc (11.0.8) on Mon Nov 30 13:15:36 CET 2020 --> |
| <title>AmaltheaIndex</title> |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| <meta name="dc.created" content="2020-11-30"> |
| <link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style"> |
| </head> |
| <body> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <main role="main"> |
| <div class="header"> |
| <div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">org.eclipse.app4mc.amalthea.model</a></div> |
| <h2 title="Class AmaltheaIndex" class="title">Class AmaltheaIndex</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li>Object</li> |
| <li> |
| <ul class="inheritance"> |
| <li>AmaltheaIndex</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <pre>public final class <span class="typeNameLabel">AmaltheaIndex</span> |
| extends Object</pre> |
| <div class="block">This class provides static methods for efficient model navigation, search and delete. |
| <p> |
| An <a href="AmaltheaCrossReferenceAdapter.html" title="class in org.eclipse.app4mc.amalthea.model"><code>AmaltheaCrossReferenceAdapter</code></a> is created and attached to the root context of the model. |
| The adapter maintains an index that allows fast access to inverse references and an index based on object name. |
| <p> |
| The method <a href="#getInverseReferences(org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,java.util.Set)"><code>getInverseReferences</code></a> is called from several |
| generated model objects to compute inverse transient references based on the incoming references.</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Method</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#buildIndex(org.eclipse.emf.common.notify.Notifier)">buildIndex</a></span>​(@NonNull Notifier context)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates the index explicitly.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#delete(org.eclipse.emf.ecore.EObject)">delete</a></span>​(@NonNull EObject eObject)</code></th> |
| <td class="colLast"> |
| <div class="block">Deletes the object from its <code>containing</code> resource |
| and/or its <code>containing</code> object as well as from any |
| other feature that references it within the enclosing root context |
| (resource set, resource or root object).</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#deleteAll(java.util.Collection)">deleteAll</a></span>​(@NonNull Collection<? extends EObject> eObjects)</code></th> |
| <td class="colLast"> |
| <div class="block">Deletes the objects from their <code>containing</code> resource |
| and/or their <code>containing</code> object as well as from any |
| other feature that references it within the enclosing root context |
| (resource set, resource or root object).</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#deleteAll(java.util.Collection,boolean)">deleteAll</a></span>​(@NonNull Collection<? extends EObject> eObjects, |
| boolean recursive)</code></th> |
| <td class="colLast"> |
| <div class="block">Deletes the objects from their <code>containing</code> resource |
| and/or their <code>containing</code> object as well as from any |
| other feature that references it within the enclosing root context |
| (resource set, resource or root object).</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#dumpAdapterInfo(org.eclipse.emf.common.notify.Notifier,int,java.io.PrintStream)">dumpAdapterInfo</a></span>​(@NonNull Notifier context, |
| int info, |
| @NonNull PrintStream stream)</code></th> |
| <td class="colLast"> |
| <div class="block">Dumps adapter info to a print stream</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>static <T extends INamed><br>Set<T></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getElements(org.eclipse.emf.common.notify.Notifier,java.lang.String,java.lang.Class)">getElements</a></span>​(@NonNull Notifier context, |
| @NonNull String name, |
| @NonNull Class<T> targetClass)</code></th> |
| <td class="colLast"> |
| <div class="block">Finds elements by name and class</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>static <T extends INamed><br>Set<T></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getElements(org.eclipse.emf.common.notify.Notifier,java.util.regex.Pattern,java.lang.Class)">getElements</a></span>​(@NonNull Notifier context, |
| @NonNull Pattern namePattern, |
| @NonNull Class<T> targetClass)</code></th> |
| <td class="colLast"> |
| <div class="block">Finds elements by name pattern and class</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>static IReferable</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getEObjectByID(org.eclipse.emf.common.notify.Notifier,java.lang.String)">getEObjectByID</a></span>​(@NonNull Notifier context, |
| @Nullable String id)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>static <T> EList<T></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getInverseReferences(org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,java.util.Set)">getInverseReferences</a></span>​(@NonNull EObject eObject, |
| @NonNull EReference resultEReference, |
| @NonNull Set<@NonNull EReference> targetEReferences)</code></th> |
| <td class="colLast"> |
| <div class="block">Computes a list of objects that refer to an EObject via dedicated references.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>static List<Set<IReferable>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getObjectsWithConflictingNames(org.eclipse.emf.common.notify.Notifier)">getObjectsWithConflictingNames</a></span>​(@NonNull Notifier context)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>static Set<EObject></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getReferringObjects(org.eclipse.emf.ecore.EObject)">getReferringObjects</a></span>​(@NonNull EObject eObject)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a set of objects that refer to the given <code>eObject</code>.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>static <T extends EObject><br>Set<T></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getReferringObjects(org.eclipse.emf.ecore.EObject,java.lang.Class)">getReferringObjects</a></span>​(@NonNull EObject eObject, |
| @NonNull Class<T> targetClass)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a type filtered set of objects that refer to the given <code>eObject</code>.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>static <T extends EObject><br>Set<T></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getReferringObjects(org.eclipse.emf.ecore.EObject,java.lang.Class,org.eclipse.emf.ecore.EReference)">getReferringObjects</a></span>​(@NonNull EObject eObject, |
| @NonNull Class<T> targetClass, |
| @NonNull EReference targetEReference)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a filtered set of objects that refer to the given <code>eObject</code></div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a id="methods.inherited.from.class.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class Object</h3> |
| <code>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a id="getInverseReferences(org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,java.util.Set)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getInverseReferences</h4> |
| <pre class="methodSignature">public static <T> EList<T> getInverseReferences​(@NonNull EObject eObject, |
| @NonNull EReference resultEReference, |
| @NonNull Set<@NonNull EReference> targetEReferences)</pre> |
| <div class="block">Computes a list of objects that refer to an EObject via dedicated references. |
| <p> |
| This method is called from several generated model objects to compute |
| an inverse transient reference based on the incoming references.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>eObject</code> - object that implements a derived transient opposite reference</dd> |
| <dd><code>resultEReference</code> - opposite reference definition (resulting objects are computed)</dd> |
| <dd><code>targetEReferences</code> - list of incoming references</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>EcoreEList.UnmodifiableEList <T></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getReferringObjects(org.eclipse.emf.ecore.EObject)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getReferringObjects</h4> |
| <pre class="methodSignature">public static Set<EObject> getReferringObjects​(@NonNull EObject eObject)</pre> |
| <div class="block">Returns a set of objects that refer to the given <code>eObject</code>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>eObject</code> - </dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Set of objects (EObject)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getReferringObjects(org.eclipse.emf.ecore.EObject,java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getReferringObjects</h4> |
| <pre class="methodSignature">public static <T extends EObject> Set<T> getReferringObjects​(@NonNull EObject eObject, |
| @NonNull Class<T> targetClass)</pre> |
| <div class="block">Returns a type filtered set of objects that refer to the given <code>eObject</code>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>eObject</code> - </dd> |
| <dd><code>targetClass</code> - </dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Set of objects of given type <T extends EObject></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getReferringObjects(org.eclipse.emf.ecore.EObject,java.lang.Class,org.eclipse.emf.ecore.EReference)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getReferringObjects</h4> |
| <pre class="methodSignature">public static <T extends EObject> Set<T> getReferringObjects​(@NonNull EObject eObject, |
| @NonNull Class<T> targetClass, |
| @NonNull EReference targetEReference)</pre> |
| <div class="block">Returns a filtered set of objects that refer to the given <code>eObject</code> |
| <p> |
| Filters: |
| <ul> |
| <li>type (<code>targetClass</code>)</li> |
| <li>reference (<code>targetEReference</code>)</li> |
| </ul></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>eObject</code> - </dd> |
| <dd><code>targetClass</code> - </dd> |
| <dd><code>targetEReference</code> - </dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Set of objects of given type <T extends EObject></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getEObjectByID(org.eclipse.emf.common.notify.Notifier,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getEObjectByID</h4> |
| <pre class="methodSignature">public static IReferable getEObjectByID​(@NonNull Notifier context, |
| @Nullable String id)</pre> |
| </li> |
| </ul> |
| <a id="getObjectsWithConflictingNames(org.eclipse.emf.common.notify.Notifier)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getObjectsWithConflictingNames</h4> |
| <pre class="methodSignature">public static List<Set<IReferable>> getObjectsWithConflictingNames​(@NonNull Notifier context)</pre> |
| </li> |
| </ul> |
| <a id="buildIndex(org.eclipse.emf.common.notify.Notifier)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>buildIndex</h4> |
| <pre class="methodSignature">public static void buildIndex​(@NonNull Notifier context)</pre> |
| <div class="block">Creates the index explicitly. If the index is already available the method will have no effect. |
| <p> |
| This method is optional. Normally the index will be built on demand.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>eObject</code> - </dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="delete(org.eclipse.emf.ecore.EObject)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>delete</h4> |
| <pre class="methodSignature">public static void delete​(@NonNull EObject eObject)</pre> |
| <div class="block">Deletes the object from its <code>containing</code> resource |
| and/or its <code>containing</code> object as well as from any |
| other feature that references it within the enclosing root context |
| (resource set, resource or root object). Contained children of the object |
| are similarly removed from any features that reference them.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>eObject</code> - object to delete</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="deleteAll(java.util.Collection)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>deleteAll</h4> |
| <pre class="methodSignature">public static void deleteAll​(@NonNull Collection<? extends EObject> eObjects)</pre> |
| <div class="block">Deletes the objects from their <code>containing</code> resource |
| and/or their <code>containing</code> object as well as from any |
| other feature that references it within the enclosing root context |
| (resource set, resource or root object). Contained children of the object |
| are similarly removed from any features that reference them.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>eObjects</code> - objects to delete</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="deleteAll(java.util.Collection,boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>deleteAll</h4> |
| <pre class="methodSignature">public static void deleteAll​(@NonNull Collection<? extends EObject> eObjects, |
| boolean recursive)</pre> |
| <div class="block">Deletes the objects from their <code>containing</code> resource |
| and/or their <code>containing</code> object as well as from any |
| other feature that references it within the enclosing root context |
| (resource set, resource or root object). |
| If recursive is true, contained children of the object are similarly removed |
| from any features that reference them.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>eObjects</code> - objects to delete</dd> |
| <dd><code>recursive</code> - true: contained children should also be deleted</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getElements(org.eclipse.emf.common.notify.Notifier,java.lang.String,java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getElements</h4> |
| <pre class="methodSignature">public static <T extends INamed> Set<T> getElements​(@NonNull Notifier context, |
| @NonNull String name, |
| @NonNull Class<T> targetClass)</pre> |
| <div class="block">Finds elements by name and class</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>context</code> - EObject, Resource or ResourceSet</dd> |
| <dd><code>name</code> - String</dd> |
| <dd><code>targetClass</code> - for example: <code>Label.class</code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Set of named objects (INamed)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getElements(org.eclipse.emf.common.notify.Notifier,java.util.regex.Pattern,java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getElements</h4> |
| <pre class="methodSignature">public static <T extends INamed> Set<T> getElements​(@NonNull Notifier context, |
| @NonNull Pattern namePattern, |
| @NonNull Class<T> targetClass)</pre> |
| <div class="block">Finds elements by name pattern and class</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>context</code> - EObject, Resource or ResourceSet</dd> |
| <dd><code>namePattern</code> - for example: <code>Pattern.compile("Prefix_.*")</code></dd> |
| <dd><code>targetClass</code> - for example: <code>Label.class</code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Set of named objects (INamed)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="dumpAdapterInfo(org.eclipse.emf.common.notify.Notifier,int,java.io.PrintStream)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>dumpAdapterInfo</h4> |
| <pre class="methodSignature">public static void dumpAdapterInfo​(@NonNull Notifier context, |
| int info, |
| @NonNull PrintStream stream)</pre> |
| <div class="block">Dumps adapter info to a print stream</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>context</code> - EObject, Resource or ResourceSet</dd> |
| <dd><code>info</code> - content selector <ul> |
| <li> 1 - basic adapter info (resources, size of maps) |
| <li> 2 - cross reference map |
| <li> 3 - name index </ul></dd> |
| <dd><code>stream</code> - output stream (use System.out to print to console)</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| </div> |
| </main> |
| <!-- ========= END OF CLASS DATA ========= --> |
| </body> |
| </html> |