Fix a/an typos (#3181)

* Typos a/an
* Fix typo generation in generateTagClasses.groovy

Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
Дилян Палаузов 2022-11-29 21:57:48 +02:00 committed by GitHub
parent d96e5d5bc0
commit e556fdf81b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
93 changed files with 116 additions and 114 deletions

View File

@ -323,7 +323,7 @@ public class CommunityMarketplaceAddonService extends AbstractRemoteAddonService
"posts_count", postsCount, //
"tags", tags.toArray(String[]::new));
// try to use an handler to determine if the add-on is installed
// try to use a handler to determine if the add-on is installed
boolean installed = addonHandlers.stream()
.anyMatch(handler -> handler.supports(type, contentType) && handler.isInstalled(id));

View File

@ -32,8 +32,8 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* This is an AudioStream from an URL. Note that some sinks, like Sonos, can directly handle URL
* based streams, and therefore can/should call getURL() to get an direct reference to the URL.
* This is an AudioStream from a URL. Note that some sinks, like Sonos, can directly handle URL
* based streams, and therefore can/should call getURL() to get a direct reference to the URL.
*
* @author Karel Goderis - Initial contribution
* @author Kai Kreuzer - Refactored to not require a source

View File

@ -116,7 +116,7 @@ public class AudioPlayer extends Thread {
}
/**
* Converts a org.openhab.core.audio.AudioFormat
* Converts an org.openhab.core.audio.AudioFormat
* to a javax.sound.sampled.AudioFormat
*
* @param audioFormat The AudioFormat to convert

View File

@ -16,7 +16,7 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.core.events.AbstractEvent;
/**
* This is an {@link Event} that is sent when a web client should play an audio stream from an url.
* This is an {@link Event} that is sent when a web client should play an audio stream from a url.
*
* @author Kai Kreuzer - Initial contribution and API
*/

View File

@ -26,7 +26,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* This is an ModuleHandler implementation for Actions that play a sound file from the file system.
* This is a ModuleHandler implementation for Actions that play a sound file from the file system.
*
* @author Kai Kreuzer - Initial contribution
* @author Christoph Weitkamp - Added parameter volume

View File

@ -23,7 +23,7 @@ import org.openhab.core.library.types.PercentType;
import org.openhab.core.voice.VoiceManager;
/**
* This is an ModuleHandler implementation for Actions that trigger a TTS output through "say".
* This is a ModuleHandler implementation for Actions that trigger a TTS output through "say".
*
* @author Kai Kreuzer - Initial contribution
* @author Christoph Weitkamp - Added parameter volume

View File

@ -35,7 +35,7 @@ import org.openhab.core.config.core.ConfigDescriptionParameter;
import org.openhab.core.config.core.Configuration;
/**
* convenience Rule class with an action handler. This allows to define Rules which have a execution block.
* convenience Rule class with an action handler. This allows to define Rules which have an execution block.
*
* @author Simon Merschjohann - Initial contribution
* @author Kai Kreuzer - made it implement Rule

View File

@ -19,7 +19,7 @@ import org.eclipse.jdt.annotation.Nullable;
import org.openhab.core.common.registry.RegistryChangeListener;
/**
* This class is responsible to provide a {@link RegistryChangeListener} logic. A instance of it is added to
* This class is responsible to provide a {@link RegistryChangeListener} logic. An instance of it is added to
* {@link RuleRegistry} service, to listen for changes when a single {@link Rule} has been added, updated, enabled,
* disabled or removed and to involve Rule Engine to process these changes. Also to send a {@code run} command
* for a single {@link Rule} to the Rule Engine.

View File

@ -28,7 +28,7 @@ public final class RuleExecution implements Comparable<RuleExecution> {
private final Rule rule;
/**
* Creates an new {@link RuleExecution}.
* Creates a new {@link RuleExecution}.
*
* @param date The time when the rule will be executed.
* @param rule The rule that will be executed.

View File

@ -21,7 +21,7 @@ import org.eclipse.jdt.annotation.Nullable;
import org.openhab.core.common.registry.RegistryChangeListener;
/**
* This class is responsible to provide a {@link RegistryChangeListener} logic. A instance of it is added to
* This class is responsible to provide a {@link RegistryChangeListener} logic. An instance of it is added to
* {@link RuleRegistry} service, to listen for changes when a single {@link Rule} has been added, updated, enabled,
* disabled or removed and to involve Rule Engine to process these changes. Also to send a {@code run} command
* for a single {@link Rule} to the Rule Engine.

View File

@ -17,7 +17,7 @@ import java.time.ZonedDateTime;
import org.eclipse.jdt.annotation.NonNullByDefault;
/**
* {@link ConditionHandler} that evaluates, if the current time satisfies an specified condition.
* {@link ConditionHandler} that evaluates, if the current time satisfies a specified condition.
*
* @author Sönke Küper - Initial contribution
*/

View File

