text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.appcontainers.implementation;

import com.azure.core.annotation.ExpectedResponses;
import com.azure.core.annotation.Get;
import com.azure.core.annotation.HeaderParam;
import com.azure.core.annotation.Headers;
import com.azure.core.annotation.Host;
import com.azure.core.annotation.HostParam;
import com.azure.core.annotation.PathParam;
import com.azure.core.annotation.Post;
import com.azure.core.annotation.QueryParam;
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceInterface;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.annotation.UnexpectedResponseExceptionType;
import com.azure.core.http.rest.PagedFlux;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.PagedResponse;
import com.azure.core.http.rest.PagedResponseBase;
import com.azure.core.http.rest.Response;
import com.azure.core.http.rest.RestProxy;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsRevisionsClient;
import com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner;
import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException;
import com.azure.resourcemanager.appcontainers.models.RevisionCollection;
import reactor.core.publisher.Mono;

/** An instance of this class provides access to all the operations defined in ContainerAppsRevisionsClient. */
public final class ContainerAppsRevisionsClientImpl implements ContainerAppsRevisionsClient {
    /** The proxy service used to perform REST calls. */
    private final ContainerAppsRevisionsService service;

    /** The service client containing this operation class. */
    private final ContainerAppsApiClientImpl client;

    /**
     * Initializes an instance of ContainerAppsRevisionsClientImpl.
     *
     * @param client the instance of the service client containing this operation class.
     */
    ContainerAppsRevisionsClientImpl(ContainerAppsApiClientImpl client) {
        this.service =
            RestProxy
                .create(ContainerAppsRevisionsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
        this.client = client;
    }

    /**
     * The interface defining all the services for ContainerAppsApiClientContainerAppsRevisions to be used by the proxy
     * service to perform REST calls.
     */
    @Host("{$host}")
    @ServiceInterface(name = "ContainerAppsApiClie")
    private interface ContainerAppsRevisionsService {
        @Headers({"Content-Type: application/json"})
        @Get(
            "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps"
                + "/{containerAppName}/revisions")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class)
        Mono<Response<RevisionCollection>> listRevisions(
            @HostParam("$host") String endpoint,
            @PathParam("subscriptionId") String subscriptionId,
            @PathParam("resourceGroupName") String resourceGroupName,
            @PathParam("containerAppName") String containerAppName,
            @QueryParam("api-version") String apiVersion,
            @QueryParam("$filter") String filter,
            @HeaderParam("Accept") String accept,
            Context context);

        @Headers({"Content-Type: application/json"})
        @Get(
            "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps"
                + "/{containerAppName}/revisions/{revisionName}")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class)
        Mono<Response<RevisionInner>> getRevision(
            @HostParam("$host") String endpoint,
            @PathParam("subscriptionId") String subscriptionId,
            @PathParam("resourceGroupName") String resourceGroupName,
            @PathParam("containerAppName") String containerAppName,
            @PathParam("revisionName") String revisionName,
            @QueryParam("api-version") String apiVersion,
            @HeaderParam("Accept") String accept,
            Context context);

