001package org.nasdanika.html.model.app.graph.emf;
002
003import static java.lang.annotation.ElementType.METHOD;
004import static java.lang.annotation.RetentionPolicy.RUNTIME;
005
006import java.lang.annotation.Retention;
007import java.lang.annotation.Target;
008import java.util.Collection;
009import java.util.List;
010import java.util.Map;
011import java.util.Map.Entry;
012
013import org.eclipse.emf.ecore.EReference;
014import org.eclipse.emf.ecore.EcorePackage;
015import org.nasdanika.common.ProgressMonitor;
016import org.nasdanika.graph.emf.EReferenceConnection;
017import org.nasdanika.html.model.app.Label;
018import org.nasdanika.html.model.app.graph.WidgetFactory;
019
020/**
021 * Annotation for an outgoing reference builder method. 
022 * The method shall have 4 or 5 parameters compatible with parameters of <p/>
023 * 
024 *  <code>EObjectNodeProcessor.buildOutgoingReference(
025 * <br/>&nbsp;&nbsp;&nbsp;&nbsp;                        {@link EReference} eReference,
026 * <br/>&nbsp;&nbsp;&nbsp;&nbsp;                        {@link List}&lt;{@link Entry}&lt;{{@link EReferenceConnection}, {@link WidgetFactory}&gt;&gt; referenceOutgoingEndpoints,
027 * <br/>&nbsp;&nbsp;&nbsp;&nbsp;                        {@link Collection}&lt;{@link Label}&gt; labels,
028 * <br/>&nbsp;&nbsp;&nbsp;&nbsp;                        {@link Map}&lt;{@link EReferenceConnection}, {@link Collection}&lt;{@link Label}&gt;&gt outgoingLabels,
029 * <br/>&nbsp;&nbsp;&nbsp;&nbsp;                        {@link ProgressMonitor} progressMonitor)</code>
030 * <p/>                 
031 * In the case of 4 parameters it is the last 4 parameters because the reference is already bound by the annotation.                     
032 * @author Pavel
033 *
034 */
035@Retention(RUNTIME)
036@Target(METHOD)
037public @interface OutgoingReferenceBuilder {
038
039        /**
040         * Reference ID, obtained from EPackage constants, e.g. <code>{@link EcorePackage}.ECLASS__EALL_ATTRIBUTES</code>.
041         * @return
042         */
043        int value();
044        
045}
046