Package org.openhab.core.model.yaml
Interface YamlFile
- All Known Implementing Classes:
AbstractYamlFile
@NonNullByDefault
public interface YamlFile
The
YamlFile
is the interface to manage the generic content of a YAML configuration file.- Author:
- Laurent Garnier - Initial contribution
-
Method Summary
Modifier and TypeMethodDescriptionList<? extends YamlElement>
Get the list of elements present in the YAML file.int
Get the version present in the YAML file.boolean
isValid()
Check that the file content is valid.
-
Method Details
-
getElements
List<? extends YamlElement> getElements()Get the list of elements present in the YAML file.- Returns:
- the list of elements
-
getVersion
int getVersion()Get the version present in the YAML file.- Returns:
- the version in the file
-
isValid
boolean isValid()Check that the file content is valid. It includes the check of duplicated elements (same identifier) and the check of each element.- Returns:
- true if all the checks are OK
-