        @Headers({"Content-Type: application/json"})
        @Post(
            "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps"
                + "/{containerAppName}/revisions/{revisionName}/activate")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class)
        Mono<Response<Void>> activateRevision(
            @HostParam("$host") String endpoint,
            @PathParam("subscriptionId") String subscriptionId,
            @PathParam("resourceGroupName") String resourceGroupName,
            @PathParam("containerAppName") String containerAppName,
            @PathParam("revisionName") String revisionName,
            @QueryParam("api-version") String apiVersion,
            @HeaderParam("Accept") String accept,
            Context context);

        @Headers({"Content-Type: application/json"})
        @Post(
            "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps"
                + "/{containerAppName}/revisions/{revisionName}/deactivate")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class)
        Mono<Response<Void>> deactivateRevision(
            @HostParam("$host") String endpoint,
            @PathParam("subscriptionId") String subscriptionId,
            @PathParam("resourceGroupName") String resourceGroupName,
            @PathParam("containerAppName") String containerAppName,
            @PathParam("revisionName") String revisionName,
            @QueryParam("api-version") String apiVersion,
            @HeaderParam("Accept") String accept,
            Context context);

        @Headers({"Content-Type: application/json"})
        @Post(
            "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps"
                + "/{containerAppName}/revisions/{revisionName}/restart")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class)
        Mono<Response<Void>> restartRevision(
            @HostParam("$host") String endpoint,
            @PathParam("subscriptionId") String subscriptionId,
            @PathParam("resourceGroupName") String resourceGroupName,
            @PathParam("containerAppName") String containerAppName,
            @PathParam("revisionName") String revisionName,
            @QueryParam("api-version") String apiVersion,
            @HeaderParam("Accept") String accept,
            Context context);

        @Headers({"Content-Type: application/json"})
        @Get("{nextLink}")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class)
        Mono<Response<RevisionCollection>> listRevisionsNext(
            @PathParam(value = "nextLink", encoded = true) String nextLink,
            @HostParam("$host") String endpoint,
            @HeaderParam("Accept") String accept,
            Context context);
    }

    /**
     * Get the Revisions for a given Container App.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param containerAppName Name of the Container App for which Revisions are needed.
     * @param filter The filter to apply on the operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the Revisions for a given Container App along with {@link PagedResponse} on successful completion of
     *     {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<PagedResponse<RevisionInner>> listRevisionsSinglePageAsync(
        String resourceGroupName, String containerAppName, String filter) {
        if (this.client.getEndpoint() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getEndpoint() is required and cannot be null."));
        }
        if (this.client.getSubscriptionId() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getSubscriptionId() is required and cannot be null."));
        }
        if (resourceGroupName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
        }
        if (containerAppName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null."));
        }
        final String accept = "application/json";
        return FluxUtil
            .withContext(
                context ->
                    service
                        .listRevisions(
                            this.client.getEndpoint(),
                            this.client.getSubscriptionId(),
                            resourceGroupName,
                            containerAppName,
                            this.client.getApiVersion(),
                            filter,
                            accept,
                            context))
            .<PagedResponse<RevisionInner>>map(
                res ->
                    new PagedResponseBase<>(
                        res.getRequest(),
                        res.getStatusCode(),
                        res.getHeaders(),
                        res.getValue().value(),
                        res.getValue().nextLink(),
                        null))
            .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
    }

    /**
     * Get the Revisions for a given Container App.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param containerAppName Name of the Container App for which Revisions are needed.
     * @param filter The filter to apply on the operation.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the Revisions for a given Container App along with {@link PagedResponse} on successful completion of
     *     {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<PagedResponse<RevisionInner>> listRevisionsSinglePageAsync(
        String resourceGroupName, String containerAppName, String filter, Context context) {
        if (this.client.getEndpoint() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getEndpoint() is required and cannot be null."));
        }
        if (this.client.getSubscriptionId() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getSubscriptionId() is required and cannot be null."));
        }
        if (resourceGroupName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
        }
        if (containerAppName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null."));
        }
        final String accept = "application/json";
        context = this.client.mergeContext(context);
        return service
            .listRevisions(
                this.client.getEndpoint(),
                this.client.getSubscriptionId(),
                resourceGroupName,
                containerAppName,
                this.client.getApiVersion(),
                filter,
                accept,
                context)
            .map(
                res ->
                    new PagedResponseBase<>(
                        res.getRequest(),
                        res.getStatusCode(),
                        res.getHeaders(),
                        res.getValue().value(),
                        res.getValue().nextLink(),
                        null));
    }

    /**
     * Get the Revisions for a given Container App.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param containerAppName Name of the Container App for which Revisions are needed.
     * @param filter The filter to apply on the operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the Revisions for a given Container App as paginated response with {@link PagedFlux}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    private PagedFlux<RevisionInner> listRevisionsAsync(
        String resourceGroupName, String containerAppName, String filter) {
        return new PagedFlux<>(
            () -> listRevisionsSinglePageAsync(resourceGroupName, containerAppName, filter),
            nextLink -> listRevisionsNextSinglePageAsync(nextLink));
    }

    /**
     * Get the Revisions for a given Container App.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param containerAppName Name of the Container App for which Revisions are needed.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the Revisions for a given Container App as paginated response with {@link PagedFlux}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    private PagedFlux<RevisionInner> listRevisionsAsync(String resourceGroupName, String containerAppName) {
        final String filter = null;
        return new PagedFlux<>(
            () -> listRevisionsSinglePageAsync(resourceGroupName, containerAppName, filter),
            nextLink -> listRevisionsNextSinglePageAsync(nextLink));
    }

    /**
     * Get the Revisions for a given Container App.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param containerAppName Name of the Container App for which Revisions are needed.
     * @param filter The filter to apply on the operation.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the Revisions for a given Container App as paginated response with {@link PagedFlux}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    private PagedFlux<RevisionInner> listRevisionsAsync(
        String resourceGroupName, String containerAppName, String filter, Context context) {
        return new PagedFlux<>(
            () -> listRevisionsSinglePageAsync(resourceGroupName, containerAppName, filter, context),
            nextLink -> listRevisionsNextSinglePageAsync(nextLink, context));
    }

    /**
     * Get the Revisions for a given Container App.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param containerAppName Name of the Container App for which Revisions are needed.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the Revisions for a given Container App as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    public PagedIterable<RevisionInner> listRevisions(String resourceGroupName, String containerAppName) {
        final String filter = null;
        return new PagedIterable<>(listRevisionsAsync(resourceGroupName, containerAppName, filter));
    }

    /**
     * Get the Revisions for a given Container App.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param containerAppName Name of the Container App for which Revisions are needed.
     * @param filter The filter to apply on the operation.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the Revisions for a given Container App as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    public PagedIterable<RevisionInner> listRevisions(
        String resourceGroupName, String containerAppName, String filter, Context context) {
        return new PagedIterable<>(listRevisionsAsync(resourceGroupName, containerAppName, filter, context));
    }

    /**
     * Get a revision of a Container App.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param containerAppName Name of the Container App.
     * @param revisionName Name of the Container App Revision.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return a revision of a Container App along with {@link Response} on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<Response<RevisionInner>> getRevisionWithResponseAsync(
        String resourceGroupName, String containerAppName, String revisionName) {
        if (this.client.getEndpoint() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getEndpoint() is required and cannot be null."));
        }
        if (this.client.getSubscriptionId() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getSubscriptionId() is required and cannot be null."));
        }
        if (resourceGroupName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
        }
        if (containerAppName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null."));
        }
        if (revisionName == null) {
            return Mono.error(new IllegalArgumentException("Parameter revisionName is required and cannot be null."));
        }
        final String accept = "application/json";
        return FluxUtil
            .withContext(
                context ->
                    service
                        .getRevision(
                            this.client.getEndpoint(),
                            this.client.getSubscriptionId(),
                            resourceGroupName,
                            containerAppName,
                            revisionName,
                            this.client.getApiVersion(),
                            accept,
                            context))
            .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
    }

    /**
     * Get a revision of a Container App.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param containerAppName Name of the Container App.
     * @param revisionName Name of the Container App Revision.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return a revision of a Container App along with {@link Response} on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<Response<RevisionInner>> getRevisionWithResponseAsync(
        String resourceGroupName, String containerAppName, String revisionName, Context context) {
        if (this.client.getEndpoint() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getEndpoint() is required and cannot be null."));
        }
        if (this.client.getSubscriptionId() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getSubscriptionId() is required and cannot be null."));
        }
        if (resourceGroupName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
        }
        if (containerAppName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null."));
        }
        if (revisionName == null) {
            return Mono.error(new IllegalArgumentException("Parameter revisionName is required and cannot be null."));
        }
        final String accept = "application/json";
        context = this.client.mergeContext(context);
        return service
            .getRevision(
                this.client.getEndpoint(),
                this.client.getSubscriptionId(),
                resourceGroupName,
                containerAppName,
                revisionName,
                this.client.getApiVersion(),
                accept,
                context);
    }

    /**
     * Get a revision of a Container App.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param containerAppName Name of the Container App.
     * @param revisionName Name of the Container App Revision.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return a revision of a Container App on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<RevisionInner> getRevisionAsync(
        String resourceGroupName, String containerAppName, String revisionName) {
        return getRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName)
            .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * Get a revision of a Container App.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param containerAppName Name of the Container App.
     * @param revisionName Name of the Container App Revision.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return a revision of a Container App along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<RevisionInner> getRevisionWithResponse(
        String resourceGroupName, String containerAppName, String revisionName, Context context) {
        return getRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName, context).block();
    }

    /**
     * Get a revision of a Container App.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param containerAppName Name of the Container App.
     * @param revisionName Name of the Container App Revision.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return a revision of a Container App.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public RevisionInner getRevision(String resourceGroupName, String containerAppName, String revisionName) {
        return getRevisionWithResponse(resourceGroupName, containerAppName, revisionName, Context.NONE).getValue();
    }

    /**
     * Activates a revision for a Container App.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param containerAppName Name of the Container App.
     * @param revisionName Name of the Container App Revision.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link Response} on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<Response<Void>> activateRevisionWithResponseAsync(
        String resourceGroupName, String containerAppName, String revisionName) {
        if (this.client.getEndpoint() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getEndpoint() is required and cannot be null."));
        }
        if (this.client.getSubscriptionId() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getSubscriptionId() is required and cannot be null."));
        }
        if (resourceGroupName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
        }
        if (containerAppName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null."));
        }
        if (revisionName == null) {
            return Mono.error(new IllegalArgumentException("Parameter revisionName is required and cannot be null."));
        }
        final String accept = "application/json";
        return FluxUtil
            .withContext(
                context ->
                    service
                        .activateRevision(
                            this.client.getEndpoint(),
                            this.client.getSubscriptionId(),
                            resourceGroupName,
                            containerAppName,
                            revisionName,
                            this.client.getApiVersion(),
                            accept,
                            context))
            .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
    }

    /**
     * Activates a revision for a Container App.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param containerAppName Name of the Container App.
     * @param revisionName Name of the Container App Revision.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link Response} on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<Response<Void>> activateRevisionWithResponseAsync(
        String resourceGroupName, String containerAppName, String revisionName, Context context) {
        if (this.client.getEndpoint() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getEndpoint() is required and cannot be null."));
        }
        if (this.client.getSubscriptionId() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getSubscriptionId() is required and cannot be null."));
        }
        if (resourceGroupName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
        }
        if (containerAppName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null."));
        }
        if (revisionName == null) {
            return Mono.error(new IllegalArgumentException("Parameter revisionName is required and cannot be null."));
        }
        final String accept = "application/json";
        context = this.client.mergeContext(context);
        return service
            .activateRevision(
                this.client.getEndpoint(),
                this.client.getSubscriptionId(),
                resourceGroupName,
                containerAppName,
                revisionName,
                this.client.getApiVersion(),
                accept,
                context);
    }

    /**
     * Activates a revision for a Container App.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param containerAppName Name of the Container App.
     * @param revisionName Name of the Container App Revision.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return A {@link Mono} that completes when a successful response is received.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<Void> activateRevisionAsync(String resourceGroupName, String containerAppName, String revisionName) {
        return activateRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName)
            .flatMap(ignored -> Mono.empty());
    }

    /**
     * Activates a revision for a Container App.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param containerAppName Name of the Container App.
     * @param revisionName Name of the Container App Revision.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<Void> activateRevisionWithResponse(
        String resourceGroupName, String containerAppName, String revisionName, Context context) {
        return activateRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName, context).block();
    }

    /**
     * Activates a revision for a Container App.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param containerAppName Name of the Container App.
     * @param revisionName Name of the Container App Revision.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public void activateRevision(String resourceGroupName, String containerAppName, String revisionName) {
        activateRevisionWithResponse(resourceGroupName, containerAppName, revisionName, Context.NONE);
    }

    /**
     * Deactivates a revision for a Container App.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param containerAppName Name of the Container App.
     * @param revisionName Name of the Container App Revision.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link Response} on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<Response<Void>> deactivateRevisionWithResponseAsync(
        String resourceGroupName, String containerAppName, String revisionName) {
        if (this.client.getEndpoint() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getEndpoint() is required and cannot be null."));
        }
        if (this.client.getSubscriptionId() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getSubscriptionId() is required and cannot be null."));
        }
        if (resourceGroupName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
        }
        if (containerAppName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null."));
        }
        if (revisionName == null) {
            return Mono.error(new IllegalArgumentException("Parameter revisionName is required and cannot be null."));
        }
        final String accept = "application/json";
        return FluxUtil
            .withContext(
                context ->
                    service
                        .deactivateRevision(
                            this.client.getEndpoint(),
                            this.client.getSubscriptionId(),
                            resourceGroupName,
                            containerAppName,
                            revisionName,
                            this.client.getApiVersion(),
                            accept,
                            context))
            .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
    }

    /**
     * Deactivates a revision for a Container App.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param containerAppName Name of the Container App.
     * @param revisionName Name of the Container App Revision.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link Response} on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<Response<Void>> deactivateRevisionWithResponseAsync(
        String resourceGroupName, String containerAppName, String revisionName, Context context) {
        if (this.client.getEndpoint() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getEndpoint() is required and cannot be null."));
        }
        if (this.client.getSubscriptionId() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getSubscriptionId() is required and cannot be null."));
        }
        if (resourceGroupName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
        }
        if (containerAppName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null."));
        }
        if (revisionName == null) {
            return Mono.error(new IllegalArgumentException("Parameter revisionName is required and cannot be null."));
        }
        final String accept = "application/json";
        context = this.client.mergeContext(context);
        return service
            .deactivateRevision(
                this.client.getEndpoint(),
                this.client.getSubscriptionId(),
                resourceGroupName,
                containerAppName,
                revisionName,
                this.client.getApiVersion(),
                accept,
                context);
    }

    /**
     * Deactivates a revision for a Container App.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param containerAppName Name of the Container App.
     * @param revisionName Name of the Container App Revision.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return A {@link Mono} that completes when a successful response is received.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<Void> deactivateRevisionAsync(String resourceGroupName, String containerAppName, String revisionName) {
        return deactivateRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName)
            .flatMap(ignored -> Mono.empty());
    }

    /**
     * Deactivates a revision for a Container App.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param containerAppName Name of the Container App.
     * @param revisionName Name of the Container App Revision.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<Void> deactivateRevisionWithResponse(
        String resourceGroupName, String containerAppName, String revisionName, Context context) {
        return deactivateRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName, context).block();
    }

    /**
     * Deactivates a revision for a Container App.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param containerAppName Name of the Container App.
     * @param revisionName Name of the Container App Revision.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public void deactivateRevision(String resourceGroupName, String containerAppName, String revisionName) {
        deactivateRevisionWithResponse(resourceGroupName, containerAppName, revisionName, Context.NONE);
    }

    /**
     * Restarts a revision for a Container App.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param containerAppName Name of the Container App.
     * @param revisionName Name of the Container App Revision.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link Response} on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<Response<Void>> restartRevisionWithResponseAsync(
        String resourceGroupName, String containerAppName, String revisionName) {
        if (this.client.getEndpoint() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getEndpoint() is required and cannot be null."));
        }
        if (this.client.getSubscriptionId() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getSubscriptionId() is required and cannot be null."));
        }
        if (resourceGroupName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
        }
        if (containerAppName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null."));
        }
        if (revisionName == null) {
            return Mono.error(new IllegalArgumentException("Parameter revisionName is required and cannot be null."));
        }
        final String accept = "application/json";
        return FluxUtil
            .withContext(
                context ->
                    service
                        .restartRevision(
                            this.client.getEndpoint(),
                            this.client.getSubscriptionId(),
                            resourceGroupName,
                            containerAppName,
                            revisionName,
                            this.client.getApiVersion(),
                            accept,
                            context))
            .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
    }

    /**
     * Restarts a revision for a Container App.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param containerAppName Name of the Container App.
     * @param revisionName Name of the Container App Revision.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link Response} on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<Response<Void>> restartRevisionWithResponseAsync(
        String resourceGroupName, String containerAppName, String revisionName, Context context) {
        if (this.client.getEndpoint() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getEndpoint() is required and cannot be null."));
        }
        if (this.client.getSubscriptionId() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getSubscriptionId() is required and cannot be null."));
        }
        if (resourceGroupName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
        }
        if (containerAppName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null."));
        }
        if (revisionName == null) {
            return Mono.error(new IllegalArgumentException("Parameter revisionName is required and cannot be null."));
        }
        final String accept = "application/json";
        context = this.client.mergeContext(context);
        return service
            .restartRevision(
                this.client.getEndpoint(),
                this.client.getSubscriptionId(),
                resourceGroupName,
                containerAppName,
                revisionName,
                this.client.getApiVersion(),
                accept,
                context);
    }

    /**
     * Restarts a revision for a Container App.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param containerAppName Name of the Container App.
     * @param revisionName Name of the Container App Revision.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return A {@link Mono} that completes when a successful response is received.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<Void> restartRevisionAsync(String resourceGroupName, String containerAppName, String revisionName) {
        return restartRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName)
            .flatMap(ignored -> Mono.empty());
    }

    /**
     * Restarts a revision for a Container App.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param containerAppName Name of the Container App.
     * @param revisionName Name of the Container App Revision.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<Void> restartRevisionWithResponse(
        String resourceGroupName, String containerAppName, String revisionName, Context context) {
        return restartRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName, context).block();
    }

    /**
     * Restarts a revision for a Container App.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param containerAppName Name of the Container App.
     * @param revisionName Name of the Container App Revision.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public void restartRevision(String resourceGroupName, String containerAppName, String revisionName) {
        restartRevisionWithResponse(resourceGroupName, containerAppName, revisionName, Context.NONE);
    }

    /**
     * Get the next page of items.
     *
     * @param nextLink The URL to get the next list of items
     *     <p>The nextLink parameter.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return container App Revisions collection ARM resource along with {@link PagedResponse} on successful completion
     *     of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<PagedResponse<RevisionInner>> listRevisionsNextSinglePageAsync(String nextLink) {
        if (nextLink == null) {
            return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
        }
        if (this.client.getEndpoint() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getEndpoint() is required and cannot be null."));
        }
        final String accept = "application/json";
        return FluxUtil
            .withContext(context -> service.listRevisionsNext(nextLink, this.client.getEndpoint(), accept, context))
            .<PagedResponse<RevisionInner>>map(
                res ->
                    new PagedResponseBase<>(
                        res.getRequest(),
                        res.getStatusCode(),
                        res.getHeaders(),
                        res.getValue().value(),
                        res.getValue().nextLink(),
                        null))
            .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
    }

    /**
     * Get the next page of items.
     *
     * @param nextLink The URL to get the next list of items
     *     <p>The nextLink parameter.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return container App Revisions collection ARM resource along with {@link PagedResponse} on successful completion
     *     of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<PagedResponse<RevisionInner>> listRevisionsNextSinglePageAsync(String nextLink, Context context) {
        if (nextLink == null) {
            return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
        }
        if (this.client.getEndpoint() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getEndpoint() is required and cannot be null."));
        }
        final String accept = "application/json";
        context = this.client.mergeContext(context);
        return service
            .listRevisionsNext(nextLink, this.client.getEndpoint(), accept, context)
            .map(
                res ->
                    new PagedResponseBase<>(
                        res.getRequest(),
                        res.getStatusCode(),
                        res.getHeaders(),
                        res.getValue().value(),
                        res.getValue().nextLink(),
                        null));
    }
}


text:
import ReactDOM from "react-dom"
import { App } from "desktop/apps/article/components/App"

// Rehydrate data from Server
const bootstrapData = window.__BOOTSTRAP__

// Start app
ReactDOM.hydrate(
  <App {...bootstrapData} />,
  document.getElementById("react-root")
)

redpajama_set_name: RedPajamaGithub


text:
var N3Parser = require('../node_modules/n3/lib/N3Parser');

// Add a wrapper around the N3.js parser
var RVN3Parser = {};
RVN3Parser.parser = {
    async: true,
    parse: function (data, graph, options, callback) {
        // Shift arguments if necessary
        if (!callback) {
            callback = options;
            options = graph;
            graph = null;
        }

        // Make sure graph is an object
        if (graph && typeof(graph) === 'string')
            graph = { token: 'uri', value: graph, prefix: null, suffix: null };
        // Convert options
        if (options && options.baseURI)
            options.documentIRI = options.baseURI;

        // Parse triples into array
        var triples = [];
        new N3Parser(options).parse(data, function (error, triple) {
            if (error)
                callback(error);
            else if (!triple)
                callback(false, triples);
            else
                triples.push({
                    subject:   convertEntity(triple.subject),
                    predicate: convertEntity(triple.predicate),
                    object:    convertEntity(triple.object),
                    graph:     graph
                });
        });
    },

    resetBlankNodeIds: function() {
        N3Parser._resetBlankNodeIds();
    }

};

// Converts an entity in N3.js representation to this library's representation
function convertEntity(entity) {
    switch (entity[0]) {
        case '"': {
            if(entity.indexOf("^^") > 0) {
                var parts = entity.split("^^");
                return {literal: parts[0] + "^^<" + parts[1] + ">" };
            } else {
                return { literal: entity };
            }
        }
        case '_': return { blank: entity.replace('b', '') };
        default:  return { token: 'uri', value: entity, prefix: null, suffix: null };
    }
}

module.exports = {
    RVN3Parser: RVN3Parser
};


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>Uses of Class com.hp.hpl.jena.sparql.procedure.ProcedureBase (Apache Jena ARQ)</title>
<meta name="date" content="2013-05-11">
<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Uses of Class
com.hp.hpl.jena.sparql.procedure.ProcedureBase

Packages that use ProcedureBase

Package
Description

com.hp.hpl.jena.sparql.procedure

com.hp.hpl.jena.sparql.procedure.library

Uses of ProcedureBase in com.hp.hpl.jena.sparql.procedure

Subclasses of ProcedureBase in com.hp.hpl.jena.sparql.procedure

Modifier and Type
Class and Description

class
ProcedureEval

Uses of ProcedureBase in com.hp.hpl.jena.sparql.procedure.library

Subclasses of ProcedureBase in com.hp.hpl.jena.sparql.procedure.library

Modifier and Type
Class and Description

class
debug

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Licenced under the Apache License, Version 2.0


text:
'use strict';

const helpers = require('../../test/server/rest/mockServer');
const pages = require('./pages');
const webshot = require('webshot');
const getOptions = require('./options');
const resize = require('./resize');

function addWebshotMethod(server, languageCode)
{
    server.webshot = function(angularPath, filename, done) {
        let o = server.getUrlOptions();
        let url = 'http://'+o.hostname+':'+o.port+'/#'+angularPath;
        let options = getOptions();
        options.customHeaders = o.headers;

        return new Promise((resolve, reject) => {
            let filepathFull = './doc/screenshots/'+languageCode+'/'+filename+'.full.png';
            let filepath = './doc/screenshots/'+languageCode+'/'+filename+'.png';

            webshot(url, filepathFull, options, function(err) {
                if (err) {
                    console.log(filepathFull);
                    console.log(err);
                    return reject(err);
                }

                resolve(resize(filepathFull, filepath));

            });

        });

    };

}

/**
 * Function loaded in a beforeEach to ensure the server is started for every test
 * This start only one instance
 *
 * @param {String} [dbname]     optionnal database name
 * @param {String} countryCode  Database will be initialized with this country UK|FR|...
 * @param {String} languageCode en|fr|...
 * @param {Date} [timeCreated]          Optional creation date of the company document
 *                                      The date is used in Shema initTasks, ex: for rights renewals initialisation
 * @return {Promise}
 */
