Switch href args and changed DESCRIPTION_NODE div-ving schema
This commit is contained in:
parent
2930452b07
commit
373174a58d
|
@ -22,10 +22,10 @@
|
||||||
*/
|
*/
|
||||||
package org.x4o.fc18.cake2.fcdoc;
|
package org.x4o.fc18.cake2.fcdoc;
|
||||||
|
|
||||||
import java.io.Closeable;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.x4o.fc18.cake2.FourCornerDotCake;
|
import org.x4o.fc18.cake2.FourCornerDotCake;
|
||||||
|
@ -47,7 +47,7 @@ import org.x4o.o2o.tdoc.dom.ApiDocWriteEvent;
|
||||||
*/
|
*/
|
||||||
public class FCDocSegmentWriterCake implements FCDocSegmentWriter {
|
public class FCDocSegmentWriterCake implements FCDocSegmentWriter {
|
||||||
|
|
||||||
private final String[] FC_FEATURES = new String[] {
|
private static final String[] FC_FEATURES = new String[] {
|
||||||
"VT-06 terminal control for CDC1604(1960) 6 bit main frames",
|
"VT-06 terminal control for CDC1604(1960) 6 bit main frames",
|
||||||
"Has underscored letters to migrate EBCDIC(1963) APL code from z/OS",
|
"Has underscored letters to migrate EBCDIC(1963) APL code from z/OS",
|
||||||
"Program with (local) words not with lettersssss",
|
"Program with (local) words not with lettersssss",
|
||||||
|
@ -60,25 +60,28 @@ public class FCDocSegmentWriterCake implements FCDocSegmentWriter {
|
||||||
"Contains the BIP0039(2013) keyword encoding too",
|
"Contains the BIP0039(2013) keyword encoding too",
|
||||||
};
|
};
|
||||||
|
|
||||||
@ApiDocNodeWriterMethod(nodeBody=ApiDocNodeBody.DESCRIPTION_NODE,targetClasses={TDocCake.class})
|
@ApiDocNodeWriterMethod(nodeBody = ApiDocNodeBody.DESCRIPTION_NODE, targetClasses = {TDocCake.class}, nodeBodyOrders = 20)
|
||||||
public void writeSchemaViewSummary(ApiDocWriteEvent<ApiDocNode> event) throws IOException {
|
public void writeFeatureListing(ApiDocWriteEvent<ApiDocNode> event) throws IOException {
|
||||||
ApiDocContentWriter writer = event.getWriter();
|
ApiDocContentWriter writer = event.getWriter();
|
||||||
writer.printCharacters("Four corner is 18 bit text encoding for 144 bit computers.");
|
|
||||||
writer.printTagStartEnd(Tag.br);
|
|
||||||
writer.printTagStartEnd(Tag.br);
|
|
||||||
writer.printCharacters("Features;");
|
writer.printCharacters("Features;");
|
||||||
try (Closeable content = writer.docPageContent()) {
|
try (ContentCloseable content = writer.docPageContent()) {
|
||||||
writer.printTagStart(Tag.ul);
|
try (ContentCloseable ul = writer.printTag(Tag.ul)) {
|
||||||
for (String feature : FC_FEATURES) {
|
for (String feature : FC_FEATURES) {
|
||||||
writer.printTagStart(Tag.li,"",null,"circle");
|
try (ContentCloseable li = writer.printTag(Tag.li, "", null, "circle")) {
|
||||||
writer.printCharacters(feature);
|
writer.printCharacters(feature);
|
||||||
writer.printTagEnd(Tag.li);
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
writer.printTagEnd(Tag.ul);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiDocNodeWriterMethod(nodeBody=ApiDocNodeBody.SUMMARY, targetClasses={TDocCake.class}, nodeBodyOrders=20)
|
@ApiDocNodeWriterMethod(nodeBody = ApiDocNodeBody.DESCRIPTION_NODE, targetClasses = {TDocCake.class}, nodeBodyOrders = 1)
|
||||||
|
public void writeIntro(ApiDocWriteEvent<ApiDocNode> event) throws IOException {
|
||||||
|
ApiDocContentWriter writer = event.getWriter();
|
||||||
|
writer.printCharacters("Four corner is 18 bit text encoding for 144 bit computers.");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiDocNodeWriterMethod(nodeBody = ApiDocNodeBody.SUMMARY, targetClasses = {TDocCake.class}, nodeBodyOrders = 20)
|
||||||
public void writeDefaultSummary(ApiDocWriteEvent<ApiDocNode> event) throws IOException {
|
public void writeDefaultSummary(ApiDocWriteEvent<ApiDocNode> event) throws IOException {
|
||||||
// NOTE: copyed from defaultWriteSummary as that only called with zero summaries
|
// NOTE: copyed from defaultWriteSummary as that only called with zero summaries
|
||||||
ApiDocContentWriter writer = event.getWriter();
|
ApiDocContentWriter writer = event.getWriter();
|
||||||
|
@ -89,11 +92,11 @@ public class FCDocSegmentWriterCake implements FCDocSegmentWriter {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String name = concept.getName()+" Summary";
|
String name = concept.getName()+" Summary";
|
||||||
writer.docTableStart(name, "All childeren in "+name,ApiDocContentCss.overviewSummary);
|
writer.docTableStart(name, "All childeren in "+name, ApiDocContentCss.overviewSummary);
|
||||||
writer.docTableHeader("Name", "Description");
|
writer.docTableHeader("Name", "Description");
|
||||||
for (ApiDocNode child : nodes) {
|
for (ApiDocNode child : nodes) {
|
||||||
String link = ApiDocContentWriter.toSafeUri(child.getId())+"/index.html";
|
String link = ApiDocContentWriter.toSafeUri(child.getId())+"/index.html";
|
||||||
if (parent.getParent()==null) {
|
if (parent.getParent() == null) {
|
||||||
link = ApiDocContentWriter.toSafeUri(parent.getId())+"/"+link; // root node
|
link = ApiDocContentWriter.toSafeUri(parent.getId())+"/"+link; // root node
|
||||||
}
|
}
|
||||||
writer.docTableRowLink(link,child.getName(),child.getDescription());
|
writer.docTableRowLink(link,child.getName(),child.getDescription());
|
||||||
|
@ -101,47 +104,45 @@ public class FCDocSegmentWriterCake implements FCDocSegmentWriter {
|
||||||
writer.docTableEnd();
|
writer.docTableEnd();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiDocNodeWriterMethod(nodeBody=ApiDocNodeBody.SUMMARY, targetClasses={TDocCake.class}, nodeBodyOrders=30)
|
@ApiDocNodeWriterMethod(nodeBody = ApiDocNodeBody.SUMMARY, targetClasses = {TDocCake.class}, nodeBodyOrders = 30)
|
||||||
public void writeTowerSummary(ApiDocWriteEvent<ApiDocNode> e) throws IOException {
|
public void writeTowerSummary(ApiDocWriteEvent<ApiDocNode> e) throws IOException {
|
||||||
String rootId = e.getDoc().getRootNode().getId();
|
String rootId = e.getDoc().getRootNode().getId();
|
||||||
ApiDocConcept concept = e.getDoc().findConceptByClass(e.getEventObject().getUserData().getClass());
|
ApiDocConcept concept = e.getDoc().findConceptByClass(e.getEventObject().getUserData().getClass());
|
||||||
String tableName = concept.getName()+" Details";
|
String tableName = concept.getName() + " Elevator";
|
||||||
ApiDocContentWriter writer = e.getWriter();
|
ApiDocContentWriter writer = e.getWriter();
|
||||||
//try (ContentCloseable content = writer.docPageContent()) {
|
try (ContentCloseable table = writer.docTable(tableName, null, ApiDocContentCss.overviewSummary)) {
|
||||||
try (ContentCloseable table = writer.docTable(tableName, null, ApiDocContentCss.overviewSummary)) {
|
writeTableBoxHeader(writer, new String[] {"Cake", "Tower", "Start", "Stop", "Size", "External"});
|
||||||
writeTableBoxHeader(writer, new String[] {"Cake", "Tower", "Start", "Stop", "Size", "External"});
|
Set<FourCornerDotCake> linkableSlices = new HashSet<>();
|
||||||
Set<FourCornerDotCake> linkableSlices = new HashSet<>();
|
for (ApiDocNode towerNode : e.getEventObject().getNodes()) {
|
||||||
for (ApiDocNode towerNode : e.getEventObject().getNodes()) {
|
for (ApiDocNode sliceNode : towerNode.getNodes()) {
|
||||||
for (ApiDocNode sliceNode : towerNode.getNodes()) {
|
FourCornerDotCake slice = sliceNode.toUserData(TDocCakeSlice.class).getSlice();
|
||||||
FourCornerDotCake slice = FourCornerDotCake.class.cast(sliceNode.getUserData());
|
linkableSlices.add(slice);
|
||||||
linkableSlices.add(slice);
|
StringBuilder buf = new StringBuilder();
|
||||||
StringBuilder buf = new StringBuilder();
|
buf.append(ApiDocContentWriter.toSafeUri(rootId)); // TODO: add full tree node ID href version of toSafeUri
|
||||||
buf.append(ApiDocContentWriter.toSafeUri(rootId)); // TODO: add full tree node ID href version of toSafeUri
|
buf.append("/");
|
||||||
buf.append("/");
|
buf.append(ApiDocContentWriter.toSafeUri(towerNode.getId()));
|
||||||
buf.append(ApiDocContentWriter.toSafeUri(towerNode.getId()));
|
buf.append("/");
|
||||||
buf.append("/");
|
buf.append(ApiDocContentWriter.toSafeUri(sliceNode.getId()));
|
||||||
buf.append(ApiDocContentWriter.toSafeUri(sliceNode.getId()));
|
buf.append("/index.html");
|
||||||
buf.append("/index.html");
|
writeCake(writer, slice, Optional.of(buf.toString()));
|
||||||
writeCake(writer, slice, buf.toString());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for (FourCornerDotCake slice : FourCornerDotCake.values()) {
|
|
||||||
if (linkableSlices.contains(slice)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
writeCake(writer, slice, null);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//}
|
for (FourCornerDotCake slice : FourCornerDotCake.values()) {
|
||||||
|
if (linkableSlices.contains(slice)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
writeCake(writer, slice, Optional.empty());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void writeCake(ApiDocContentWriter writer, FourCornerDotCake slice, String href) throws IOException {
|
private void writeCake(ApiDocContentWriter writer, FourCornerDotCake slice, Optional<String> href) throws IOException {
|
||||||
try (ContentCloseable tableRow = writer.docTableRow()) {
|
try (ContentCloseable tableRow = writer.docTableRow()) {
|
||||||
try (ContentCloseable td = writer.printTag(Tag.td, ApiDocContentCss.colFirst)) {
|
try (ContentCloseable td = writer.printTag(Tag.td, ApiDocContentCss.colFirst)) {
|
||||||
if (href == null) {
|
if (href.isEmpty()) {
|
||||||
writer.printCharacters(slice.nameSpec());
|
writer.printCharacters(slice.nameSpec());
|
||||||
} else {
|
} else {
|
||||||
writer.printHref(href, slice.description(), slice.nameSpec(), "strong"); // TODO: reverse href method arguments
|
writer.printHref(href.get(), slice.nameSpec(), slice.description(), "strong");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
try (ContentCloseable td = writer.printTag(Tag.td, ApiDocContentCss.colOne)) {
|
try (ContentCloseable td = writer.printTag(Tag.td, ApiDocContentCss.colOne)) {
|
||||||
|
|
|
@ -50,7 +50,7 @@ import org.x4o.o2o.tdoc.dom.ApiDocWriteEvent;
|
||||||
*/
|
*/
|
||||||
public class FCDocSegmentWriterCakeSlice implements FCDocSegmentWriter {
|
public class FCDocSegmentWriterCakeSlice implements FCDocSegmentWriter {
|
||||||
|
|
||||||
@ApiDocNodeWriterMethod(nodeBody=ApiDocNodeBody.DETAIL, targetClasses={FourCornerDotCake.class}, nodeBodyOrders=20)
|
@ApiDocNodeWriterMethod(nodeBody=ApiDocNodeBody.DETAIL, targetClasses={TDocCakeSlice.class}, nodeBodyOrders=20)
|
||||||
public void writeDefaultSummary(ApiDocWriteEvent<ApiDocNode> event) throws IOException {
|
public void writeDefaultSummary(ApiDocWriteEvent<ApiDocNode> event) throws IOException {
|
||||||
// NOTE: copyed from defaultWriteSummary as that only called with zero summaries + changes name end in; Words
|
// NOTE: copyed from defaultWriteSummary as that only called with zero summaries + changes name end in; Words
|
||||||
ApiDocContentWriter writer = event.getWriter();
|
ApiDocContentWriter writer = event.getWriter();
|
||||||
|
@ -73,10 +73,10 @@ public class FCDocSegmentWriterCakeSlice implements FCDocSegmentWriter {
|
||||||
writer.docTableEnd();
|
writer.docTableEnd();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiDocNodeWriterMethod(nodeBody=ApiDocNodeBody.SUMMARY, targetClasses={FourCornerDotCake.class}, nodeBodyOrders=1)
|
@ApiDocNodeWriterMethod(nodeBody=ApiDocNodeBody.SUMMARY, targetClasses={TDocCakeSlice.class}, nodeBodyOrders=1)
|
||||||
public void writeCakeSliceDetails(ApiDocWriteEvent<ApiDocNode> event) throws IOException {
|
public void writeCakeSliceDetails(ApiDocWriteEvent<ApiDocNode> event) throws IOException {
|
||||||
ApiDocContentWriter writer = event.getWriter();
|
ApiDocContentWriter writer = event.getWriter();
|
||||||
FourCornerDotCake slice = (FourCornerDotCake)event.getEventObject().getUserData();
|
FourCornerDotCake slice = event.getEventObject().toUserData(TDocCakeSlice.class).getSlice();
|
||||||
try (ContentCloseable table = writer.docTable("Cake Slice", null, ApiDocContentCss.overviewSummary)) {
|
try (ContentCloseable table = writer.docTable("Cake Slice", null, ApiDocContentCss.overviewSummary)) {
|
||||||
writer.docTableHeader("Information", "Value");
|
writer.docTableHeader("Information", "Value");
|
||||||
writer.docTableRow("Start index", String.format("0x%06X", slice.getStart()));
|
writer.docTableRow("Start index", String.format("0x%06X", slice.getStart()));
|
||||||
|
|
|
@ -45,7 +45,7 @@ public class FCDocSegmentWriterCakeWord implements FCDocSegmentWriter {
|
||||||
@ApiDocNodeWriterMethod(nodeBody=ApiDocNodeBody.SUMMARY,targetClasses={TDocCakeWord.class})
|
@ApiDocNodeWriterMethod(nodeBody=ApiDocNodeBody.SUMMARY,targetClasses={TDocCakeWord.class})
|
||||||
public void writeCakeWordSummary(ApiDocWriteEvent<ApiDocNode> event) throws IOException {
|
public void writeCakeWordSummary(ApiDocWriteEvent<ApiDocNode> event) throws IOException {
|
||||||
ApiDocContentWriter writer = event.getWriter();
|
ApiDocContentWriter writer = event.getWriter();
|
||||||
TDocCakeWord word = (TDocCakeWord)event.getEventObject().getUserData();
|
TDocCakeWord word = event.getEventObject().toUserData(TDocCakeWord.class);
|
||||||
FourCornerX00PetitVidePoints[] videPoints = word.getSlice().getVidePoints();
|
FourCornerX00PetitVidePoints[] videPoints = word.getSlice().getVidePoints();
|
||||||
if (videPoints.length == 0) {
|
if (videPoints.length == 0) {
|
||||||
return;
|
return;
|
||||||
|
@ -84,7 +84,7 @@ public class FCDocSegmentWriterCakeWord implements FCDocSegmentWriter {
|
||||||
@ApiDocNodeWriterMethod(nodeBody=ApiDocNodeBody.DETAIL,targetClasses={TDocCakeWord.class})
|
@ApiDocNodeWriterMethod(nodeBody=ApiDocNodeBody.DETAIL,targetClasses={TDocCakeWord.class})
|
||||||
public void writeCakeWordDetail(ApiDocWriteEvent<ApiDocNode> event) throws IOException {
|
public void writeCakeWordDetail(ApiDocWriteEvent<ApiDocNode> event) throws IOException {
|
||||||
ApiDocContentWriter writer = event.getWriter();
|
ApiDocContentWriter writer = event.getWriter();
|
||||||
TDocCakeWord word = (TDocCakeWord)event.getEventObject().getUserData();
|
TDocCakeWord word = event.getEventObject().toUserData(TDocCakeWord.class);
|
||||||
FourCornerX00PetitVidePoints[] videPoints = word.getSlice().getVidePoints();
|
FourCornerX00PetitVidePoints[] videPoints = word.getSlice().getVidePoints();
|
||||||
if (videPoints.length == 0) {
|
if (videPoints.length == 0) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -128,7 +128,7 @@ public class FCDocWriter {
|
||||||
doc.setGroupTypeName("overview", "Overview",2);
|
doc.setGroupTypeName("overview", "Overview",2);
|
||||||
|
|
||||||
doc.addTreeNodeClassExclude(TDocCakeWord.class);
|
doc.addTreeNodeClassExclude(TDocCakeWord.class);
|
||||||
doc.setFrameNavConceptClass(FourCornerDotCake.class);
|
doc.setFrameNavConceptClass(TDocCakeSlice.class);
|
||||||
|
|
||||||
doc.addTreeNodePageModeClass(TDocCake.class);
|
doc.addTreeNodePageModeClass(TDocCake.class);
|
||||||
doc.addTreeNodePageModeClass(TDocCakeTower.class);
|
doc.addTreeNodePageModeClass(TDocCakeTower.class);
|
||||||
|
@ -139,7 +139,7 @@ public class FCDocWriter {
|
||||||
|
|
||||||
ApiDocConcept adc1 = doc.addConcept(new ApiDocConcept(null,C_FC_ROOT,TDocCake.class));
|
ApiDocConcept adc1 = doc.addConcept(new ApiDocConcept(null,C_FC_ROOT,TDocCake.class));
|
||||||
ApiDocConcept adc2 = doc.addConcept(new ApiDocConcept(adc1,C_FC_TOWER,TDocCakeTower.class));
|
ApiDocConcept adc2 = doc.addConcept(new ApiDocConcept(adc1,C_FC_TOWER,TDocCakeTower.class));
|
||||||
ApiDocConcept adc3 = doc.addConcept(new ApiDocConcept(adc2,C_FC_SLICE,FourCornerDotCake.class));
|
ApiDocConcept adc3 = doc.addConcept(new ApiDocConcept(adc2,C_FC_SLICE,TDocCakeSlice.class));
|
||||||
/*ApiDocConcept adc4 = */doc.addConcept(new ApiDocConcept(adc3,C_FC_WORD,TDocCakeWord.class));
|
/*ApiDocConcept adc4 = */doc.addConcept(new ApiDocConcept(adc3,C_FC_WORD,TDocCakeWord.class));
|
||||||
|
|
||||||
//ApiDocConcept adc4 = doc.addConcept(new ApiDocConcept(adc3,C_TABLE,Table.class));
|
//ApiDocConcept adc4 = doc.addConcept(new ApiDocConcept(adc3,C_TABLE,Table.class));
|
||||||
|
@ -175,8 +175,8 @@ public class FCDocWriter {
|
||||||
return new ApiDocNode(new TDocCakeTower(tower), tower.name(), tower.nameNice(), tower.description());
|
return new ApiDocNode(new TDocCakeTower(tower), tower.name(), tower.nameNice(), tower.description());
|
||||||
}
|
}
|
||||||
|
|
||||||
private ApiDocNode createNodeCakeSlice(FourCornerDotCake dotCake) {
|
private ApiDocNode createNodeCakeSlice(FourCornerDotCake slice) {
|
||||||
return new ApiDocNode(dotCake, dotCake.name(), dotCake.nameSpec(), dotCake.description());
|
return new ApiDocNode(new TDocCakeSlice(slice), slice.name(), slice.nameSpec(), slice.description());
|
||||||
}
|
}
|
||||||
|
|
||||||
private ApiDocNode createNodeCakeWord(FourCornerDotCake dotCake, int offset) {
|
private ApiDocNode createNodeCakeWord(FourCornerDotCake dotCake, int offset) {
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2004-2014, Willem Cazander
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||||
|
* that the following conditions are met:
|
||||||
|
*
|
||||||
|
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||||
|
* following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||||
|
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||||
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||||
|
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||||
|
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||||
|
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
package org.x4o.fc18.cake2.fcdoc;
|
||||||
|
|
||||||
|
import org.x4o.fc18.cake2.FourCornerDotCake;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cake slice doc model type.
|
||||||
|
*
|
||||||
|
* @author Willem Cazander
|
||||||
|
* @version 1.0 Jan 19, 2025
|
||||||
|
*/
|
||||||
|
public class TDocCakeSlice {
|
||||||
|
|
||||||
|
private final FourCornerDotCake slice;
|
||||||
|
|
||||||
|
public TDocCakeSlice(FourCornerDotCake slice) {
|
||||||
|
this.slice = slice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public FourCornerDotCake getSlice() {
|
||||||
|
return slice;
|
||||||
|
}
|
||||||
|
}
|
|
@ -43,7 +43,7 @@ import org.xml.sax.helpers.AttributesImpl;
|
||||||
public class ContentWriterHtml extends ContentWriterTagWrapper<ContentWriterHtml.Tag,ContentWriterXml> {
|
public class ContentWriterHtml extends ContentWriterTagWrapper<ContentWriterHtml.Tag,ContentWriterXml> {
|
||||||
|
|
||||||
public ContentWriterHtml(Writer out,String encoding) {
|
public ContentWriterHtml(Writer out,String encoding) {
|
||||||
super(new ContentWriterXml(out, encoding),"", XMLConstants.NULL_NS_URI);
|
super(new ContentWriterXml(out, encoding), "", XMLConstants.NULL_NS_URI);
|
||||||
}
|
}
|
||||||
|
|
||||||
public PropertyConfig getPropertyConfig() {
|
public PropertyConfig getPropertyConfig() {
|
||||||
|
@ -87,7 +87,7 @@ public class ContentWriterHtml extends ContentWriterTagWrapper<ContentWriterHtml
|
||||||
printTagStartEnd(Tag.meta, atts);
|
printTagStartEnd(Tag.meta, atts);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void printHeadMeta(String name,String content) throws IOException {
|
public void printHeadMeta(String name, String content) throws IOException {
|
||||||
AttributesImpl atts = new AttributesImpl();
|
AttributesImpl atts = new AttributesImpl();
|
||||||
atts.addAttribute("", "name", "", "", name);
|
atts.addAttribute("", "name", "", "", name);
|
||||||
atts.addAttribute("", "content", "", "", content);
|
atts.addAttribute("", "content", "", "", content);
|
||||||
|
@ -116,7 +116,7 @@ public class ContentWriterHtml extends ContentWriterTagWrapper<ContentWriterHtml
|
||||||
}
|
}
|
||||||
|
|
||||||
public void printScriptNoDiv(String text) throws IOException {
|
public void printScriptNoDiv(String text) throws IOException {
|
||||||
if (text==null) {
|
if (text == null) {
|
||||||
text = "JavaScript is disabled on your browser.";
|
text = "JavaScript is disabled on your browser.";
|
||||||
}
|
}
|
||||||
printTagStart(Tag.noscript);
|
printTagStart(Tag.noscript);
|
||||||
|
@ -132,31 +132,31 @@ public class ContentWriterHtml extends ContentWriterTagWrapper<ContentWriterHtml
|
||||||
printTagEnd(Tag.a);
|
printTagEnd(Tag.a);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void printHrefTarget(String href,String title,String target) throws IOException {
|
public void printHrefTarget(String href, String target, String text) throws IOException {
|
||||||
AttributesImpl atts = new AttributesImpl();
|
AttributesImpl atts = new AttributesImpl();
|
||||||
atts.addAttribute("", "href", "", "", href);
|
atts.addAttribute("", "href", "", "", href);
|
||||||
atts.addAttribute("", "target", "", "", target);
|
atts.addAttribute("", "target", "", "", target);
|
||||||
printTagStart(Tag.a,atts);
|
printTagStart(Tag.a,atts);
|
||||||
printCharacters(title);
|
printCharacters(text);
|
||||||
printTagEnd(Tag.a);
|
printTagEnd(Tag.a);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void printHref(String href,String title) throws IOException {
|
public void printHref(String href, String text) throws IOException {
|
||||||
printHref(href,title,title);
|
printHref(href, text, text);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void printHref(String href,String title,String text) throws IOException {
|
public void printHref(String href, String text, String title) throws IOException {
|
||||||
printHref(href,title,text,null);
|
printHref(href, text, title, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void printHref(String href,String title,String text,String spanClass) throws IOException {
|
public void printHref(String href, String text, String title, String spanClass) throws IOException {
|
||||||
AttributesImpl atts = new AttributesImpl();
|
AttributesImpl atts = new AttributesImpl();
|
||||||
atts.addAttribute("", "href", "", "", href);
|
atts.addAttribute("", "href", "", "", href);
|
||||||
if (title!=null) {
|
if (title != null) {
|
||||||
atts.addAttribute("", "title", "", "", title);
|
atts.addAttribute("", "title", "", "", title);
|
||||||
}
|
}
|
||||||
printTagStart(Tag.a,atts);
|
printTagStart(Tag.a,atts);
|
||||||
if (spanClass!=null) {
|
if (spanClass != null) {
|
||||||
atts = new AttributesImpl();
|
atts = new AttributesImpl();
|
||||||
if (spanClass.length()>0) {
|
if (spanClass.length()>0) {
|
||||||
atts.addAttribute("", "class", "", "", spanClass);
|
atts.addAttribute("", "class", "", "", spanClass);
|
||||||
|
@ -164,19 +164,19 @@ public class ContentWriterHtml extends ContentWriterTagWrapper<ContentWriterHtml
|
||||||
printTagStart(Tag.span,atts);
|
printTagStart(Tag.span,atts);
|
||||||
}
|
}
|
||||||
printCharacters(text);
|
printCharacters(text);
|
||||||
if (spanClass!=null) {
|
if (spanClass != null) {
|
||||||
printTagEnd(Tag.span);
|
printTagEnd(Tag.span);
|
||||||
}
|
}
|
||||||
printTagEnd(Tag.a);
|
printTagEnd(Tag.a);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void printTagCharacters(Tag tag,String text,String tagClass) throws IOException {
|
public void printTagCharacters(Tag tag, String text, String tagClass) throws IOException {
|
||||||
printTagCharacters(tag,text,tagClass,null);
|
printTagCharacters(tag, text, tagClass, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void printTagCharacters(Tag tag,String text,String tagClass,String tagId) throws IOException {
|
public void printTagCharacters(Tag tag, String text, String tagClass, String tagId) throws IOException {
|
||||||
printTagStart(tag,tagClass,tagId,null);
|
printTagStart(tag, tagClass, tagId, null);
|
||||||
if (text==null) {
|
if (text == null) {
|
||||||
text = " ";
|
text = " ";
|
||||||
}
|
}
|
||||||
printCharacters(text);
|
printCharacters(text);
|
||||||
|
@ -184,54 +184,54 @@ public class ContentWriterHtml extends ContentWriterTagWrapper<ContentWriterHtml
|
||||||
}
|
}
|
||||||
|
|
||||||
public ContentCloseable printTag(Tag tag, String tagClass) throws IOException {
|
public ContentCloseable printTag(Tag tag, String tagClass) throws IOException {
|
||||||
return printTag(tag,tagClass,null,null);
|
return printTag(tag, tagClass, null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ContentCloseable printTag(Tag tag, Enum<?> tagClassEnum) throws IOException {
|
public ContentCloseable printTag(Tag tag, Enum<?> tagClassEnum) throws IOException {
|
||||||
return printTag(tag,tagClassEnum,null);
|
return printTag(tag, tagClassEnum, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ContentCloseable printTag(Tag tag, Enum<?> tagClassEnum, String tagId) throws IOException {
|
public ContentCloseable printTag(Tag tag, Enum<?> tagClassEnum, String tagId) throws IOException {
|
||||||
return printTag(tag,tagClassEnum,tagId,null);
|
return printTag(tag, tagClassEnum, tagId, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ContentCloseable printTag(Tag tag, Enum<?> tagClassEnum, String tagId, String typeId) throws IOException {
|
public ContentCloseable printTag(Tag tag, Enum<?> tagClassEnum, String tagId, String typeId) throws IOException {
|
||||||
return printTag(tag,tagClassEnum.name(),tagId,typeId);
|
return printTag(tag, tagClassEnum.name(), tagId, typeId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ContentCloseable printTag(Tag tag, String tagClass, String tagId, String typeId) throws IOException {
|
public ContentCloseable printTag(Tag tag, String tagClass, String tagId, String typeId) throws IOException {
|
||||||
printTagStart(tag,tagClass,tagId,typeId);
|
printTagStart(tag, tagClass, tagId, typeId);
|
||||||
return () -> printTagEnd(tag);
|
return () -> printTagEnd(tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void printTagStart(Tag tag, String tagClass) throws IOException {
|
public void printTagStart(Tag tag, String tagClass) throws IOException {
|
||||||
printTagStart(tag,tagClass,null,null);
|
printTagStart(tag, tagClass, null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void printTagStart(Tag tag, Enum<?> tagClassEnum) throws IOException {
|
public void printTagStart(Tag tag, Enum<?> tagClassEnum) throws IOException {
|
||||||
printTagStart(tag,tagClassEnum,null);
|
printTagStart(tag, tagClassEnum, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void printTagStart(Tag tag, Enum<?> tagClassEnum, String tagId) throws IOException {
|
public void printTagStart(Tag tag, Enum<?> tagClassEnum, String tagId) throws IOException {
|
||||||
printTagStart(tag,tagClassEnum,tagId,null);
|
printTagStart(tag, tagClassEnum, tagId, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void printTagStart(Tag tag, Enum<?> tagClassEnum, String tagId, String typeId) throws IOException {
|
public void printTagStart(Tag tag, Enum<?> tagClassEnum, String tagId, String typeId) throws IOException {
|
||||||
printTagStart(tag,tagClassEnum.name(),tagId,typeId);
|
printTagStart(tag, tagClassEnum.name(), tagId, typeId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void printTagStart(Tag tag, String tagClass, String tagId, String typeId) throws IOException {
|
public void printTagStart(Tag tag, String tagClass, String tagId, String typeId) throws IOException {
|
||||||
AttributesImpl atts = new AttributesImpl();
|
AttributesImpl atts = new AttributesImpl();
|
||||||
if (tagId!=null && tagId.length()>0) {
|
if (tagId != null && tagId.length() > 0) {
|
||||||
atts.addAttribute("", "id", "", "", tagId);
|
atts.addAttribute("", "id", "", "", tagId);
|
||||||
}
|
}
|
||||||
if (tagClass!=null && tagClass.length()>0) {
|
if (tagClass != null && tagClass.length() > 0) {
|
||||||
atts.addAttribute("", "class", "", "", tagClass);
|
atts.addAttribute("", "class", "", "", tagClass);
|
||||||
}
|
}
|
||||||
if (typeId!=null && typeId.length()>0) {
|
if (typeId != null && typeId.length() > 0) {
|
||||||
atts.addAttribute("", "type", "", "", typeId);
|
atts.addAttribute("", "type", "", "", typeId);
|
||||||
}
|
}
|
||||||
printTagStart(tag,atts);
|
printTagStart(tag, atts);
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum Tag {
|
public enum Tag {
|
||||||
|
@ -263,7 +263,8 @@ public class ContentWriterHtml extends ContentWriterTagWrapper<ContentWriterHtml
|
||||||
datalist,keygen,output,
|
datalist,keygen,output,
|
||||||
article,aside,bdi,command,details,dialog,summary,
|
article,aside,bdi,command,details,dialog,summary,
|
||||||
figure,figcaption,footer,header,hgroup,mark,meter,
|
figure,figcaption,footer,header,hgroup,mark,meter,
|
||||||
nav,progress,ruby,rt,rp,section,time,wbr
|
nav,progress,ruby,rt,rp,section,time,wbr,
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
private final static String DOCTYPE_NAME = "HTML PUBLIC";
|
private final static String DOCTYPE_NAME = "HTML PUBLIC";
|
||||||
|
@ -279,28 +280,33 @@ public class ContentWriterHtml extends ContentWriterTagWrapper<ContentWriterHtml
|
||||||
XHTML_1_TRANSITIONAL(DOCTYPE_NAME,"\"-//W3C//DTD XHTML 1.0 Transitional//EN\"","http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"),
|
XHTML_1_TRANSITIONAL(DOCTYPE_NAME,"\"-//W3C//DTD XHTML 1.0 Transitional//EN\"","http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"),
|
||||||
XHTML_1_STRICT(DOCTYPE_NAME,"\"-//W3C//DTD XHTML 1.0 Strict//EN\"","http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"),
|
XHTML_1_STRICT(DOCTYPE_NAME,"\"-//W3C//DTD XHTML 1.0 Strict//EN\"","http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"),
|
||||||
|
|
||||||
XHTML_11(DOCTYPE_NAME,"\"-//W3C//DTD XHTML 1.1//EN\"","http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd");
|
XHTML_11(DOCTYPE_NAME,"\"-//W3C//DTD XHTML 1.1//EN\"","http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"),
|
||||||
|
;
|
||||||
|
|
||||||
private final String name;
|
private final String name;
|
||||||
private final String publicId;
|
private final String publicId;
|
||||||
private final String systemId;
|
private final String systemId;
|
||||||
|
|
||||||
private DocType(String name, String publicId, String systemId) {
|
private DocType(String name, String publicId, String systemId) {
|
||||||
this.name=name;
|
this.name=name;
|
||||||
this.publicId=publicId;
|
this.publicId=publicId;
|
||||||
this.systemId=systemId;
|
this.systemId=systemId;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the name
|
* @return the name
|
||||||
*/
|
*/
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the publicId
|
* @return the publicId
|
||||||
*/
|
*/
|
||||||
public String getPublicId() {
|
public String getPublicId() {
|
||||||
return publicId;
|
return publicId;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the systemId
|
* @return the systemId
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -35,10 +35,10 @@ import java.io.IOException;
|
||||||
@FunctionalInterface
|
@FunctionalInterface
|
||||||
public interface ContentCloseable extends Closeable {
|
public interface ContentCloseable extends Closeable {
|
||||||
|
|
||||||
void closeTag() throws IOException;
|
void closeContent() throws IOException;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
default void close() throws IOException {
|
default void close() throws IOException {
|
||||||
closeTag();
|
closeContent(); // wrap for stack trace users
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,13 +46,13 @@ public class ContentWriterTagWrapper<TAG extends Enum<?>,TAG_WRITER extends Cont
|
||||||
}
|
}
|
||||||
|
|
||||||
public ContentWriterTagWrapper(TAG_WRITER contentWriter, String tagNamespaceUri, String tagNamespacePrefix) {
|
public ContentWriterTagWrapper(TAG_WRITER contentWriter, String tagNamespaceUri, String tagNamespacePrefix) {
|
||||||
if (contentWriter==null) {
|
if (contentWriter == null) {
|
||||||
throw new NullPointerException("Can't create wrapper on null ContentWriter");
|
throw new NullPointerException("Can't create wrapper on null ContentWriter");
|
||||||
}
|
}
|
||||||
if (tagNamespaceUri==null) {
|
if (tagNamespaceUri == null) {
|
||||||
throw new NullPointerException("Can't create wrapper with null tagNamespaceUri");
|
throw new NullPointerException("Can't create wrapper with null tagNamespaceUri");
|
||||||
}
|
}
|
||||||
if (tagNamespacePrefix==null) {
|
if (tagNamespacePrefix == null) {
|
||||||
throw new NullPointerException("Can't create wrapper with null tagNamespacePrefix");
|
throw new NullPointerException("Can't create wrapper with null tagNamespacePrefix");
|
||||||
}
|
}
|
||||||
this.contentWriter=contentWriter;
|
this.contentWriter=contentWriter;
|
||||||
|
@ -110,7 +110,7 @@ public class ContentWriterTagWrapper<TAG extends Enum<?>,TAG_WRITER extends Cont
|
||||||
|
|
||||||
public void printTagStart(TAG tag, Attributes atts) throws IOException {
|
public void printTagStart(TAG tag, Attributes atts) throws IOException {
|
||||||
try {
|
try {
|
||||||
contentWriter.startElement (getTagNamespaceUri(), toTagString(tag), "", atts);
|
contentWriter.startElement(getTagNamespaceUri(), toTagString(tag), "", atts);
|
||||||
} catch (SAXException e) {
|
} catch (SAXException e) {
|
||||||
throw new IOException(e);
|
throw new IOException(e);
|
||||||
}
|
}
|
||||||
|
@ -118,7 +118,7 @@ public class ContentWriterTagWrapper<TAG extends Enum<?>,TAG_WRITER extends Cont
|
||||||
|
|
||||||
public void printTagEnd(TAG tag) throws IOException {
|
public void printTagEnd(TAG tag) throws IOException {
|
||||||
try {
|
try {
|
||||||
contentWriter.endElement (getTagNamespaceUri(),toTagString(tag) , "");
|
contentWriter.endElement(getTagNamespaceUri(),toTagString(tag) , "");
|
||||||
} catch (SAXException e) {
|
} catch (SAXException e) {
|
||||||
throw new IOException(e);
|
throw new IOException(e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -170,7 +170,7 @@ public interface ApiDocContentPrinter {
|
||||||
if (remoteUrl==null) {
|
if (remoteUrl==null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
writer.printHref(remoteUrl, cls.getName(), cls.getSimpleName());
|
writer.printHref(remoteUrl, cls.getSimpleName(), cls.getName());
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,15 +42,15 @@ public class ApiDocContentWriter extends ContentWriterHtml {
|
||||||
|
|
||||||
private boolean isRowAlt = false;
|
private boolean isRowAlt = false;
|
||||||
|
|
||||||
public ApiDocContentWriter(Writer out,String encoding) {
|
public ApiDocContentWriter(Writer out, String encoding) {
|
||||||
super(out,encoding);
|
super(out,encoding);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void docCommentGenerated() throws IOException {
|
public void docCommentGenerated() throws IOException {
|
||||||
printComment("Generated by "+ApiDocContentWriter.class.getSimpleName()+" on "+new Date());
|
printComment("Generated by " + ApiDocContentWriter.class.getSimpleName( )+ " on " + new Date());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void docHtmlStart(String title,List<String> keywords,String pathPrefix) throws IOException {
|
public void docHtmlStart(String title,List<String> keywords, String pathPrefix) throws IOException {
|
||||||
printDocType(DocType.HTML_4_TRANSITIONAL);
|
printDocType(DocType.HTML_4_TRANSITIONAL);
|
||||||
printComment("NewPage");
|
printComment("NewPage");
|
||||||
printHtmlStart("en");
|
printHtmlStart("en");
|
||||||
|
@ -61,8 +61,8 @@ public class ApiDocContentWriter extends ContentWriterHtml {
|
||||||
printHeadMetaContentType();
|
printHeadMetaContentType();
|
||||||
printHeadTitle(title);
|
printHeadTitle(title);
|
||||||
printHeadMetaDate();
|
printHeadMetaDate();
|
||||||
for (String keyword:keywords) {
|
for (String keyword : keywords) {
|
||||||
printHeadMeta("keywords",keyword);
|
printHeadMeta("keywords", keyword);
|
||||||
}
|
}
|
||||||
printHeadLinkCss(pathPrefix+"resources/stylesheet.css");
|
printHeadLinkCss(pathPrefix+"resources/stylesheet.css");
|
||||||
printTagEnd(Tag.head);
|
printTagEnd(Tag.head);
|
||||||
|
@ -79,13 +79,13 @@ public class ApiDocContentWriter extends ContentWriterHtml {
|
||||||
printScriptNoDiv();
|
printScriptNoDiv();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void docHtmlEnd(String copyright,String statsJS) throws IOException {
|
public void docHtmlEnd(String copyright, String statsJS) throws IOException {
|
||||||
printTagStart(Tag.p,ApiDocContentCss.legalCopy);
|
printTagStart(Tag.p,ApiDocContentCss.legalCopy);
|
||||||
printTagStart(Tag.small);
|
printTagStart(Tag.small);
|
||||||
printCharacters(copyright);
|
printCharacters(copyright);
|
||||||
printTagEnd(Tag.small);
|
printTagEnd(Tag.small);
|
||||||
printTagEnd(Tag.p);
|
printTagEnd(Tag.p);
|
||||||
if (statsJS!=null) {
|
if (statsJS != null) {
|
||||||
printScriptInline(statsJS);
|
printScriptInline(statsJS);
|
||||||
}
|
}
|
||||||
printTagEnd(Tag.body);
|
printTagEnd(Tag.body);
|
||||||
|
@ -97,10 +97,10 @@ public class ApiDocContentWriter extends ContentWriterHtml {
|
||||||
printTagStart(Tag.em);
|
printTagStart(Tag.em);
|
||||||
printTagStart(Tag.strong);
|
printTagStart(Tag.strong);
|
||||||
String[] lines = about.split("\n");
|
String[] lines = about.split("\n");
|
||||||
for (int i=0;i<lines.length;i++) {
|
for (int i = 0; i < lines.length; i++) {
|
||||||
String line = lines[i];
|
String line = lines[i];
|
||||||
printCharacters(line);
|
printCharacters(line);
|
||||||
if (i<lines.length-1) {
|
if (i < lines.length - 1) {
|
||||||
printTagStartEnd(Tag.br);
|
printTagStartEnd(Tag.br);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -109,7 +109,7 @@ public class ApiDocContentWriter extends ContentWriterHtml {
|
||||||
printTagEnd(Tag.div);
|
printTagEnd(Tag.div);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void docPagePackageTitle(String title,String summary) throws IOException {
|
public void docPagePackageTitle(String title, String summary) throws IOException {
|
||||||
printTagStart(Tag.div,ApiDocContentCss.header);
|
printTagStart(Tag.div,ApiDocContentCss.header);
|
||||||
printTagCharacters(Tag.h1, title,"title");
|
printTagCharacters(Tag.h1, title,"title");
|
||||||
printTagStart(Tag.div,ApiDocContentCss.docSummary);
|
printTagStart(Tag.div,ApiDocContentCss.docSummary);
|
||||||
|
@ -122,17 +122,17 @@ public class ApiDocContentWriter extends ContentWriterHtml {
|
||||||
printTagEnd(Tag.div);
|
printTagEnd(Tag.div);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void docPagePackageDescription(String title,String summary,String description) throws IOException {
|
public void docPagePackageDescription(String title, String summary, String description) throws IOException {
|
||||||
printHrefNamed("package_description");
|
printHrefNamed("package_description");
|
||||||
printTagCharacters(Tag.h2, title);
|
printTagCharacters(Tag.h2, title);
|
||||||
printTagCharacters(Tag.div, summary,ApiDocContentCss.block.name());
|
printTagCharacters(Tag.div, summary,ApiDocContentCss.block.name());
|
||||||
printCharacters(description);
|
printCharacters(description);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void docPageClassStart(String title,String subTitle,Tag titleTag) throws IOException {
|
public void docPageClassStart(String title, String subTitle, Tag titleTag) throws IOException {
|
||||||
printComment("======== START OF CLASS DATA ========");
|
printComment("======== START OF CLASS DATA ========");
|
||||||
printTagStart(Tag.div,ApiDocContentCss.header);
|
printTagStart(Tag.div,ApiDocContentCss.header);
|
||||||
if (subTitle!=null) {
|
if (subTitle != null) {
|
||||||
printTagStart(Tag.div,ApiDocContentCss.subTitle);
|
printTagStart(Tag.div,ApiDocContentCss.subTitle);
|
||||||
printCharacters(subTitle);
|
printCharacters(subTitle);
|
||||||
printTagEnd(Tag.div);
|
printTagEnd(Tag.div);
|
||||||
|
@ -158,8 +158,8 @@ public class ApiDocContentWriter extends ContentWriterHtml {
|
||||||
printTagEnd(Tag.div);
|
printTagEnd(Tag.div);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void docPageBlockStart(String title,String namedLink,String comment) throws IOException {
|
public void docPageBlockStart(String title, String namedLink, String comment) throws IOException {
|
||||||
if (comment!=null) {
|
if (comment != null) {
|
||||||
printComment(comment);
|
printComment(comment);
|
||||||
}
|
}
|
||||||
docPageBlockStart();
|
docPageBlockStart();
|
||||||
|
@ -193,11 +193,11 @@ public class ApiDocContentWriter extends ContentWriterHtml {
|
||||||
if (tableCss != null) {
|
if (tableCss != null) {
|
||||||
atts.addAttribute ("", "class", "", "", tableCss.name());
|
atts.addAttribute ("", "class", "", "", tableCss.name());
|
||||||
}
|
}
|
||||||
atts.addAttribute ("", "border", "", "", "0");
|
atts.addAttribute("", "border", "", "", "0");
|
||||||
atts.addAttribute ("", "cellpadding", "", "", "3");
|
atts.addAttribute("", "cellpadding", "", "", "3");
|
||||||
atts.addAttribute ("", "cellspacing", "", "", "0");
|
atts.addAttribute("", "cellspacing", "", "", "0");
|
||||||
if (tableDescription != null) {
|
if (tableDescription != null) {
|
||||||
atts.addAttribute ("", "summary", "", "", tableDescription);
|
atts.addAttribute("", "summary", "", "", tableDescription);
|
||||||
}
|
}
|
||||||
printTagStart(Tag.table,atts);
|
printTagStart(Tag.table,atts);
|
||||||
|
|
||||||
|
@ -211,45 +211,45 @@ public class ApiDocContentWriter extends ContentWriterHtml {
|
||||||
printTagEnd(Tag.table);
|
printTagEnd(Tag.table);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void docTableHeader(String titleFirst,String titleLast) throws IOException {
|
public void docTableHeader(String titleFirst, String titleLast) throws IOException {
|
||||||
printTagStart(Tag.tr);
|
printTagStart(Tag.tr);
|
||||||
AttributesImpl atts = new AttributesImpl();
|
AttributesImpl atts = new AttributesImpl();
|
||||||
if (titleLast==null) {
|
if (titleLast == null) {
|
||||||
atts.addAttribute ("", "class", "", "", ApiDocContentCss.colOne.name());
|
atts.addAttribute("", "class", "", "", ApiDocContentCss.colOne.name());
|
||||||
} else {
|
} else {
|
||||||
atts.addAttribute ("", "class", "", "", ApiDocContentCss.colFirst.name());
|
atts.addAttribute("", "class", "", "", ApiDocContentCss.colFirst.name());
|
||||||
}
|
}
|
||||||
atts.addAttribute ("", "scope", "", "", "col");
|
atts.addAttribute("", "scope", "", "", "col");
|
||||||
printTagStart(Tag.th,atts);
|
printTagStart(Tag.th,atts);
|
||||||
printCharacters(titleFirst);
|
printCharacters(titleFirst);
|
||||||
printTagEnd(Tag.th);
|
printTagEnd(Tag.th);
|
||||||
if (titleLast==null) {
|
if (titleLast == null) {
|
||||||
printTagEnd(Tag.tr);
|
printTagEnd(Tag.tr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
atts = new AttributesImpl();
|
atts = new AttributesImpl();
|
||||||
atts.addAttribute ("", "class", "", "", ApiDocContentCss.colLast.name());
|
atts.addAttribute("", "class", "", "", ApiDocContentCss.colLast.name());
|
||||||
atts.addAttribute ("", "scope", "", "", "col");
|
atts.addAttribute("", "scope", "", "", "col");
|
||||||
printTagStart(Tag.th,atts);
|
printTagStart(Tag.th,atts);
|
||||||
printCharacters(titleLast);
|
printCharacters(titleLast);
|
||||||
printTagEnd(Tag.th);
|
printTagEnd(Tag.th);
|
||||||
printTagEnd(Tag.tr);
|
printTagEnd(Tag.tr);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void docTableRowLink(String dataFirstHref,String dataFirst,String dataLast) throws IOException {
|
public void docTableRowLink(String dataFirstHref, String dataFirst, String dataLast) throws IOException {
|
||||||
docTableRowHref(dataFirstHref,dataFirst,dataLast,null,false,false,false);
|
docTableRowHref(dataFirstHref, dataFirst, dataLast, null, false, false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void docTableRow(String dataFirst,String dataLast) throws IOException {
|
public void docTableRow(String dataFirst, String dataLast) throws IOException {
|
||||||
docTableRow(dataFirst,dataLast,null);
|
docTableRow(dataFirst, dataLast, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void docTableRow(String dataFirst,String dataLast,String dataBlock) throws IOException {
|
public void docTableRow(String dataFirst, String dataLast, String dataBlock) throws IOException {
|
||||||
docTableRowHref(null,dataFirst,dataLast,dataBlock,false,false,false);
|
docTableRowHref(null, dataFirst, dataLast, dataBlock, false, false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void docTableRowLastStart(String dataFirst,String dataFirstHref) throws IOException {
|
public void docTableRowLastStart(String dataFirst, String dataFirstHref) throws IOException {
|
||||||
docTableRowHref(dataFirstHref,dataFirst,null,null,false,false,true);
|
docTableRowHref(dataFirstHref, dataFirst, null, null, false, false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void docTableRowLastEnd() throws IOException {
|
public void docTableRowLastEnd() throws IOException {
|
||||||
|
@ -267,9 +267,9 @@ public class ApiDocContentWriter extends ContentWriterHtml {
|
||||||
return () -> printTagEnd(Tag.tr);
|
return () -> printTagEnd(Tag.tr);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void docTableRowHref(String dataFirstHref,String dataFirst,String dataLast,String dataBlock,boolean dataFirstCode,boolean dataLastCode,boolean skipLast) throws IOException {
|
private void docTableRowHref(String dataFirstHref, String dataFirst, String dataLast, String dataBlock, boolean dataFirstCode, boolean dataLastCode, boolean skipLast) throws IOException {
|
||||||
Closeable tableRow = docTableRow();
|
Closeable tableRow = docTableRow();
|
||||||
if (dataLast==null) {
|
if (dataLast == null) {
|
||||||
printTagStart(Tag.td,ApiDocContentCss.colOne);
|
printTagStart(Tag.td,ApiDocContentCss.colOne);
|
||||||
} else {
|
} else {
|
||||||
printTagStart(Tag.td,ApiDocContentCss.colFirst);
|
printTagStart(Tag.td,ApiDocContentCss.colFirst);
|
||||||
|
@ -277,7 +277,7 @@ public class ApiDocContentWriter extends ContentWriterHtml {
|
||||||
if (dataFirstCode) {
|
if (dataFirstCode) {
|
||||||
printTagStart(Tag.code);
|
printTagStart(Tag.code);
|
||||||
}
|
}
|
||||||
if (dataFirstHref==null) {
|
if (dataFirstHref == null) {
|
||||||
printCharacters(dataFirst);
|
printCharacters(dataFirst);
|
||||||
} else {
|
} else {
|
||||||
printHref(dataFirstHref, dataFirst, dataFirst);
|
printHref(dataFirstHref, dataFirst, dataFirst);
|
||||||
|
@ -292,7 +292,7 @@ public class ApiDocContentWriter extends ContentWriterHtml {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dataLast==null) {
|
if (dataLast == null) {
|
||||||
printTagEnd(Tag.tr);
|
printTagEnd(Tag.tr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -303,7 +303,7 @@ public class ApiDocContentWriter extends ContentWriterHtml {
|
||||||
} else {
|
} else {
|
||||||
printTagStart(Tag.div,ApiDocContentCss.block);printCharacters(dataLast);printTagEnd(Tag.div);
|
printTagStart(Tag.div,ApiDocContentCss.block);printCharacters(dataLast);printTagEnd(Tag.div);
|
||||||
}
|
}
|
||||||
if (dataBlock!=null) {
|
if (dataBlock != null) {
|
||||||
printTagStart(Tag.div,ApiDocContentCss.block);printCharacters(dataBlock);printTagEnd(Tag.div);
|
printTagStart(Tag.div,ApiDocContentCss.block);printCharacters(dataBlock);printTagEnd(Tag.div);
|
||||||
}
|
}
|
||||||
printTagEnd(Tag.td);
|
printTagEnd(Tag.td);
|
||||||
|
@ -318,10 +318,10 @@ public class ApiDocContentWriter extends ContentWriterHtml {
|
||||||
|
|
||||||
static public String toSafeUri(String...paths) {
|
static public String toSafeUri(String...paths) {
|
||||||
StringBuilder result = new StringBuilder(100);
|
StringBuilder result = new StringBuilder(100);
|
||||||
for (int i=0;i<paths.length;i++) {
|
for (int i = 0; i < paths.length; i++) {
|
||||||
String path=paths[i];
|
String path = paths[i];
|
||||||
result.append(toSafeUri(path));
|
result.append(toSafeUri(path));
|
||||||
if (i<(paths.length-1)) {
|
if (i < (paths.length -1)) {
|
||||||
result.append('/');
|
result.append('/');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -330,7 +330,7 @@ public class ApiDocContentWriter extends ContentWriterHtml {
|
||||||
|
|
||||||
static public String toSafeUri(String uri) {
|
static public String toSafeUri(String uri) {
|
||||||
StringBuilder buf = new StringBuilder(20);
|
StringBuilder buf = new StringBuilder(20);
|
||||||
for (char c:uri.toLowerCase().toCharArray()) {
|
for (char c : uri.toLowerCase().toCharArray()) { // TODO: unicode 16+ error
|
||||||
if (Character.isLetter(c)) {
|
if (Character.isLetter(c)) {
|
||||||
buf.append(c);
|
buf.append(c);
|
||||||
}
|
}
|
||||||
|
|
|
@ -165,9 +165,8 @@ public class ApiDocGenerator implements ApiDocContentPrinter {
|
||||||
if (isNodePageMode) {
|
if (isNodePageMode) {
|
||||||
writer.docPageClassStart(titleContent, null,Tag.h1);
|
writer.docPageClassStart(titleContent, null,Tag.h1);
|
||||||
} else {
|
} else {
|
||||||
writer.docPageClassStart(titleContent, titleNodeSub,Tag.h2);
|
writer.docPageClassStart(titleContent, titleNodeSub,Tag.h2);
|
||||||
}
|
}
|
||||||
|
|
||||||
writer.docPageContentStart();
|
writer.docPageContentStart();
|
||||||
if (!isNodePageMode) {
|
if (!isNodePageMode) {
|
||||||
writeNodeTreePath(bodyEvent);
|
writeNodeTreePath(bodyEvent);
|
||||||
|
@ -216,7 +215,7 @@ public class ApiDocGenerator implements ApiDocContentPrinter {
|
||||||
ApiDocContentWriter writer = event.getWriter();
|
ApiDocContentWriter writer = event.getWriter();
|
||||||
List<ApiDocNodeWriter> bodyWriterDescriptionLinks = findNodeBodyWriters(event.getEventObject(),ApiDocNodeBody.DESCRIPTION_LINKS);
|
List<ApiDocNodeWriter> bodyWriterDescriptionLinks = findNodeBodyWriters(event.getEventObject(),ApiDocNodeBody.DESCRIPTION_LINKS);
|
||||||
List<ApiDocNodeWriter> bodyWriterDescriptionNode = findNodeBodyWriters(event.getEventObject(),ApiDocNodeBody.DESCRIPTION_NODE);
|
List<ApiDocNodeWriter> bodyWriterDescriptionNode = findNodeBodyWriters(event.getEventObject(),ApiDocNodeBody.DESCRIPTION_NODE);
|
||||||
writer.printTagStart(Tag.div, ApiDocContentCss.description);
|
//writer.printTagStart(Tag.div, ApiDocContentCss.description);
|
||||||
writer.docPageBlockStart();
|
writer.docPageBlockStart();
|
||||||
if (isPageMode==false) {
|
if (isPageMode==false) {
|
||||||
if (bodyWriterDescriptionLinks.isEmpty()) {
|
if (bodyWriterDescriptionLinks.isEmpty()) {
|
||||||
|
@ -224,20 +223,39 @@ public class ApiDocGenerator implements ApiDocContentPrinter {
|
||||||
}
|
}
|
||||||
for (int i=0;i<bodyWriterDescriptionLinks.size();i++) {
|
for (int i=0;i<bodyWriterDescriptionLinks.size();i++) {
|
||||||
ApiDocNodeWriter nodeWriter = bodyWriterDescriptionLinks.get(i);
|
ApiDocNodeWriter nodeWriter = bodyWriterDescriptionLinks.get(i);
|
||||||
|
writer.printTagStart(Tag.div, ApiDocContentCss.description);
|
||||||
nodeWriter.writeNodeContent(event);
|
nodeWriter.writeNodeContent(event);
|
||||||
|
writer.printTagEnd(Tag.div);
|
||||||
|
if (i+1<bodyWriterDescriptionLinks.size()) {
|
||||||
|
writer.printTagStart(Tag.div, ApiDocContentCss.description);
|
||||||
|
writer.printCharacters(" ");
|
||||||
|
writer.printTagEnd(Tag.div);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
writer.printTagStartEnd(Tag.hr);
|
writer.printTagStartEnd(Tag.hr);
|
||||||
writer.printTagStartEnd(Tag.br); // mmm
|
writer.printTagStart(Tag.div, ApiDocContentCss.description);
|
||||||
|
writer.printCharacters(" ");
|
||||||
|
writer.printTagEnd(Tag.div);
|
||||||
|
//writer.printTagStartEnd(Tag.br); // mmm
|
||||||
}
|
}
|
||||||
if (bodyWriterDescriptionNode.isEmpty()) {
|
if (bodyWriterDescriptionNode.isEmpty()) {
|
||||||
|
writer.printTagStart(Tag.div, ApiDocContentCss.description);
|
||||||
defaultWriteNodeDescription(event);
|
defaultWriteNodeDescription(event);
|
||||||
|
writer.printTagEnd(Tag.div);
|
||||||
}
|
}
|
||||||
for (int i=0;i<bodyWriterDescriptionNode.size();i++) {
|
for (int i=0;i<bodyWriterDescriptionNode.size();i++) {
|
||||||
ApiDocNodeWriter nodeWriter = bodyWriterDescriptionNode.get(i);
|
ApiDocNodeWriter nodeWriter = bodyWriterDescriptionNode.get(i);
|
||||||
|
writer.printTagStart(Tag.div, ApiDocContentCss.description);
|
||||||
nodeWriter.writeNodeContent(event);
|
nodeWriter.writeNodeContent(event);
|
||||||
|
writer.printTagEnd(Tag.div);
|
||||||
|
if (i+1<bodyWriterDescriptionNode.size()) {
|
||||||
|
writer.printTagStart(Tag.div, ApiDocContentCss.description);
|
||||||
|
writer.printCharacters(" ");
|
||||||
|
writer.printTagEnd(Tag.div);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
writer.docPageBlockEnd();
|
writer.docPageBlockEnd();
|
||||||
writer.printTagEnd(Tag.div); // description
|
//writer.printTagEnd(Tag.div); // description
|
||||||
}
|
}
|
||||||
|
|
||||||
private void writeNodeSummary(ApiDocWriteEvent<ApiDocNode> event,boolean isPageMode) throws IOException {
|
private void writeNodeSummary(ApiDocWriteEvent<ApiDocNode> event,boolean isPageMode) throws IOException {
|
||||||
|
@ -427,7 +445,7 @@ public class ApiDocGenerator implements ApiDocContentPrinter {
|
||||||
ApiDocConcept concept = doc.findConceptByClass(node.getUserData().getClass());
|
ApiDocConcept concept = doc.findConceptByClass(node.getUserData().getClass());
|
||||||
linkHref = buf+"../overview-"+concept.getId()+".html";
|
linkHref = buf+"../overview-"+concept.getId()+".html";
|
||||||
}
|
}
|
||||||
writer.printHref(linkHref, node.getDescription(), nodeTitle);
|
writer.printHref(linkHref, nodeTitle, node.getDescription());
|
||||||
writer.printTagEnd(Tag.li);
|
writer.printTagEnd(Tag.li);
|
||||||
|
|
||||||
writer.printTagStart(Tag.li);
|
writer.printTagStart(Tag.li);
|
||||||
|
@ -720,7 +738,7 @@ public class ApiDocGenerator implements ApiDocContentPrinter {
|
||||||
writer.printTagStart(Tag.body);
|
writer.printTagStart(Tag.body);
|
||||||
|
|
||||||
writer.printTagStart(Tag.div,ApiDocContentCss.indexHeader);
|
writer.printTagStart(Tag.div,ApiDocContentCss.indexHeader);
|
||||||
writer.printHrefTarget("all"+concept.getId()+"-frame.html", "All "+conceptPlural,ApiDocContentCss.frameNavDetail.name());
|
writer.printHrefTarget("all"+concept.getId()+"-frame.html", ApiDocContentCss.frameNavDetail.name(), "All " + conceptPlural);
|
||||||
writer.printTagEnd(Tag.div);
|
writer.printTagEnd(Tag.div);
|
||||||
|
|
||||||
writer.printTagStart(Tag.div,ApiDocContentCss.indexContainer);
|
writer.printTagStart(Tag.div,ApiDocContentCss.indexContainer);
|
||||||
|
@ -747,7 +765,7 @@ public class ApiDocGenerator implements ApiDocContentPrinter {
|
||||||
buf.append("/");
|
buf.append("/");
|
||||||
buf.append(ApiDocContentWriter.toSafeUri(node.getId()));
|
buf.append(ApiDocContentWriter.toSafeUri(node.getId()));
|
||||||
buf.append("-frame.html");
|
buf.append("-frame.html");
|
||||||
writer.printHrefTarget(buf.toString(), linkName, ApiDocContentCss.frameNavDetail.name());
|
writer.printHrefTarget(buf.toString(), ApiDocContentCss.frameNavDetail.name(), linkName);
|
||||||
writer.printTagEnd(Tag.li);
|
writer.printTagEnd(Tag.li);
|
||||||
}
|
}
|
||||||
writer.printTagEnd(Tag.ul);
|
writer.printTagEnd(Tag.ul);
|
||||||
|
@ -806,7 +824,7 @@ public class ApiDocGenerator implements ApiDocContentPrinter {
|
||||||
writer.printTagCharacters(Tag.h1, "All "+conceptPlural, "bar");
|
writer.printTagCharacters(Tag.h1, "All "+conceptPlural, "bar");
|
||||||
} else {
|
} else {
|
||||||
writer.printTagStart(Tag.h1,ApiDocContentCss.bar);
|
writer.printTagStart(Tag.h1,ApiDocContentCss.bar);
|
||||||
writer.printHrefTarget("index.html", searchNode.getId(),ApiDocContentCss.frameContent.name());
|
writer.printHrefTarget("index.html", ApiDocContentCss.frameContent.name(), searchNode.getId());
|
||||||
writer.printTagEnd(Tag.h1);
|
writer.printTagEnd(Tag.h1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -854,7 +872,7 @@ public class ApiDocGenerator implements ApiDocContentPrinter {
|
||||||
}
|
}
|
||||||
writer.printTagStart(Tag.li);
|
writer.printTagStart(Tag.li);
|
||||||
if (isFrame) {
|
if (isFrame) {
|
||||||
writer.printHrefTarget(linkUrl, linkName,ApiDocContentCss.frameContent.name());
|
writer.printHrefTarget(linkUrl, ApiDocContentCss.frameContent.name(), linkName);
|
||||||
} else {
|
} else {
|
||||||
writer.printHref(linkUrl, linkName);
|
writer.printHref(linkUrl, linkName);
|
||||||
}
|
}
|
||||||
|
@ -1062,10 +1080,10 @@ public class ApiDocGenerator implements ApiDocContentPrinter {
|
||||||
if (conf.getFramePath()!=null) {
|
if (conf.getFramePath()!=null) {
|
||||||
writer.printTagStart(Tag.ul,ApiDocContentCss.navList);
|
writer.printTagStart(Tag.ul,ApiDocContentCss.navList);
|
||||||
writer.printTagStart(Tag.li);
|
writer.printTagStart(Tag.li);
|
||||||
writer.printHrefTarget(pathPrefix+"index.html?"+conf.getFramePath(), "Frames", "_top");
|
writer.printHrefTarget(pathPrefix+"index.html?"+conf.getFramePath(), "_top", "Frames");
|
||||||
writer.printTagEnd(Tag.li);
|
writer.printTagEnd(Tag.li);
|
||||||
writer.printTagStart(Tag.li);
|
writer.printTagStart(Tag.li);
|
||||||
writer.printHrefTarget(pathPrefix+conf.getFramePath(), "No Frames", "_top");
|
writer.printHrefTarget(pathPrefix+conf.getFramePath(), "_top", "No Frames");
|
||||||
writer.printTagEnd(Tag.li);
|
writer.printTagEnd(Tag.li);
|
||||||
writer.printTagEnd(Tag.ul);
|
writer.printTagEnd(Tag.ul);
|
||||||
}
|
}
|
||||||
|
@ -1132,9 +1150,9 @@ public class ApiDocGenerator implements ApiDocContentPrinter {
|
||||||
writer.printComment("========= END OF "+barComment+" NAVBAR =======");
|
writer.printComment("========= END OF "+barComment+" NAVBAR =======");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void docNavBarListItemHref(ApiDocContentWriter writer,String href,String title,String text,String cssClass,String spanCss,String linkSpace) throws IOException {
|
private void docNavBarListItemHref(ApiDocContentWriter writer, String href, String title, String text, String cssClass, String spanCss, String linkSpace) throws IOException {
|
||||||
writer.printTagStart(Tag.li,cssClass);
|
writer.printTagStart(Tag.li, cssClass);
|
||||||
writer.printHref(href,title,text,spanCss);
|
writer.printHref(href, text, title, spanCss);
|
||||||
writer.printCharacters(linkSpace);
|
writer.printCharacters(linkSpace);
|
||||||
writer.printTagEnd(Tag.li);
|
writer.printTagEnd(Tag.li);
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,6 +69,11 @@ public class ApiDocNode {
|
||||||
return nodes;
|
return nodes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public <T> T toUserData(Class<T> type) {
|
||||||
|
return (T)getUserData();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the userData
|
* @return the userData
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue