-
Notifications
You must be signed in to change notification settings - Fork 10
/
generateIndexJsp.mtl
88 lines (78 loc) · 4.01 KB
/
generateIndexJsp.mtl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
[comment encoding = UTF-8 /]
[comment
/*
* Copyright (c) 2022 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License 1.0
* which is available at http://www.eclipse.org/org/documents/edl-v10.php.
*
* SPDX-License-Identifier: EPL-2.0 OR BSD-3-Simple
*/
/]
[module generateIndexJsp('http://org.eclipse.lyo/oslc4j/adaptorInterface')]
[import org::eclipse::lyo::oslc4j::codegenerator::services::services/]
[import org::eclipse::lyo::oslc4j::codegenerator::services::jspServices/]
[import org::eclipse::lyo::oslc4j::codegenerator::services::adaptorInterfaceServices/]
[import org::eclipse::lyo::oslc4j::codegenerator::staticFiles::generateCssAndJsFiles/]
[template public generateIndexJsp(anAdaptorInterface : AdaptorInterface)]
[if (anAdaptorInterface.generateJspFile(webFilesBasePath(anAdaptorInterface).concatenatePaths('index.jsp')))]
[file (webFilesBasePath(anAdaptorInterface).concatenatePaths('index.jsp'), false, 'UTF-8')]
<%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%>
<!DOCTYPE html>
<%--
Copyright (c) 2022 Contributors to the Eclipse Foundation
See the NOTICE file(s) distributed with this work for additional
information regarding copyright ownership.
This program and the accompanying materials are made available under the
terms of the Eclipse Distribution License 1.0 which is available at
http://www.eclipse.org/org/documents/edl-v10.php.
SPDX-License-Identifier: BSD-3-Simple
This file is generated by Lyo Designer (https://www.eclipse.org/lyo/)
--%>
<%@page import="org.eclipse.lyo.oslc4j.core.OSLC4JUtils"%>
<%@page import="javax.ws.rs.core.UriBuilder"%>
<%@page import="java.net.URI"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- Latest compiled and minified CSS -->
<title>Adaptor home</title>
[generateBootstrapTags()/]
<link href="<c:url value="/static/css/adaptor.css"/>" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="jumbotron">
<h1 class="display-3"><%= application.getServletContextName() %></h1>
<p class="lead">This is a homepage of the <em>[anAdaptorInterface.name/]</em> that was generated using
Eclipse Lyo Toolchain Designer.</p>
<hr class="my-4">
<p class="lead">
<a class="btn btn-primary btn-lg" href="<%= UriBuilder.fromUri(OSLC4JUtils.getServletURI()).path("/catalog/singleton").build() %>" role="button">Service Provider
Catalog</a>
</p>
<p>Start from the Service Provider Catalog, to navigate your adaptor's services and resources, using the available Query capabilities, Selection and Creation Dialogs.
Note that these are end-user HTML pages, which is very useful for debugging your adaptor.</p>
<p class="lead">
<a class="btn btn-primary btn-lg" href="<c:url value="[swaggerIndexJspRelativeFileName(anAdaptorInterface)/]"/>" role="button">Interactive Swagger UI</a>
</p>
<p>Use Swagger UI To interact with the adaptor services dedicated for RDF.
</p>
<p>You can also copy <a href="<%= UriBuilder.fromUri(OSLC4JUtils.getServletURI()).path("/openapi.yaml").build() %>">this OpenAPI specification document (yaml file) of this adaptor</a> to a <a href="<%= "https://editor.swagger.io" %>">Swagger Editor</a> to generate client SDK code for a number of languages and platforms.
</p>
</div>
</div>
</body>
</html>
[/file]
[/if]
[/template]