exports = module.exports = function(dbname, countryCode, languageCode) {

    // For screenshots we set the current date here to initalize renewals periods over this date
    // In tests, this is a fixed date because we want always the same renewals periods
    let timeCreated = new Date();

    return new Promise(resolve => {
        helpers.mockServer(dbname, function(_mockServer) {
            addWebshotMethod(_mockServer, languageCode);
            resolve(pages(_mockServer));
        }, countryCode, languageCode, timeCreated);
    });
};


text:
package io.github.bonigarcia.seljup.test.docker;

import static io.github.bonigarcia.seljup.BrowserType.CHROME;
import static java.lang.invoke.MethodHandles.lookup;
import static org.assertj.core.api.Assertions.assertThat;
import static org.slf4j.LoggerFactory.getLogger;

import java.io.File;
import java.time.Duration;
import java.util.Arrays;
import java.util.Optional;

import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.openqa.selenium.remote.SessionId;
import org.slf4j.Logger;

import io.github.bonigarcia.seljup.DockerBrowser;
import io.github.bonigarcia.seljup.SeleniumJupiter;

class DockerChromeRecordingFailureTest {

    @RegisterExtension
    static SeleniumJupiter seleniumJupiter = new SeleniumJupiter();

    final Logger log = getLogger(lookup().lookupClass());

