2 * ============LICENSE_START====================================================
\r
4 * ===========================================================================
\r
5 * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
\r
6 * ===========================================================================
\r
7 * Licensed under the Apache License, Version 2.0 (the "License");
\r
8 * you may not use this file except in compliance with the License.
\r
9 * You may obtain a copy of the License at
\r
11 * http://www.apache.org/licenses/LICENSE-2.0
\r
13 * Unless required by applicable law or agreed to in writing, software
\r
14 * distributed under the License is distributed on an "AS IS" BASIS,
\r
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
16 * See the License for the specific language governing permissions and
\r
17 * limitations under the License.
\r
18 * ============LICENSE_END====================================================
\r
22 package org.onap.aaf.misc.xgen.html;
\r
24 import java.io.Writer;
\r
26 import org.onap.aaf.misc.xgen.Mark;
\r
28 public class HTML5Gen extends HTMLGen {
\r
29 public HTML5Gen(Writer w) {
\r
34 public HTMLGen html(String ... attrib) {
\r
35 forward.println("<!DOCTYPE html>");
\r
36 incr("html",attrib);
\r
41 public Mark head() {
\r
42 Mark head = new Mark("head");
\r
43 incr(head).directive("meta","charset=utf-8");
\r
48 public Mark body(String ... attrs) {
\r
49 Mark body = new Mark("body");
\r
50 incr(body,"body",attrs);
\r
56 public HTML5Gen charset(String charset) {
\r
57 forward.append("<meta charset=\"");
\r
58 forward.append(charset);
\r
59 forward.append("\">");
\r
65 public Mark header(String ... attribs) {
\r
66 Mark mark = new Mark("header");
\r
67 incr(mark, mark.comment, attribs);
\r
72 public Mark footer(String ... attribs) {
\r
73 Mark mark = new Mark("footer");
\r
74 incr(mark, mark.comment, attribs);
\r
79 public Mark section(String ... attribs) {
\r
80 Mark mark = new Mark("section");
\r
81 incr(mark, mark.comment,attribs);
\r
86 public Mark article(String ... attribs) {
\r
87 Mark mark = new Mark("article");
\r
88 incr(mark, mark.comment,attribs);
\r
93 public Mark aside(String ... attribs) {
\r
94 Mark mark = new Mark("aside");
\r
95 incr(mark, mark.comment,attribs);
\r
100 public Mark nav(String ... attribs) {
\r
101 Mark mark = new Mark("nav");
\r
102 incr(mark, mark.comment,attribs);
\r