-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #393 from DataInMotion/dynamic_service
Dynamic service
- Loading branch information
Showing
42 changed files
with
1,443 additions
and
354 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
core/emf-api/src/main/java/org/eclipse/sensinact/core/emf/dto/EMFGenericDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/********************************************************************* | ||
* Copyright (c) 2022 Contributors to the Eclipse Foundation. | ||
* | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Kentyou - initial implementation | ||
**********************************************************************/ | ||
package org.eclipse.sensinact.core.emf.dto; | ||
|
||
import org.eclipse.emf.ecore.EClass; | ||
import org.eclipse.emf.ecore.EReference; | ||
import org.eclipse.sensinact.core.annotation.dto.Model; | ||
import org.eclipse.sensinact.core.annotation.dto.Service; | ||
import org.eclipse.sensinact.core.push.dto.GenericDto; | ||
import org.eclipse.sensinact.model.core.provider.DynamicProvider; | ||
|
||
/** | ||
* A special update dto type. This is for the export mode, where you can work | ||
* directly with known EMF Models | ||
*/ | ||
public final class EMFGenericDto extends GenericDto { | ||
|
||
/** The {@link EClass} of the provider */ | ||
@Model | ||
public EClass modelEClass; | ||
|
||
/** | ||
* The {@link EClass} of a service. This must be set, when updating a | ||
* {@link DynamicProvider}, where a service might not be available yet. | ||
*/ | ||
@Service | ||
public EClass serviceEClass; | ||
|
||
/** | ||
* The {@link EReference} to the service to set. Can be null if service is | ||
* available. | ||
*/ | ||
@Service | ||
public EReference serviceReference; | ||
} |
14 changes: 14 additions & 0 deletions
14
core/emf-api/src/main/java/org/eclipse/sensinact/core/emf/dto/package-info.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/********************************************************************* | ||
* Copyright (c) 2023 Contributors to the Eclipse Foundation. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: Kentyou - initial implementation | ||
**********************************************************************/ | ||
@org.osgi.annotation.bundle.Export | ||
@org.osgi.annotation.versioning.Version("0.2.0") | ||
package org.eclipse.sensinact.core.emf.dto; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
core/emf-api/src/main/java/org/eclipse/sensinact/core/emf/twin/SensinactEMFService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/********************************************************************* | ||
* Copyright (c) 2023 Contributors to the Eclipse Foundation. | ||
* | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Kentyou - initial implementation | ||
**********************************************************************/ | ||
package org.eclipse.sensinact.core.emf.twin; | ||
|
||
import org.eclipse.emf.ecore.EClass; | ||
import org.eclipse.sensinact.core.twin.SensinactService; | ||
|
||
/** | ||
* The digital twin of a Service instance | ||
*/ | ||
public interface SensinactEMFService extends SensinactService { | ||
|
||
EClass getServiceEClass(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.