    static SessionId sessionId;

    @BeforeAll
    static void setup() {
        seleniumJupiter.getConfig().enableRecordingWhenFailure();
    }

    @AfterAll
    static void teardown() {
        File[] files = new File(".").listFiles();
        Optional<File> recording = Arrays.stream(files).filter(
                f -> f.getName().endsWith(sessionId.toString() + ".mp4"))
                .findFirst();
        assertThat(recording).isEmpty();
    }

    @Test
    void recordingTest(@DockerBrowser(type = CHROME) RemoteWebDriver driver)
            throws InterruptedException {
        driver.get("https://bonigarcia.dev/selenium-webdriver-java/");
        assertThat(driver.getTitle()).contains("Selenium WebDriver");

        Thread.sleep(Duration.ofSeconds(3).toMillis());

        sessionId = driver.getSessionId();
    }

}


text:
apetools.proletarians.countdowntimer.CountdownTimer.remaining_repetitions
=========================================================================

.. currentmodule:: apetools.proletarians.countdowntimer

.. autoattribute:: CountdownTimer.remaining_repetitions


text:
'use strict'
const AWS = require('aws-sdk');
const uuid = require('uuid');
const dynamoDb = new AWS.DynamoDB.DocumentClient();

module.exports.create = (event, context, callback) => {

    let data = JSON.parse(event.body);

    const params = {
        TableName: 'home',
        Item: Object.assign({},
            data,
            {
                id: uuid.v1(),
            }
        ),
    }

    dynamoDb.put(params, (error, result) => {
        if (error) {
            console.error(error)
            callback(new Error("Failed to Register User"))
            return;
        }
        const response = {
            statusCode: 200,
            headers: {
                "Access-Control-Allow-Origin": "*",
                "Accept-Control-Allow-Credentials": false,
                "Access-Control-Allow-Methods": "GET,HEAD,OPTIONS,POST,PUT,DELETE",
                "Access-Control-Allow-Headers": "Access-Control-Allow-Headers,access-control-allow-origin, Origin,Accept, X-Requested-With, Content-Type, Access-Control-Request-Method, Access-Control-Request-Headers"
            },
            body: JSON.stringify(result.Item)
        }
        callback(null, response);
    })
}