@ -42,7 +42,7 @@ public final class Connection {
/**
* This constructor is responsible for creation of connections between modules in the rule.
*
* @param inputName is an unique id of the {@code Input} in scope of the {@link Module}.
* @param inputName is a unique id of the {@code Input} in scope of the {@link Module}.
* @param reference the reference tokens of this connection
*/
public Connection(String inputName, String reference) {
@ -52,9 +52,9 @@ public final class Connection {
/**
* This constructor is responsible for creation of connections between modules in the rule.
*
* @param inputName is an unique name of the {@code Input} in scope of the {@link Module}.
* @param outputModuleId is an unique id of the {@code Module} in scope of the {@link Rule}.
* @param outputName is an unique name of the {@code Output} in scope of the {@link Module}.
* @param inputName is a unique name of the {@code Input} in scope of the {@link Module}.
* @param outputModuleId is a unique id of the {@code Module} in scope of the {@link Rule}.
* @param outputName is a unique name of the {@code Output} in scope of the {@link Module}.
* @param reference the reference tokens of this connection
*/
public Connection(String inputName, @Nullable String outputModuleId, @Nullable String outputName,

View File

@ -52,7 +52,7 @@ final class RuleExecutionSimulator {
private final RuleEngineImpl ruleEngine;
/**
* Constructs an new {@link RuleExecutionSimulator}.
* Constructs a new {@link RuleExecutionSimulator}.
*/
public RuleExecutionSimulator(RuleRegistry ruleRegistry, RuleEngineImpl ruleEngine) {
this.ruleRegistry = ruleRegistry;

View File

@ -94,7 +94,7 @@ public class AutomationCommandImport extends AutomationCommand {
* This method serves to create an {@link URL} object or {@link File} object from a string that is passed as
* a parameter of the command. From the {@link File} object the URL is constructed.
*
* @param parameterValue is a string that is passed as parameter of the command and it supposed to be an URL
* @param parameterValue is a string that is passed as parameter of the command and it supposed to be a URL
* representation.
* @return an {@link URL} object created from the string that is passed as parameter of the command or <b>null</b>
* if either no legal protocol could be found in the specified string or the string could not be parsed.

View File

@ -89,7 +89,7 @@ public class AutomationCommandRemove extends AutomationCommand {
* This method serves to create an {@link URL} object or {@link File} object from a string that is passed as
* a parameter of the command. From the {@link File} object the URL is constructed.
*
* @param parameterValue is a string that is passed as parameter of the command and it supposed to be an URL
* @param parameterValue is a string that is passed as parameter of the command and it supposed to be a URL
* representation.
* @return an {@link URL} object created from the string that is passed as parameter of the command or <b>null</b>
* if either no legal protocol could be found in the specified string or the string could not be parsed.

View File

@ -34,7 +34,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* This is an ModuleHandler implementation for trigger channels with specific events
* This is a ModuleHandler implementation for trigger channels with specific events
*
* @author Stefan Triller - Initial contribution
*/

View File

@ -47,7 +47,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* This is an ModuleHandler implementation for Triggers which trigger the rule
* This is a ModuleHandler implementation for Triggers which trigger the rule
* based on a {@link org.openhab.core.library.types.DateTimeType} stored in an item
*
* @author Jan N. Klug - Initial contribution

View File

@ -27,7 +27,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* This is an ModuleHandler implementation for Triggers which trigger the rule
* This is a ModuleHandler implementation for Triggers which trigger the rule
* based on a cron expression. The cron expression can be set with the
* configuration.
*

View File

@ -23,7 +23,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* This is the implementation of a event condition which checks if inputs matches configured values.
* This is the implementation of an event condition which checks if inputs matches configured values.
*
* @author Benedikt Niehues - Initial contribution
* @author Kai Kreuzer - refactored and simplified customized module handling

View File

@ -33,9 +33,9 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* This is an ModuleHandler implementation for Triggers which trigger the rule
* This is a ModuleHandler implementation for Triggers which trigger the rule
* if an event occurs. The eventType, eventSource and topic can be set with the
* configuration. It is an generic approach which makes it easier to specify
* configuration. It is a generic approach which makes it easier to specify
* more concrete event based triggers with the composite module approach of the
* automation component. Each GenericTriggerHandler instance registers as
* EventSubscriber, so the dispose method must be called for unregistering the

View File

@ -38,7 +38,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* This is an ModuleHandler implementation for Triggers which trigger the rule
* This is a ModuleHandler implementation for Triggers which trigger the rule
* if a member of an item group receives a command.
* The group name and command value can be set with the configuration.
*

View File

@ -40,7 +40,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* This is an ModuleHandler implementation for Triggers which trigger the rule
* This is a ModuleHandler implementation for Triggers which trigger the rule
* if state event of a member of an item group occurs.
* The group name and state value can be set with the configuration.
*

View File

@ -38,7 +38,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* This is an ModuleHandler implementation for Triggers which trigger the rule
* This is a ModuleHandler implementation for Triggers which trigger the rule
* if an item receives a command. The eventType and command value can be set with the
* configuration.
*

View File

@ -40,7 +40,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* This is an ModuleHandler implementation for Triggers which trigger the rule
* This is a ModuleHandler implementation for Triggers which trigger the rule
* if an item state event occurs. The eventType and state value can be set with the
* configuration.
*

View File

@ -29,7 +29,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* This is an ModuleHandler implementation for Triggers which trigger the rule
* This is a ModuleHandler implementation for Triggers which trigger the rule
* at a specific time (format 'hh:mm').
*
* @author Kai Kreuzer - Initial contribution
@ -57,7 +57,7 @@ public class TimeOfDayTriggerHandler extends BaseTriggerModuleHandler
}
/**
* Creates an cron-Expression from the configured time.
* Creates a cron-Expression from the configured time.
*/
private static String buildExpressionFromConfigurationTime(String time) {
try {

View File

@ -135,7 +135,7 @@ public class Input {
/**
* Gets the name of Input. It must be unique in scope of the {@link Rule}.
*
* @return name is an unique identifier of the Input.
* @return name is a unique identifier of the Input.
*/
public String getName() {
return name;

View File

@ -30,7 +30,7 @@ import org.openhab.core.config.core.ConfigDescriptionParameter;
* defines the meta-information needed for creation of a {@link Module} instance which is a building block for a
* {@link Rule}. The meta-information describes the {@link Configuration} of a {@link Module} providing list with
* {@link ConfigDescriptionParameter}s, {@link Input}s and {@link Output}s of a {@link Module}. Each {@link ModuleType}
* instance owns an unique id which is used as reference in the {@link Module}s, to find their meta-information.
* instance owns a unique id which is used as reference in the {@link Module}s, to find their meta-information.
* <p>
* Whether the {@link ModuleType}s can be used by anyone, depends from their {@link Visibility} value, but they can be
* modified only by their creator.

View File

@ -34,7 +34,7 @@ public interface ModuleTypeRegistry extends Registry<ModuleType, String> {
/**
* Gets the localized {@link ModuleType} by specified UID and locale.
*
* @param moduleTypeUID the an unique id in scope of registered {@link ModuleType}s.
* @param moduleTypeUID the a unique id in scope of registered {@link ModuleType}s.
* @param locale used for localization of the {@link ModuleType}.
* @param <T> the type of the required object.
* @return the desired {@link ModuleType} instance or {@code null} if a module type with such UID does not exist or

View File

@ -46,7 +46,7 @@ import org.openhab.core.automation.Rule;
public class Output {
/**
* is an unique name of the {@code Output} in scope of the {@link Module}.
* is a unique name of the {@code Output} in scope of the {@link Module}.
*/
private String name;
@ -112,7 +112,7 @@ public class Output {
* @param name a unique name of the {@code Output}.
* @param type the type of the output data.
* @param label a single word description of the {@code Output}.
* @param description is an user friendly description of the {@code Output}.
* @param description is a user friendly description of the {@code Output}.
* @param tags are associated with the {@code Output}. The tags add additional restrictions to connections
* between {@link Input}s and {@link Output}s. The {@link Input}'s tags must be subset of the
* {@code Output}'s tags to succeed the connection.<br>
@ -147,7 +147,7 @@ public class Output {
* This method is used for getting the name of {@code Output}. It must be unique in
* scope of {@link Rule}.
*
* @return name is an unique identifier of the {@code Output}.
* @return name is a unique identifier of the {@code Output}.
*/
public String getName() {
return name;

View File

@ -324,7 +324,7 @@ public class ReferenceResolver {
* {@link SecurityManager#checkPackageAccess s.checkPackageAccess()} denies
* access to the package of this class</li>
* </ul>
* @throws ArrayIndexOutOfBoundsException if one of the tokens represent a invalid index in the list.
* @throws ArrayIndexOutOfBoundsException if one of the tokens represent an invalid index in the list.
* @throws NullPointerException if the path references something in a non existing map entry.
* @throws NumberFormatException if one of the tokens is accessing a list and the token that represent the
* index can't be converted to integer.

View File

@ -174,7 +174,7 @@ public class ConfigUtil {
* @param value the value to return as normalized type
* @param configDescriptionParameter the parameter that needs to be normalized
* @return corresponding value as a valid type
* @throws IllegalArgumentException if a invalid type has been given
* @throws IllegalArgumentException if an invalid type has been given
*/
public static Object normalizeType(Object value, @Nullable ConfigDescriptionParameter configDescriptionParameter) {
if (configDescriptionParameter != null) {

View File

@ -86,7 +86,7 @@ public interface DiscoveryResult {
/**
* Returns the representation property of this result object.
* <p>
* The representation property represents an unique human and/or machine readable identifier of the thing that was
* The representation property represents a unique human and/or machine readable identifier of the thing that was
* discovered. Its actual value can be retrieved from the {@link DiscoveryResult#getProperties()} map. Such unique
* identifiers are typically the <code>ipAddress</code>, the <code>macAddress</code> or the
* <code>serialNumber</code> of the discovered thing.

View File

@ -60,7 +60,7 @@ public interface DiscoveryServiceRegistry {
* Forces the associated {@link DiscoveryService}s to start a discovery for
* all thing types of the given binding id.
* <p>
* Returns {@code true}, if a at least one {@link DiscoveryService} could be found and forced to start a discovery,
* Returns {@code true}, if at least one {@link DiscoveryService} could be found and forced to start a discovery,
* otherwise {@code false}.
*
* @param bindingId the binding id pointing to one or more discovery services to

View File

@ -19,7 +19,7 @@ import org.openhab.core.thing.ThingTypeUID;
import org.openhab.core.thing.ThingUID;
/**
* The {@link DiscoveryResultDTOMapper} is an utility class to map discovery results into discovery result transfer
* The {@link DiscoveryResultDTOMapper} is a utility class to map discovery results into discovery result transfer
* objects.
*
* @author Stefan Bussweiler - Initial contribution

View File

@ -347,7 +347,7 @@ public class HttpUtil {
}
/**
* Download the image data from an URL.
* Download the image data from a URL.
*
* If content type is not found in the headers, the data is scanned to determine the content type.
*
@ -360,7 +360,7 @@ public class HttpUtil {
}
/**
* Download the image data from an URL.
* Download the image data from a URL.
*
* If content type is not found in the headers, the data is scanned to determine the content type.
*
@ -374,7 +374,7 @@ public class HttpUtil {
}
/**
* Download the image data from an URL.
* Download the image data from a URL.
*
* @param url the URL of the image to be downloaded
* @param scanTypeInContent true to allow the scan of data to determine the content type if not found in the headers
@ -388,7 +388,7 @@ public class HttpUtil {
}
/**
* Download the image data from an URL.
* Download the image data from a URL.
*
* @param url the URL of the image to be downloaded
* @param scanTypeInContent true to allow the scan of data to determine the content type if not found in the headers
@ -403,7 +403,7 @@ public class HttpUtil {
}
/**
* Download the data from an URL.
* Download the data from a URL.
*
* @param url the URL of the data to be downloaded
* @param contentTypeRegex the REGEX the content type must match; null to ignore the content type
@ -419,7 +419,7 @@ public class HttpUtil {
}
/**
* Download the data from an URL.
* Download the data from a URL.
*
* @param url the URL of the data to be downloaded
* @param contentTypeRegex the REGEX the content type must match; null to ignore the content type

View File

@ -377,7 +377,7 @@ public class TokenResource implements RESTResource {
throw new TokenEndpointException(ErrorType.INVALID_REQUEST);
}
// find an user associated with the provided refresh token
// find a user associated with the provided refresh token
Optional<User> refreshTokenUser = userRegistry.getAll().stream().filter(
u -> ((ManagedUser) u).getSessions().stream().anyMatch(s -> refreshToken.equals(s.getRefreshToken())))
.findAny();

View File

@ -26,7 +26,7 @@ import org.openhab.core.thing.dto.ThingDTOMapper;
import org.openhab.core.thing.firmware.dto.FirmwareStatusDTO;
/**
* The {@link EnrichedThingDTOMapper} is an utility class to map things into enriched thing data transfer objects
* The {@link EnrichedThingDTOMapper} is a utility class to map things into enriched thing data transfer objects
* (DTOs).
*
* @author Dennis Nobel - Initial contribution

View File

@ -195,7 +195,7 @@ public class SseResource implements RESTResource, SsePublisher {
}
/**
* Subscribes the connecting client for state updates. It will initially only send a "ready" event with an unique
* Subscribes the connecting client for state updates. It will initially only send a "ready" event with a unique
* connectionId that the client can use to dynamically alter the list of tracked items.
*
* @return {@link EventOutput} object associated with the incoming connection.

View File

@ -56,7 +56,7 @@ import io.swagger.v3.oas.models.security.SecurityScheme;
import io.swagger.v3.oas.models.servers.Server;
/**
* An endpoint to generate and provide a OpenAPI description.
* An endpoint to generate and provide an OpenAPI description.
*
* @author Markus Rathgeb - Initial contribution
* @author Kai Kreuzer - made it a RESTResource to register in the root bean
@ -93,7 +93,7 @@ public class OpenApiResource implements RESTResource {
/**
* Gets the current JAX-RS Whiteboard provided endpoint information by OpenAPI.
*
* @return a OpenAPI description of the endpoints
* @return an OpenAPI description of the endpoints
*/
@GET
@Produces(MediaType.APPLICATION_JSON)

View File

@ -16,7 +16,7 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
/**
* This is an data transfer object for a UI tile.
* This is a data transfer object for a UI tile.
*
* @author Yannick Schaus - Initial contribution
*/

View File

@ -151,7 +151,7 @@ public class UIResource implements RESTResource {
@Path("/components/{namespace}")
@Consumes(MediaType.APPLICATION_JSON)
@Produces({ MediaType.APPLICATION_JSON })
@Operation(operationId = "addUIComponentToNamespace", summary = "Add an UI component in the specified namespace.", security = {
@Operation(operationId = "addUIComponentToNamespace", summary = "Add a UI component in the specified namespace.", security = {
@SecurityRequirement(name = "oauth2", scopes = { "admin" }) }, responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = RootUIComponent.class))) })
public Response addComponent(@PathParam("namespace") String namespace, RootUIComponent component) {

View File

@ -183,7 +183,7 @@ public class JSONResponse {
}
/**
* An piped input stream that is marked to produce JSON string.
* A piped input stream that is marked to produce JSON string.
*
* @author Markus Rathgeb - Initial contribution
*/

View File

@ -15,7 +15,7 @@ package org.openhab.core.io.transport.mqtt;
import org.eclipse.jdt.annotation.NonNullByDefault;
/**
* Implement this to be notified of the success or error of a any method in {@link MqttBrokerConnection} that takes a
* Implement this to be notified of the success or error of any method in {@link MqttBrokerConnection} that takes a
* callback.
*
* @author David Graeff - Initial contribution

View File

@ -54,7 +54,7 @@ public class SerialPortIdentifierImpl implements SerialPortIdentifier {
return new SerialPortImpl((javax.comm.SerialPort) cp);
} else {
throw new IllegalStateException(
String.format("We expect an serial port instead of '%s'", cp.getClass()));
String.format("We expect a serial port instead of '%s'", cp.getClass()));
}
} catch (javax.comm.PortInUseException e) {
String message = e.getMessage();

View File

@ -55,7 +55,7 @@ public class SerialPortIdentifierImpl implements SerialPortIdentifier {
return new RxTxSerialPort((gnu.io.SerialPort) cp);
} else {
throw new IllegalStateException(
String.format("We expect an serial port instead of '%s'", cp.getClass()));
String.format("We expect a serial port instead of '%s'", cp.getClass()));
}
} catch (gnu.io.PortInUseException e) {
String message = e.getMessage();

View File

@ -26,7 +26,7 @@ import org.eclipse.jdt.annotation.Nullable;
@NonNullByDefault
public interface SerialPortManager {
/**
* Gets an serial port identifier for a given name.
* Gets a serial port identifier for a given name.
*
* @param name the name
* @return a serial port identifier or null

View File

@ -37,7 +37,7 @@ public interface UpnpIOParticipant {
/**
* Called when the UPNP IO service is unable to poll the UDN of the participant, given that
* a addStatusListener is registered.
* an addStatusListener is registered.
*
* @param status false, if the poll fails when the polling was previously successful; true if the poll succeeds
* when the polling was previously failing

View File

@ -76,7 +76,7 @@ public class Audio {
}
}
@ActionDoc(text = "plays an audio stream from an url to the default sink")
@ActionDoc(text = "plays an audio stream from a url to the default sink")
public static synchronized void playStream(
@ParamDoc(name = "url", text = "the url of the audio stream") String url) {
try {
@ -86,7 +86,7 @@ public class Audio {
}
}
@ActionDoc(text = "plays an audio stream from an url to the given sink(s)")
@ActionDoc(text = "plays an audio stream from a url to the given sink(s)")
public static synchronized void playStream(@ParamDoc(name = "sink", text = "the id of the sink") String sink,
@ParamDoc(name = "url", text = "the url of the audio stream") String url) {
try {

View File

@ -69,7 +69,7 @@ public class ScriptInterpreter extends XbaseInterpreter {
val value = context.getValue(QualifiedName.create(jvmField.simpleName))
value ?: {
// Looks like we have an state, command or item field
// Looks like we have a state, command or item field
val fieldName = jvmField.simpleName
fieldName.stateOrCommand ?: fieldName.item
}

View File

@ -69,6 +69,8 @@ def createTagSetClass(def line, String tagSet) {
def parent = line.Parent
def parentClass = parent ? parent : type
def pkg = type.toLowerCase()
def ch = label.toLowerCase().charAt(0)
def article = ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u' ? "an" : "a"
def file = new FileWriter("${baseDir}/src/main/java/org/openhab/core/semantics/model/${pkg}/${tag}.java")
file.write(header)
file.write("package org.openhab.core.semantics.model." + pkg + ";\n\n")
@ -79,7 +81,7 @@ def createTagSetClass(def line, String tagSet) {
file.write("""import org.openhab.core.semantics.TagInfo;
/**
* This class defines a ${label}.
* This class defines ${article} ${label}.
*
* @author Generated from generateTagClasses.groovy - Initial contribution
*/

View File

@ -16,7 +16,7 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
/**
* This is the super interface for all types that represent an Point.
* This is the super interface for all types that represent a Point.
* The interface describes the relations to other entity types.
*
* @author Kai Kreuzer - Initial contribution

View File

@ -151,7 +151,7 @@ public class SemanticTags {
* Determines the semantic {@link Point} type of an {@link Item}.
*
* @param item the Item to get the Point for
* @return a sub-type of a {@link Point}if the Item represents an Point, otherwise null
* @return a sub-type of a {@link Point}if the Item represents a Point, otherwise null
*/
@SuppressWarnings("unchecked")
public static @Nullable Class<? extends Point> getPoint(Item item) {

View File

@ -17,7 +17,7 @@ import org.openhab.core.semantics.Equipment;
import org.openhab.core.semantics.TagInfo;
/**
* This class defines a Alarm System.
* This class defines an Alarm System.
*
* @author Generated from generateTagClasses.groovy - Initial contribution
*/

View File

@ -16,7 +16,7 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.core.semantics.TagInfo;
/**
* This class defines a Inner Door.
* This class defines an Inner Door.
*
* @author Generated from generateTagClasses.groovy - Initial contribution
*/

View File

@ -17,7 +17,7 @@ import org.openhab.core.semantics.Equipment;
import org.openhab.core.semantics.TagInfo;
/**
* This class defines a Inverter.
* This class defines an Inverter.
*
* @author Generated from generateTagClasses.groovy - Initial contribution
*/

View File

@ -16,7 +16,7 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.core.semantics.TagInfo;
/**
* This class defines a Oven.
* This class defines an Oven.
*
* @author Generated from generateTagClasses.groovy - Initial contribution
*/

View File

@ -16,7 +16,7 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.core.semantics.TagInfo;
/**
* This class defines a Apartment.
* This class defines an Apartment.
*
* @author Generated from generateTagClasses.groovy - Initial contribution
*/

View File

@ -16,7 +16,7 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.core.semantics.TagInfo;
/**
* This class defines a Attic.
* This class defines an Attic.
*
* @author Generated from generateTagClasses.groovy - Initial contribution
*/

View File

@ -16,7 +16,7 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.core.semantics.TagInfo;
/**
* This class defines a Entry.
* This class defines an Entry.
*
* @author Generated from generateTagClasses.groovy - Initial contribution
*/

View File

@ -17,7 +17,7 @@ import org.openhab.core.semantics.Location;
import org.openhab.core.semantics.TagInfo;
/**
* This class defines a Indoor.
* This class defines an Indoor.
*
* @author Generated from generateTagClasses.groovy - Initial contribution
*/

View File

@ -16,7 +16,7 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.core.semantics.TagInfo;
/**
* This class defines a Office.
* This class defines an Office.
*
* @author Generated from generateTagClasses.groovy - Initial contribution
*/

View File

@ -17,7 +17,7 @@ import org.openhab.core.semantics.Location;
import org.openhab.core.semantics.TagInfo;
/**
* This class defines a Outdoor.
* This class defines an Outdoor.
*
* @author Generated from generateTagClasses.groovy - Initial contribution
*/

View File

@ -17,7 +17,7 @@ import org.openhab.core.semantics.Point;
import org.openhab.core.semantics.TagInfo;
/**
* This class defines a Alarm.
* This class defines an Alarm.
*
* @author Generated from generateTagClasses.groovy - Initial contribution
*/

View File

@ -16,7 +16,7 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.core.semantics.TagInfo;
/**
* This class defines a OpenLevel.
* This class defines an OpenLevel.
*
* @author Generated from generateTagClasses.groovy - Initial contribution
*/

View File

@ -16,7 +16,7 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.core.semantics.TagInfo;
/**
* This class defines a OpenState.
* This class defines an OpenState.
*
* @author Generated from generateTagClasses.groovy - Initial contribution
*/

View File

@ -17,7 +17,7 @@ import org.openhab.core.semantics.Property;
import org.openhab.core.semantics.TagInfo;
/**
* This class defines a Energy.
* This class defines an Energy.
*
* @author Generated from generateTagClasses.groovy - Initial contribution
*/

View File

@ -17,7 +17,7 @@ import org.openhab.core.semantics.Property;
import org.openhab.core.semantics.TagInfo;
/**
* This class defines a Oil.
* This class defines an Oil.
*
* @author Generated from generateTagClasses.groovy - Initial contribution
*/

View File

@ -17,7 +17,7 @@ import org.openhab.core.semantics.Property;
import org.openhab.core.semantics.TagInfo;
/**
* This class defines a Opening.
* This class defines an Opening.
*
* @author Generated from generateTagClasses.groovy - Initial contribution
*/

View File

@ -17,7 +17,7 @@ import org.openhab.core.semantics.Property;
import org.openhab.core.semantics.TagInfo;
/**
* This class defines a Ultraviolet.
* This class defines an Ultraviolet.
*
* @author Generated from generateTagClasses.groovy - Initial contribution
*/

View File

@ -42,7 +42,7 @@ thing-type.magic.magic-bridge2.description = The 2nd magic bridge
thing-type.magic.online-offline.label = Magic Online Offline
thing-type.magic.online-offline.description = An online/offline toggle thing
thing-type.magic.onoff-light.label = Magic Light - On/Off
thing-type.magic.onoff-light.description = A on/off light
thing-type.magic.onoff-light.description = An on/off light
thing-type.magic.player.label = Magic Player Thing
thing-type.magic.player.description = A media player
thing-type.magic.rollershutter.label = Magic Rollershutter Thing

View File

@ -24,7 +24,7 @@
<thing-type id="onoff-light" extensible="alert">
<label>Magic Light - On/Off</label>
<description>A on/off light</description>
<description>An on/off light</description>
<channels>
<channel id="switch" typeId="switch"/>

View File

@ -22,7 +22,7 @@ import org.openhab.core.thing.type.ChannelKind;
import org.openhab.core.thing.type.ChannelTypeUID;
/**
* The {@link ChannelDTOMapper} is an utility class to map channels into channel data transfer objects (DTOs).
* The {@link ChannelDTOMapper} is a utility class to map channels into channel data transfer objects (DTOs).
*
* @author Stefan Bußweiler - Initial contribution
* @author Kai Kreuzer - added DTO to channel mapping

View File

@ -19,7 +19,7 @@ import org.openhab.core.thing.type.BridgeType;
import org.openhab.core.thing.type.ThingType;
/**
* The {@link StrippedThingTypeDTOMapper} is an utility class to map things into stripped thing type data transfer
* The {@link StrippedThingTypeDTOMapper} is a utility class to map things into stripped thing type data transfer
* objects (DTOs).
*
* @author Miki Jankov - Initial contribution

View File

@ -28,7 +28,7 @@ import org.openhab.core.thing.binding.builder.ThingBuilder;
import org.openhab.core.thing.util.ThingHelper;
/**
* The {@link ThingDTOMapper} is an utility class to map things into data transfer objects (DTO).
* The {@link ThingDTOMapper} is a utility class to map things into data transfer objects (DTO).
*
* @author Stefan Bußweiler - Initial contribution
* @author Kai Kreuzer - Added DTO to Thing mapping

View File

@ -17,7 +17,7 @@ import org.openhab.core.thing.profiles.ProfileType;
import org.openhab.core.thing.profiles.TriggerProfileType;
/**
* The {@link ProfileTypeDTOMapper} is an utility class to map profile-types into profile-type data transfer
* The {@link ProfileTypeDTOMapper} is a utility class to map profile-types into profile-type data transfer
* objects (DTOs).
*
* @author Stefan Triller - Initial contribution

View File

@ -18,7 +18,7 @@ import java.util.List;
import java.util.Map;
/**
* An UIComponent represents a piece of UI element for a client frontend to render; it is kept very simple and delegates
* A UIComponent represents a piece of UI element for a client frontend to render; it is kept very simple and delegates
* the actual rendering and behavior to the frontend.
*
* It has a reference to a component's name as defined by the frontend, a map of configuration parameters, and several

View File

@ -504,7 +504,7 @@ public class ItemUIRegistryImpl implements ItemUIRegistry {
}
/**
* Takes the given <code>formatPattern</code> and replaces it with a analog
* Takes the given <code>formatPattern</code> and replaces it with an analog
* String-based pattern to replace all value Occurrences with a dash ("-")
*
* @param formatPattern the original pattern which will be replaces by a

View File

@ -16,7 +16,7 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
/**
* A tile can be registered by an UI as a service in order to appear on the main openHAB UI.
* A tile can be registered by a UI as a service in order to appear on the main openHAB UI.
*
* @author Kai Kreuzer - initial contribution
* @author Yannick Schaus - refactored into core, remove references to dashboard

View File

@ -15,7 +15,7 @@ package org.openhab.core.voice;
import org.eclipse.jdt.annotation.NonNullByDefault;
/**
* An handle to a {@link KSService}
* A handle to a {@link KSService}
*
* @author Kelly Davis - Initial contribution
*/

View File

@ -15,7 +15,7 @@ package org.openhab.core.voice;
import org.eclipse.jdt.annotation.NonNullByDefault;
/**
* An handle to a {@link STTService}
* A handle to a {@link STTService}
*
* @author Kelly Davis - Initial contribution
*/

View File

@ -71,7 +71,7 @@ import org.slf4j.LoggerFactory;
* This service provides functionality around voice services and is the central service to be used directly by others.
*
* @author Kai Kreuzer - Initial contribution
* @author Yannick Schaus - Added ability to provide a item for feedback during listening phases
* @author Yannick Schaus - Added ability to provide an item for feedback during listening phases
* @author Christoph Weitkamp - Added getSupportedStreams() and UnsupportedAudioStreamException
* @author Christoph Weitkamp - Added parameter to adjust the volume
* @author Wouter Born - Sort TTS options

View File

@ -22,7 +22,7 @@ import org.eclipse.jdt.annotation.Nullable;
/**
* Classes implementing this interface can be registered as an OSGi service in order to provide functionality for
* managing add-ons, such as listing, installing and uninstalling them.
* The REST API offers an uri that exposes this functionality.
* The REST API offers a uri that exposes this functionality.
*
* @author Kai Kreuzer - Initial contribution
* @author Yannick Schaus - Add id, name and refreshSource

View File

@ -16,9 +16,9 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
/**
* The pending information used in a OAuth2 authorization flow, set after the user has authorized the client to access
* The pending information used in an OAuth2 authorization flow, set after the user has authorized the client to access
* resources, and has been redirected to the callback URI with an authorization code. The information will be used when
* it calls the token endpoint to exchange the authorization code for a access token and a refresh token.
* it calls the token endpoint to exchange the authorization code for an access token and a refresh token.
*
* The authorization code for a token is sensible information while it is valid, therefore the client is supposed to
* call the token endpoint to perform the exchange it immediately after receiving it. The information should remain in

View File

@ -16,7 +16,7 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.core.common.registry.Provider;
/**
* A interface for a {@link Provider} of {@link User} entities
* An interface for a {@link Provider} of {@link User} entities
*
* @author Yannick Schaus - initial contribution
*

View File

@ -37,7 +37,7 @@ public class UserSession {
/**
* Constructs a new session.
*
* @param sessionId an unique ID for the session
* @param sessionId a unique ID for the session
* @param refreshToken the refresh token associated to the session
* @param clientId the client ID associated to the session
* @param redirectUri the callback URI provided when the client was authorized by the user

View File

@ -20,7 +20,7 @@ import org.eclipse.jdt.annotation.Nullable;
import com.google.gson.JsonDeserializer;
/**
* This is the service factory to produce a OAuth2 service client that authenticates using OAUTH2.
* This is the service factory to produce an OAuth2 service client that authenticates using OAUTH2.
* This is a service factory pattern; the OAuthe2 service client is not shared between bundles.
*
* <p>
@ -104,7 +104,7 @@ public interface OAuthClientService extends AutoCloseable {
* If the state is null, a random UUID will be generated and added state=<random UUID>,
* the state will be assigned to the requestParams in this case.
* @return An authorization URL during the Authorization Code Grant with http request parameters filled in.
* e.g Produces an URL string like this:
* e.g Produces a URL string like this:
* https://oauth.provider?response_type=code&client_id=myClientId&redirect_uri=redirectURI&scope=myScope&state=mySecureRandomState
* @throws OAuthException if authorizationUrl or clientId were not previously provided (null)
*/

View File

@ -51,7 +51,7 @@ public abstract class AbstractUID {
}
/**
* Creates a AbstractUID for a list of segments.
* Creates an AbstractUID for a list of segments.
*
* @param segments the id segments
*/

View File

@ -27,7 +27,7 @@ import org.openhab.core.items.ItemUtil;
import org.openhab.core.types.State;
/**
* The {@link ItemDTOMapper} is an utility class to map items into item data transfer objects (DTOs).
* The {@link ItemDTOMapper} is a utility class to map items into item data transfer objects (DTOs).
*
* @author Kai Kreuzer - Initial contribution
* @author Stefan Bußweiler - Moved to core and renamed class to DTO mapper

View File

@ -17,7 +17,7 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
/**
* There are situations when item states do not have any defined value.
* This might be because they have not been initialized yet (never
* received an state update so far) or because their state is ambiguous
* received a state update so far) or because their state is ambiguous
* (e.g. a dimmed light that is treated as a switch (ON/OFF) will have
* an undefined state if it is dimmed to 50%).
*

View File

@ -25,7 +25,7 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
public class UIDUtils {
/**
* Encodes a given string to an UID using only allowed characters.
* Encodes a given string to a UID using only allowed characters.
*
* <p>
* The generated UID can be given to the {@link #decode(String)} function and it will result into the given value.
@ -58,7 +58,7 @@ public class UIDUtils {
}
/**
* Decodes an UID that has been generated by the {@link #encode(String)} function.
* Decodes a UID that has been generated by the {@link #encode(String)} function.
*
* <p>
* This function should only be used for UIDs generated by the {@link #encode(String)} function. For every other UID

View File

@ -99,7 +99,7 @@ public class SchedulerImplTest extends JavaTest {
@Timeout(value = 15, unit = TimeUnit.SECONDS)
public void testAfterResolvedWithException() throws InterruptedException {
Callable<Void> callable = () -> {
// Pass a exception not very likely thrown by the scheduler it self to avoid missing real exceptions.
// Pass an exception not very likely thrown by the scheduler it self to avoid missing real exceptions.
throw new FileNotFoundException("testBeforeTimeoutException");
};
ScheduledCompletableFuture<Void> after = scheduler.after(callable, Duration.ofMillis(100));

View File

@ -177,7 +177,7 @@ public class RuleSimulationTest extends JavaOSGiTest {
}
/**
* creates a rule with an cron expression trigger, that fires Wednesday and Friday at 10:30. Has one
* creates a rule with a cron expression trigger, that fires Wednesday and Friday at 10:30. Has one
* condition that it should only run between 8:00 and 11:00.
*/
private static Rule createRuleWithCronExpressionTrigger() {
@ -206,7 +206,7 @@ public class RuleSimulationTest extends JavaOSGiTest {
}
/**
* creates a rule with an day of time trigger at 16:00, that has an side condition to fire only
* creates a rule with a day of time trigger at 16:00, that has a side condition to fire only
* on Monday and Wednesday.
*/
private static Rule createRuleWithTimeOfDayTrigger() {
@ -234,7 +234,7 @@ public class RuleSimulationTest extends JavaOSGiTest {
}
/**
* creates a rule with an day of time trigger at 10:00, that has an side condition to fire only
* creates a rule with a day of time trigger at 10:00, that has a side condition to fire only
* on the weekend.
*/
private static Rule createRuleWithEphemerisCondition() {

View File

@ -1004,7 +1004,7 @@ public class ConfigDispatcherOSGiTest extends JavaOSGiTest {
* If a property is not present in the configuration's properties,
* configuration.getProperties().get(property) should return null.
*
* Sending events, related to modification of file, is a OS specific action.
* Sending events, related to modification of file, is an OS specific action.
* So when we check if a configuration is updated, we use separate waitForAssert-s
* in order to be sure that the events are processed before the assertion.
*/
@ -1025,7 +1025,7 @@ public class ConfigDispatcherOSGiTest extends JavaOSGiTest {
* If a property is not present in the configuration's properties,
* configuration.getProperties().get(property) should return null.
*
* Sending events, related to modification of file, is a OS specific action.
* Sending events, related to modification of file, is an OS specific action.
* So when we check if a configuration is updated, we use separate waitForAssert-s
* in order to be sure that the events are processed before the assertion.
*/