-
-
Notifications
You must be signed in to change notification settings - Fork 413
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve YAML model repository (#4024)
Signed-off-by: Jan N. Klug <github@klug.nrw>
- Loading branch information
Showing
24 changed files
with
1,071 additions
and
451 deletions.
There are no files selected for viewing
65 changes: 0 additions & 65 deletions
65
...g.openhab.core.model.yaml/src/main/java/org/openhab/core/model/yaml/AbstractYamlFile.java
This file was deleted.
Oops, something went wrong.
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
28 changes: 28 additions & 0 deletions
28
...rg.openhab.core.model.yaml/src/main/java/org/openhab/core/model/yaml/YamlElementName.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,28 @@ | ||
/** | ||
* Copyright (c) 2010-2024 Contributors to the openHAB project | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0 | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package org.openhab.core.model.yaml; | ||
|
||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
|
||
/** | ||
* The {@link YamlElementName} is a required annotation for the inheritors of {@link YamlElement}. It specifies the root | ||
* element name in a YAML model that is described by the respective class. Code review MUST ensure that element names | ||
* are unique. | ||
* | ||
* @author Jan N. Klug - Initial contribution | ||
*/ | ||
@Retention(RetentionPolicy.RUNTIME) | ||
public @interface YamlElementName { | ||
String value(); | ||
} |
48 changes: 0 additions & 48 deletions
48
bundles/org.openhab.core.model.yaml/src/main/java/org/openhab/core/model/yaml/YamlFile.java
This file was deleted.
Oops, something went wrong.
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
29 changes: 29 additions & 0 deletions
29
...penhab.core.model.yaml/src/main/java/org/openhab/core/model/yaml/YamlModelRepository.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,29 @@ | ||
/** | ||
* Copyright (c) 2010-2024 Contributors to the openHAB project | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0 | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package org.openhab.core.model.yaml; | ||
|
||
import org.eclipse.jdt.annotation.NonNullByDefault; | ||
|
||
/** | ||
* The {@link YamlModelRepository} defines methods to update elements in a YAML model. | ||
* | ||
* @author Jan N. Klug - Initial contribution | ||
*/ | ||
@NonNullByDefault | ||
public interface YamlModelRepository { | ||
void addElementToModel(String modelName, YamlElement element); | ||
|
||
void removeElementFromModel(String modelName, YamlElement element); | ||
|
||
void updateElementInModel(String modelName, YamlElement element); | ||
} |
39 changes: 0 additions & 39 deletions
39
...openhab.core.model.yaml/src/main/java/org/openhab/core/model/yaml/YamlParseException.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.