text:
<?php
/**
 * login.php
 *
 * @auteur     marc laville - polinux
 * @Copyleft 2013-14
 * @date       21/10/2013
 * @version    0.1
 * @revision   $0$
 *
 *  Contrôle et Affecte l'identification au login Soap
 *
 */
session_name("flotte");
session_start();

include './soap/configSoap.inc.php';
include 'fonctionSoap.inc.php';

$retour = array(
				'succes' => isset( $_POST["login"], $_POST["pwd"] ),
				'error' => null,
				'result' => null
				);

if( $retour['succes'] ){

	$resultDispatchers = soapGetDispatchers( $wsdl, $login, $_POST["login"] );

	$erreurs = $resultDispatchers->Get_DispatchersResult->Errors;

	$retour['succes'] = !isset($erreurs->Error);
	if( $retour['succes'] ) {

		$dispResult = $resultDispatchers->Get_DispatchersResult->Dispatchers->DispatcherResult;
		$retour['succes'] = ( strtoupper( $dispResult->Password ) == strtoupper( $_POST["pwd"] ) );
		if( $retour['succes'] ) {
			$retour['result'] = array( 'firstname' => $dispResult->Firstname,
									   'lastname' => $dispResult->Lastname,
									   'email' => $dispResult->Email,
									   'PersonExternalCode' => $dispResult->PersonExternalCode,
									   'sexFeminin' => ($dispResult->SexType == 'FEMALE'),
									   'langage' => $dispResult->Language
									 );
			$_SESSION['ident'] = $dispResult->PersonID;
			$_SESSION['pwd'] = $dispResult->Password;
			$_SESSION['firstname'] = $dispResult->Firstname;
			$_SESSION['lastname'] = $dispResult->Lastname;
			$_SESSION['email'] = $dispResult->Email;
			$_SESSION['PersonExternalCode'] = $dispResult->PersonExternalCode;
			$_SESSION['sexFeminin'] = ($dispResult->SexType == 'FEMALE');
			$_SESSION['langage'] = $dispResult->Language;
		} else {
			$retour['error'] = array( 'reason' => "Erreur d'Authentification" );
		}
	} else {
		$retour['error'] = $erreurs->Error;
	}
} else {
	$retour['error'] = array( 'reason' => "Login Invalide" );
//	$retour['POST'] = $_POST;
}

/* Prints out the response object */
header("Content-Type: application/json");
echo htmlspecialchars_decode( json_encode( $retour ), ENT_QUOTES );
?>


text:
package fr.ujm.tse.lt2c.satin.slider.triplestore;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Map.Entry;

import org.apache.log4j.Logger;

import com.google.common.collect.HashMultimap;
import com.google.common.collect.ImmutableMultimap;
import com.google.common.collect.Multimap;
import com.hp.hpl.jena.graph.Node;
import com.hp.hpl.jena.rdf.model.Model;
import com.hp.hpl.jena.rdf.model.ModelFactory;
import com.hp.hpl.jena.rdf.model.Statement;

import fr.ujm.tse.lt2c.satin.slider.interfaces.Dictionary;
import fr.ujm.tse.lt2c.satin.slider.interfaces.Triple;
import fr.ujm.tse.lt2c.satin.slider.interfaces.TripleStore;

/**
 * Triple Store that implements vertical partioning approach
 * WITHOUT locking system
 *
 * @author Julien Subercaze
 * @author Jules Chevalier
 * @see Triple
 */
public class VerticalPartioningTripleStore implements TripleStore {

    private static final Logger LOGGER = Logger.getLogger(VerticalPartioningTripleStore.class);

    private final Map<Long, Multimap<Long, Long>> internalstore;
    private int triples;

    /**
     * Constructor
     */
    public VerticalPartioningTripleStore() {
        this.internalstore = new HashMap<>();
        this.triples = 0;
    }

