Skip to content

Package: SegmentConverterValueResultEMF

SegmentConverterValueResultEMF

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011-2017 EclipseSource Muenchen GmbH and others.
3: *
4: * All rights reserved. This program and the accompanying materials
5: * are made available under the terms of the Eclipse Public License 2.0
6: * which accompanies this distribution, and is available at
7: * https://www.eclipse.org/legal/epl-2.0/
8: *
9: * SPDX-License-Identifier: EPL-2.0
10: *
11: * Contributors:
12: * Lucas Koehler - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emfforms.spi.core.services.databinding.emf;
15:
16: import java.util.Optional;
17:
18: import org.eclipse.emf.databinding.IEMFValueProperty;
19: import org.eclipse.emf.ecore.EClass;
20:
21: /**
22: * The result of a
23: * {@link DomainModelReferenceSegmentConverterEMF#convertToValueProperty(org.eclipse.emf.ecp.view.spi.model.VDomainModelReferenceSegment, org.eclipse.emf.ecore.EClass, org.eclipse.emf.edit.domain.EditingDomain)}
24: * execution containing the {@link IEMFValueProperty} and the resolved {@link EClass} for the next resolvement step. The
25: * EClass is null, if the segment referenced an EAttribute as its domain model feature.
26: *
27: * @author Lucas Koehler
28: * @since 1.19
29: *
30: */
31: public interface SegmentConverterValueResultEMF {
32:
33:         /**
34:          * The {@link IEMFValueProperty} resulting from the segment conversion. Must not be <code>null</code>.
35:          *
36:          * @return The {@link IEMFValueProperty}
37:          */
38:         IEMFValueProperty getValueProperty();
39:
40:         /**
41:          * Returns the target EClass of the resolved segment. This EClass is the root EClass for the next segment in the
42:          * DMR.
43:          *
44:          * @return The next EClass or nothing if the segment's domain model feature is an attribute.
45:          */
46:         Optional<EClass> getNextEClass();
47: }