    @Override
    public boolean add(final Triple t) {
        boolean exists = false;
        if (!this.internalstore.containsKey(t.getPredicate())) {
            final Multimap<Long, Long> newmap = HashMultimap.create();
            newmap.put(t.getSubject(), t.getObject());
            this.internalstore.put(t.getPredicate(), newmap);
            this.triples++;

        } else {
            if (!this.internalstore.get(t.getPredicate()).containsEntry(t.getSubject(), t.getObject())
                    && this.internalstore.get(t.getPredicate()).put(t.getSubject(), t.getObject())) {
                this.triples++;
            } else {
                exists = true;
            }
        }
        return exists;
    }

    @Override
    public Collection<Triple> addAll(final Collection<Triple> triples) {
        // TODO To optimise
        final Collection<Triple> newTriples = new HashSet<>();
        for (final Triple triple : triples) {
            if (!this.add(triple)) {
                newTriples.add(triple);
            }
        }
        return newTriples;

    }

    @Override
    public void remove(final Triple triple) {
        if (this.contains(triple)) {
            final Multimap<Long, Long> multimap = this.internalstore.get(triple.getPredicate());
            multimap.remove(triple.getSubject(), triple.getObject());
            this.triples--;
            if (multimap.isEmpty()) {
                this.internalstore.remove(triple.getPredicate());
            }
        }
    }

    @Override
    public Collection<Triple> getAll() {
        final Collection<Triple> result = new ArrayList<>(this.triples);
        for (final Long predicate : this.internalstore.keySet()) {
            final Multimap<Long, Long> multimap = this.internalstore.get(predicate);
            for (final Entry<Long, Long> entry : multimap.entries()) {
                result.add(new ImmutableTriple(entry.getKey(), predicate, entry.getValue()));
            }
        }
        return result;
    }

    @Override
    public Collection<Triple> getbySubject(final long s) {
        final Collection<Triple> result = new ArrayList<>(this.triples);
        for (final Long predicate : this.internalstore.keySet()) {
            final Multimap<Long, Long> multimap = this.internalstore.get(predicate);
            if (multimap == null) {
                continue;
            }
            for (final Entry<Long, Long> entry : multimap.entries()) {
                if (entry.getKey() == s) {
                    result.add(new ImmutableTriple(entry.getKey(), predicate, entry.getValue()));
                }
            }
        }
        return result;
    }

    @Override
    public Collection<Triple> getbyPredicate(final long p) {
        final Collection<Triple> result = new ArrayList<>(this.triples);
        final Multimap<Long, Long> multimap = this.internalstore.get(p);
        if (multimap != null) {
            for (final Entry<Long, Long> entry : multimap.entries()) {
                result.add(new ImmutableTriple(entry.getKey(), p, entry.getValue()));
            }
        }
        return result;
    }

    @Override
    public Collection<Triple> getbyObject(final long o) {
        final Collection<Triple> result = new ArrayList<>(this.triples);
        for (final Long predicate : this.internalstore.keySet()) {
            final Multimap<Long, Long> multimap = this.internalstore.get(predicate);
            if (multimap == null) {
                continue;
            }
            for (final Entry<Long, Long> entry : multimap.entries()) {
                if (entry.getValue() == o) {
                    result.add(new ImmutableTriple(entry.getKey(), predicate, entry.getValue()));
                }
            }
        }
        return result;
    }

    @Override
    public long size() {
        return this.triples;
    }

    @Override
    public boolean isEmpty() {
        return this.triples == 0;
    }

    @Override
    public void writeToFile(final String file, final Dictionary dictionary) {
        // Create an empty model.
        final Model model = ModelFactory.createDefaultModel();
        // Add all the triples into the model
        for (final Triple triple : this.getAll()) {
            final Node subject = dictionary.get(triple.getSubject());
            final Node predicate = dictionary.get(triple.getPredicate());
            final Node object = dictionary.get(triple.getObject());
            final com.hp.hpl.jena.graph.Triple t = new com.hp.hpl.jena.graph.Triple(subject, predicate, object);
            final Statement st = model.asStatement(t);
            model.add(st);
        }
        try {
            final OutputStream os = new FileOutputStream(file);
            model.write(os, "N-TRIPLES");
            os.close();
        } catch (final FileNotFoundException e) {
            LOGGER.error("", e);
        } catch (final IOException e) {
            LOGGER.error("", e);
        }

    }

    @Override
    public boolean contains(final Triple triple) {
        return this.contains(triple.getSubject(), triple.getPredicate(), triple.getObject());
    }

    @Override
    public boolean contains(final long s, final long p, final long o) {
        return this.internalstore.containsKey(p) && this.internalstore.get(p).containsEntry(s, o);
    }

    @Override
    public Multimap<Long, Long> getMultiMapForPredicate(final long p) {
        Multimap<Long, Long> multimap = null;
        if (this.internalstore.get(p) != null) {
            multimap = ImmutableMultimap.copyOf(this.internalstore.get(p));
        }
        return multimap;
    }

    @Override
    public Collection<Long> getPredicates() {

        return this.internalstore.keySet();
    }

    @Override
    public void clear() {
        this.internalstore.clear();
        this.triples = 0;
    }

    @Override
    public void add(final long s, final long p, final long o) {

        if (!this.internalstore.containsKey(p)) {
            final Multimap<Long, Long> newmap = HashMultimap.create();
            newmap.put(s, o);
            this.internalstore.put(p, newmap);
            this.triples++;

        } else {
            if (!this.internalstore.get(p).containsEntry(s, o) && this.internalstore.get(p).put(s, o)) {
                this.triples++;
            }
        }

    }

    @Override
    public int hashCode() {
        // TODO Hashcode is not implemented in atomic type
        final int prime = 31;
        int result = 1;
        result = prime * result + (this.internalstore == null ? 0 : this.internalstore.hashCode());
        result = prime * result + this.triples;
        return result;
    }

    @Override
    public boolean equals(final Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (this.getClass() != obj.getClass()) {
            return false;
        }
        final VerticalPartioningTripleStore other = (VerticalPartioningTripleStore) obj;
        if (this.triples != other.triples) {
            return false;
        }
        if (this.internalstore == null) {
            if (other.internalstore != null) {
                return false;
            }
        } else if (!this.internalstore.equals(other.internalstore)) {
            return false;
        }
        return true;
    }

}


text:
using namespace std;
using namespace tinyxml2;

// The move visualizer parses a xml movement file and creates an animated svg
// that visualizes the movement of all nodes.
class MoveVisualizer
{
  private:
    set<int> _addedVertices;
    set<string> _addedEdges;
    map<string, Point> _lineStartPoints;
    map<string, Point> _lineEndPoints;
    map<int, int> _tokenMap;
    XMLDocument _doc;

    XMLElement* findPathVertex(int);
    XMLElement* findEdgeLine(string);
    Point findLinePoint(string, int);
    void writeBasics();
    void updateVertex(Vertex&, int);
    void updateEdge(Edge&, int, int);
    void flush(string);

  public:
    MoveVisualizer();
    void visualize(vector<vector<Vertex>>&, string);
    void visualize(vector<vector<Vertex>>&, vector<Edge>&, string);
};

#endif


text:
import { Component, Input } from "@angular/core";
import { NgbActiveModal } from "@ng-bootstrap/ng-bootstrap";
import { Tool } from "chipster-js-common";
import { ToolService } from "../../sessions/session/tools/tool.service";

@Component({
  selector: "ch-manual-modal-component",
  templateUrl: "./manual-modal.component.html",
  styleUrls: ["./manual-modal.component.less"],
})
export class ManualModalComponent {
  @Input() tool: Tool;

  constructor(public activeModal: NgbActiveModal, public toolService: ToolService) {}
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Damaged.Tests.Twitter
{
    class ImageReader
    {
    }
}


text:
package org.cleartk.ml.viterbi;

import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.jar.JarInputStream;
import java.util.jar.JarOutputStream;
import java.util.jar.Manifest;

import org.cleartk.ml.Classifier;
import org.cleartk.ml.jar.JarClassifierBuilder;
import org.cleartk.ml.jar.JarStreams;
import org.cleartk.ml.jar.Train;

/**
 *

 * Copyright (c) 2009, Regents of the University of Colorado

 * All rights reserved.
 *
 * @author Philip Ogren
 *
 */

public class ViterbiClassifierBuilder<OUTCOME_TYPE> extends
    JarClassifierBuilder<ViterbiClassifier<OUTCOME_TYPE>> {

  private static final String OUTCOME_FEATURE_EXTRACTOR_FILE_NAME = "outcome-features-extractors.ser";

  private static final String DELEGATED_MODEL_DIRECTORY_NAME = "delegated-model";

  private static final String DELEGATED_MODEL_FILE_NAME = "delegated-model.jar";

  private static File getOutcomeFeatureExtractorsFile(File dir) {
    return new File(dir, OUTCOME_FEATURE_EXTRACTOR_FILE_NAME);
  }

  public File getDelegatedModelDirectory(File dir) {
    return new File(dir, DELEGATED_MODEL_DIRECTORY_NAME);
  }

  private OutcomeFeatureExtractor[] outcomeFeatureExtractors;

  public void setOutcomeFeatureExtractors(OutcomeFeatureExtractor[] outcomeFeatureExtractors) {
    this.outcomeFeatureExtractors = outcomeFeatureExtractors;
  }

  private Classifier<OUTCOME_TYPE> delegatedClassifier;

  @Override
  public void saveToTrainingDirectory(File dir) throws IOException {
    super.saveToTrainingDirectory(dir);
    ObjectOutputStream extractorsStream = new ObjectOutputStream(new BufferedOutputStream(
        new FileOutputStream(getOutcomeFeatureExtractorsFile(dir))));
    extractorsStream.writeObject(this.outcomeFeatureExtractors);
    extractorsStream.close();
  }

  @Override
  public void trainClassifier(File dir, String... args) throws Exception {
    String[] delegatedArgs = new String[args.length + 1];
    System.arraycopy(args, 0, delegatedArgs, 1, args.length);
    delegatedArgs[0] = this.getDelegatedModelDirectory(dir).getPath();
    Train.main(delegatedArgs);
  }

  @Override
  public void packageClassifier(File dir, JarOutputStream modelStream) throws IOException {
    super.packageClassifier(dir, modelStream);

    JarStreams.putNextJarEntry(
        modelStream,
        DELEGATED_MODEL_FILE_NAME,
        JarClassifierBuilder.getModelJarFile(this.getDelegatedModelDirectory(dir)));

    JarStreams.putNextJarEntry(
        modelStream,
        OUTCOME_FEATURE_EXTRACTOR_FILE_NAME,
        getOutcomeFeatureExtractorsFile(dir));
  }

  @Override
  public void unpackageClassifier(JarInputStream modelStream) throws IOException {
    JarStreams.getNextJarEntry(modelStream, DELEGATED_MODEL_FILE_NAME);
    JarInputStream delegatedModelStream = new JarInputStream(modelStream);
    Manifest delegatedManifest = delegatedModelStream.getManifest();
    JarClassifierBuilder<?> delegatedBuilder = JarClassifierBuilder.fromManifest(delegatedManifest);
    this.delegatedClassifier = this.cast(delegatedBuilder.loadClassifier(delegatedModelStream));

    JarStreams.getNextJarEntry(modelStream, OUTCOME_FEATURE_EXTRACTOR_FILE_NAME);
    ObjectInputStream objectStream = new ObjectInputStream(modelStream);
    try {
      this.outcomeFeatureExtractors = (OutcomeFeatureExtractor[]) objectStream.readObject();
    } catch (ClassNotFoundException e) {
      throw new IOException(e);
    }
  }

  @Override
  public ViterbiClassifier<OUTCOME_TYPE> newClassifier() {
    return new ViterbiClassifier<OUTCOME_TYPE>(
        this.delegatedClassifier,
        this.outcomeFeatureExtractors);
  }

  @SuppressWarnings("unchecked")
  private Classifier<OUTCOME_TYPE> cast(Object object) {
    Classifier<OUTCOME_TYPE> classifier = (Classifier<OUTCOME_TYPE>) object;
    // Can't check that OUTCOME_TYPE matches - ViterbiClassifier is generic and so has no concrete
    // OUTCOME_TYPE at runtime. But ViterbiClassifier should work with any classifier, so this
    // should be okay.
    return classifier;
  }

}


text:
#import "PlaylistEntry.h"
#import "Trace.h"

@implementation PlaylistEntry

#pragma mark -
#pragma mark Properties:

@synthesize type;
@synthesize entryId;
@synthesize originalId;
@synthesize linearTime;
@synthesize clipURI;
@synthesize mediaTime;
@synthesize isAdvertisement;
@synthesize deleteAfterPlayed;
@synthesize playbackPolicy;

#pragma mark -
#pragma mark Destructor:

- (void) dealloc
{
    SEQUENCER_LOG(@"PlaylistEntry dealloc called.");

    [linearTime release];
    [clipURI release];
    [mediaTime release];
    [playbackPolicy release];

    [super dealloc];
}

@end


text:
package widoco.entities;

//import com.hp.hpl.jena.ontology.OntModel;
import java.util.ArrayList;
import java.util.HashMap;
import org.semanticweb.owlapi.model.OWLOntology;
import org.semanticweb.owlapi.model.OWLOntologyManager;

/**
 * Class for representing the ontology objects
 * @author Daniel Garijo
 */
public class Ontology {
    /**
     * Name of the ontology
     */
    private String name;
    /**
     * Namespace prefix of the ontology
     */
    private String namespacePrefix;
    /**
     * Namespace URI of the ontology
     */
    private String namespaceURI;
    /**
     * Available serializations of the ontology.
     * Key: serialization type
     * Value: Serialization path/URI
     */
    private HashMap<String,String> serializations;
    /**
     * License of the ontology. A license may have name, uri and logo
     */
    private License license;
    /**
     * Creators of the ontology
     */
    private ArrayList<Agent> creators;
    /**
     * Contributors of the ontology
     */
    private ArrayList<Agent> contributors;
    /**
     * Publisher of the ontology
     */
    private Agent publisher;
    /**
     * Previous version uri of the ontology
     */
    private String previousVersion;
    /**
     * This version uri of the ontology
     */
    private String thisVersion;
    /**
     * Latest version of the ontology
     */
    private String latestVersion;
    /**
     * Version number of the ontology
     */
    private String revision;
    /**
     * Imported ontologies used in the current ontology
     */
    private ArrayList<Ontology> importedOntologies;
    /**
     * Extended ontologies used in the current one
     */
    private ArrayList<Ontology> extendedOntologies;
    /**
     * OntModel of the ontology being documented.
     */
//    private OntModel mainOntologyModel;
    /**
     * In-Memory representation of the ontology being documented (OWLAPI)
     */
    private OWLOntology mainOntology;
    /**
     * In-Memory manager of the ontology being documented (OWLAPI
     */
    private OWLOntologyManager mainOntologyManager;
    /**
     * Title of the ontology. Different from the name
     */
    private String title;
    /**
     * Release date of the ontology
     */
    private String releaseDate;
    /**
     * Status of the ontology (e.g., specification draft, official release, etc.)
     */
    private String status;
    /**
     * How to cite the ontology (paper or publication that describes it)
     */
    private String citeAs;
    /**
     * DOI of the ontology, if available
     */
    private String doi;

    /**
     * Compatible with
     */
    private String backwardsCompatibleWith;

    /**
     * owl:incompatibleWith
     */
    private String incompatibleWith;

    /**
     * images used to illustrate the ontology
     */
    private ArrayList<String> images;

    /**
     * Issued date
     */
    private String issuedDate;

    public Ontology() {
        this.images = new ArrayList<>();
    }

    public Ontology(String name, String namespacePrefix, String namespaceURI) {
        this.name = name;
        this.namespacePrefix = namespacePrefix;
        this.namespaceURI = namespaceURI;
        this.images = new ArrayList<>();
    }

    public String getName() {
        return name;
    }

    public String getNamespacePrefix() {
        return namespacePrefix;
    }

    public String getNamespaceURI() {
        return namespaceURI;
    }

    public HashMap<String, String> getSerializations() {
        return serializations;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setNamespaceURI(String namespaceURI) {
        this.namespaceURI = namespaceURI;
    }

    public void setNamespacePrefix(String namespacePrefix) {
        this.namespacePrefix = namespacePrefix;
    }

    public boolean isHashOntology(){
        return !namespaceURI.endsWith("/");
    }

    public License getLicense() {
        return license;
    }

    public void setLicense(License license) {
        this.license = license;
    }

    public ArrayList<Agent> getContributors() {
        return contributors;
    }

    public void setContributors(ArrayList<Agent> contributors) {
        this.contributors = contributors;
    }

    public ArrayList<Agent> getCreators() {
        return creators;
    }

    public void setCreators(ArrayList<Agent> creators) {
        this.creators = creators;
    }

    /**
     * Method that adds a serialization to the supported serialization arraylist of the vocabulary
     * @param serializationName
     * @param serializationURI
     */
    public void addSerialization(String serializationName, String serializationURI){
        serializations.put(serializationName, serializationURI);

    }

    public void setSerializations(HashMap<String, String> serializations) {
        this.serializations = serializations;
    }

    public String getCiteAs() {
        return citeAs;
    }

    public void setCiteAs(String citeAs) {
        this.citeAs = citeAs;
    }

    public String getDoi() {
        return doi;
    }

    public void setDoi(String doi) {
        this.doi = doi;
    }

    public ArrayList<Ontology> getExtendedOntologies() {
        return extendedOntologies;
    }

    public void setExtendedOntologies(ArrayList<Ontology> extendedOntologies) {
        this.extendedOntologies = extendedOntologies;
    }

    public String getRevision() {
        return revision;
    }

    public void setRevision(String revision) {
        this.revision = revision;
    }

    public String getLatestVersion() {
        return latestVersion;
    }

    public void setLatestVersion(String latestVersion) {
        this.latestVersion = latestVersion;
    }

    public String getPreviousVersion() {
        return previousVersion;
    }

    public void setPreviousVersion(String previousVersion) {
        this.previousVersion = previousVersion;
    }

    public String getThisVersion() {
        return thisVersion;
    }

    public void setThisVersion(String thisVersion) {
        this.thisVersion = thisVersion;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        if(title==null) this.title= "Untitled ontology";
        else this.title = title;
    }

    public String getReleaseDate() {
        return releaseDate;
    }

    public void setReleaseDate(String releaseDate) {
        this.releaseDate = releaseDate;
    }

    public String getIssuedDate(){ return issuedDate;}

    public void setIssuedDate(String issuedDate){ this.issuedDate = issuedDate;}

    public ArrayList<Ontology> getImportedOntologies() {
        return importedOntologies;
    }

    public void setImportedOntologies(ArrayList<Ontology> importedOntologies) {
        this.importedOntologies = importedOntologies;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    /**
     * Getter for the in-memory ontology representation.
     * @return
     */
    public OWLOntology getOWLAPIModel(){
        return this.mainOntology;
    }

    public OWLOntologyManager getOWLAPIOntologyManager(){
        return this.mainOntologyManager;
    }

    public void setMainOntology(OWLOntology o){
        this.mainOntology = o;
    }

    public void setMainOntologyManager(OWLOntologyManager m){
        this.mainOntologyManager = m;
    }

    public Agent getPublisher() {
        return publisher;
    }

    public void setPublisher(Agent publisher) {
        this.publisher = publisher;
    }

    public String getBackwardsCompatibleWith() {
        return backwardsCompatibleWith;
    }

    public void setBackwardsCompatibleWith(String backwardsCompatibleWith) {
        this.backwardsCompatibleWith = backwardsCompatibleWith;
    }

    public String getIncompatibleWith() {
        return incompatibleWith;
    }

    public void setIncompatibleWith(String incompatibleWith) {
        this.incompatibleWith = incompatibleWith;
    }

    public ArrayList<String> getImages(){
        return images;
    }

    public void addImage(String image){
        this.images.add(image);
    }

    public void setImages(ArrayList<String> images){
        this.images = images;
    }
}


text:
module.exports = {
  'Check the documentation page exists': function (client) {
    const waitTime = client.globals.maxWaitTime;

    client
      .loginToGUI()
      .clickWhenVisible('a[href="#/documentation"]')
      .waitForElementVisible('a[href="http://docs.couchdb.org/en/latest/"]', waitTime, false)
      .waitForElementVisible('a[href="./docs/index.html"]', waitTime, false)
      .waitForElementVisible('a[href="http://blog.couchdb.org/"]', waitTime, false)
      .waitForElementVisible('a[href="https://couchdb.apache.org/"]', waitTime, false)
      .waitForElementVisible('a[href="https://github.com/apache/couchdb"]', waitTime, false)
      .waitForElementVisible('a[href="https://github.com/apache/couchdb-fauxton"]', waitTime, false)
      .waitForElementVisible('a[href="https://couchdb.apache.org/fauxton-visual-guide/index.html"]', waitTime, false)
      .waitForElementVisible('a[href="http://www.apache.org/"]', waitTime, false)
      .waitForElementVisible('a[href="https://twitter.com/couchdb"]', waitTime, false)
      .waitForElementVisible('a[href="https://plus.google.com/+CouchDB"]', waitTime, false)
      .waitForElementVisible('a[href="https://www.linkedin.com/company/apache-couchdb"]', waitTime, false)
      .end();
  }
};