Added muffin table on first few pages of cake slices
This commit is contained in:
parent
30ab39395d
commit
e26a4e2a5e
|
@ -42,6 +42,7 @@ import org.x4o.o2o.io.sax3.ContentCloseable;
|
||||||
import org.x4o.o2o.tdoc.ApiDocContentCss;
|
import org.x4o.o2o.tdoc.ApiDocContentCss;
|
||||||
import org.x4o.o2o.tdoc.ApiDocContentWriter;
|
import org.x4o.o2o.tdoc.ApiDocContentWriter;
|
||||||
import org.x4o.o2o.tdoc.dom.ApiDocPage;
|
import org.x4o.o2o.tdoc.dom.ApiDocPage;
|
||||||
|
import org.x4o.o2o.tdoc.dom.ApiDocPageWriter;
|
||||||
import org.x4o.o2o.tdoc.dom.ApiDocWriteEvent;
|
import org.x4o.o2o.tdoc.dom.ApiDocWriteEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -50,7 +51,7 @@ import org.x4o.o2o.tdoc.dom.ApiDocWriteEvent;
|
||||||
* @author Willem Cazander
|
* @author Willem Cazander
|
||||||
* @version 1.0 Jan 17, 2025
|
* @version 1.0 Jan 17, 2025
|
||||||
*/
|
*/
|
||||||
public class FCDocPageWriterBaklava implements FCDocPageWriter {
|
public class FCDocPageWriterBaklava implements ApiDocPageWriter, FCDocSegmentWriter {
|
||||||
|
|
||||||
public static ApiDocPage createDocPage() {
|
public static ApiDocPage createDocPage() {
|
||||||
return new ApiDocPage("overview-baklave","Baklava","Overview of all 6 bit baklava NCR1632 fractions.",new FCDocPageWriterBaklava());
|
return new ApiDocPage("overview-baklave","Baklava","Overview of all 6 bit baklava NCR1632 fractions.",new FCDocPageWriterBaklava());
|
||||||
|
|
|
@ -30,6 +30,7 @@ import org.x4o.o2o.io.sax3.ContentCloseable;
|
||||||
import org.x4o.o2o.tdoc.ApiDocContentCss;
|
import org.x4o.o2o.tdoc.ApiDocContentCss;
|
||||||
import org.x4o.o2o.tdoc.ApiDocContentWriter;
|
import org.x4o.o2o.tdoc.ApiDocContentWriter;
|
||||||
import org.x4o.o2o.tdoc.dom.ApiDocPage;
|
import org.x4o.o2o.tdoc.dom.ApiDocPage;
|
||||||
|
import org.x4o.o2o.tdoc.dom.ApiDocPageWriter;
|
||||||
import org.x4o.o2o.tdoc.dom.ApiDocWriteEvent;
|
import org.x4o.o2o.tdoc.dom.ApiDocWriteEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -38,7 +39,7 @@ import org.x4o.o2o.tdoc.dom.ApiDocWriteEvent;
|
||||||
* @author Willem Cazander
|
* @author Willem Cazander
|
||||||
* @version 1.0 Jan 17, 2025
|
* @version 1.0 Jan 17, 2025
|
||||||
*/
|
*/
|
||||||
public class FCDocPageWriterCakeTower implements FCDocPageWriter {
|
public class FCDocPageWriterCakeTower implements ApiDocPageWriter, FCDocSegmentWriter {
|
||||||
|
|
||||||
public static ApiDocPage createDocPage() {
|
public static ApiDocPage createDocPage() {
|
||||||
return new ApiDocPage("overview-tower","Tower","Overview of the cake tower.",new FCDocPageWriterCakeTower());
|
return new ApiDocPage("overview-tower","Tower","Overview of the cake tower.",new FCDocPageWriterCakeTower());
|
||||||
|
@ -77,10 +78,10 @@ public class FCDocPageWriterCakeTower implements FCDocPageWriter {
|
||||||
try (ContentCloseable td = writer.printTag(Tag.td, ApiDocContentCss.colOne)) {
|
try (ContentCloseable td = writer.printTag(Tag.td, ApiDocContentCss.colOne)) {
|
||||||
writer.printCharacters(String.format("0x%06X", slice.getStart()));
|
writer.printCharacters(String.format("0x%06X", slice.getStart()));
|
||||||
}
|
}
|
||||||
try (ContentCloseable td = writer.printTag(Tag.td, ApiDocContentCss.colOne)) {
|
try (ContentCloseable td = writer.printTag(Tag.td, ApiDocContentCss.colLast)) {
|
||||||
writer.printCharacters(String.format("0x%06X", slice.getStop()));
|
writer.printCharacters(String.format("0x%06X", slice.getStop()));
|
||||||
}
|
}
|
||||||
try (ContentCloseable td = writer.printTag(Tag.td, ApiDocContentCss.colOne)) {
|
try (ContentCloseable td = writer.printTag(Tag.td, ApiDocContentCss.colLast)) {
|
||||||
writer.printCharacters(String.format("%d", slice.getLength()));
|
writer.printCharacters(String.format("%d", slice.getLength()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,9 +23,7 @@
|
||||||
package org.x4o.fc18.cake2.fcdoc;
|
package org.x4o.fc18.cake2.fcdoc;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.function.Function;
|
|
||||||
|
|
||||||
import org.x4o.fc18.FourCornerUnicodeDisplay;
|
import org.x4o.fc18.FourCornerUnicodeDisplay;
|
||||||
import org.x4o.fc18.cake2.FourCornerDotCake;
|
import org.x4o.fc18.cake2.FourCornerDotCake;
|
||||||
|
@ -35,13 +33,12 @@ import org.x4o.fc18.cake2.zero33.FCDotAPL0127DashP7C;
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotBYD0127DashP7D;
|
import org.x4o.fc18.cake2.zero33.FCDotBYD0127DashP7D;
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotBYD0127DashP7E;
|
import org.x4o.fc18.cake2.zero33.FCDotBYD0127DashP7E;
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotBYD0127DashP7F;
|
import org.x4o.fc18.cake2.zero33.FCDotBYD0127DashP7F;
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotCDC1604DashP6;
|
|
||||||
import org.x4o.fc18.cake2.zero33.FCDotDEC0127DashPX0;
|
|
||||||
import org.x4o.o2o.io.ContentWriterHtml.Tag;
|
import org.x4o.o2o.io.ContentWriterHtml.Tag;
|
||||||
import org.x4o.o2o.io.sax3.ContentCloseable;
|
import org.x4o.o2o.io.sax3.ContentCloseable;
|
||||||
import org.x4o.o2o.tdoc.ApiDocContentCss;
|
import org.x4o.o2o.tdoc.ApiDocContentCss;
|
||||||
import org.x4o.o2o.tdoc.ApiDocContentWriter;
|
import org.x4o.o2o.tdoc.ApiDocContentWriter;
|
||||||
import org.x4o.o2o.tdoc.dom.ApiDocPage;
|
import org.x4o.o2o.tdoc.dom.ApiDocPage;
|
||||||
|
import org.x4o.o2o.tdoc.dom.ApiDocPageWriter;
|
||||||
import org.x4o.o2o.tdoc.dom.ApiDocWriteEvent;
|
import org.x4o.o2o.tdoc.dom.ApiDocWriteEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -50,7 +47,7 @@ import org.x4o.o2o.tdoc.dom.ApiDocWriteEvent;
|
||||||
* @author Willem Cazander
|
* @author Willem Cazander
|
||||||
* @version 1.0 Jan 17, 2025
|
* @version 1.0 Jan 17, 2025
|
||||||
*/
|
*/
|
||||||
public class FCDocPageWriterMuffin implements FCDocPageWriter {
|
public class FCDocPageWriterMuffin implements ApiDocPageWriter, FCDocSegmentWriter {
|
||||||
|
|
||||||
public static ApiDocPage createDocPage() {
|
public static ApiDocPage createDocPage() {
|
||||||
return new ApiDocPage("overview-muffin","Muffins","Overview of all muffin symbols.",new FCDocPageWriterMuffin());
|
return new ApiDocPage("overview-muffin","Muffins","Overview of all muffin symbols.",new FCDocPageWriterMuffin());
|
||||||
|
@ -190,68 +187,4 @@ public class FCDocPageWriterMuffin implements FCDocPageWriter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void writeP7x(ApiDocContentWriter writer, FourCornerDotCake slice, Function<Integer, Integer> conv) throws IOException {
|
|
||||||
String prefixHex = String.format("0x%06X", slice.getStart());
|
|
||||||
try (ContentCloseable tableRow = writer.docTableRow()) {
|
|
||||||
writer.printTagStart(Tag.td, ApiDocContentCss.colFirst);
|
|
||||||
writer.printCharacters(prefixHex);
|
|
||||||
writer.printTagEnd(Tag.td);
|
|
||||||
writer.printTagStart(Tag.td, ApiDocContentCss.colOne);
|
|
||||||
writer.printCharacters(slice.nameSpec());
|
|
||||||
writer.printTagEnd(Tag.td);
|
|
||||||
for (int i = 0; i < 27; i++) {
|
|
||||||
int codePoint = conv.apply(i);
|
|
||||||
if (i + 1 < 27) {
|
|
||||||
writer.printTagStart(Tag.td);
|
|
||||||
} else {
|
|
||||||
writer.printTagStart(Tag.td, ApiDocContentCss.colLast);
|
|
||||||
}
|
|
||||||
StringBuilder buf = new StringBuilder();
|
|
||||||
if (codePoint == '\u0000') {
|
|
||||||
buf.append("␀");
|
|
||||||
} else {
|
|
||||||
buf.appendCodePoint(codePoint);
|
|
||||||
}
|
|
||||||
writer.printCharacters(buf.toString());
|
|
||||||
writer.printTagEnd(Tag.td);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void writeCDC(ApiDocContentWriter writer, int off) throws IOException {
|
|
||||||
String prefixHex = String.format("0x%05X0", off >> 4);
|
|
||||||
try (ContentCloseable tableRow = writer.docTableRow()) {
|
|
||||||
writer.printTagStart(Tag.td, ApiDocContentCss.colOne);
|
|
||||||
writer.printCharacters(prefixHex);
|
|
||||||
writer.printTagEnd(Tag.td);
|
|
||||||
for (int i = off; i < 16 + off; i++) {
|
|
||||||
FCDotCDC1604DashP6 cdc = FCDotCDC1604DashP6.valueOf(i);
|
|
||||||
int codePoint = cdc.codePoints()[0];
|
|
||||||
if (i + 1 < 16 + off) {
|
|
||||||
writer.printTagStart(Tag.td);
|
|
||||||
} else {
|
|
||||||
writer.printTagStart(Tag.td, ApiDocContentCss.colLast);
|
|
||||||
}
|
|
||||||
StringBuilder buf = new StringBuilder();
|
|
||||||
if (codePoint == '\u0000') {
|
|
||||||
buf.append("␀");
|
|
||||||
} else if (codePoint == '\u0001') {
|
|
||||||
buf.append("␁");
|
|
||||||
} else if (codePoint == '\u0002') {
|
|
||||||
buf.append("␂");
|
|
||||||
} else if (codePoint == '\u0003') {
|
|
||||||
buf.append("␃");
|
|
||||||
} else if (codePoint == ' ') {
|
|
||||||
buf.append("␠");
|
|
||||||
} else if (codePoint == '\n') {
|
|
||||||
buf.append("␊");
|
|
||||||
} else {
|
|
||||||
buf.appendCodePoint(codePoint);
|
|
||||||
}
|
|
||||||
writer.printCharacters(buf.toString());
|
|
||||||
writer.printTagEnd(Tag.td);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,12 +23,14 @@
|
||||||
package org.x4o.fc18.cake2.fcdoc;
|
package org.x4o.fc18.cake2.fcdoc;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.function.Function;
|
||||||
|
|
||||||
|
import org.x4o.fc18.cake2.FourCornerDotCake;
|
||||||
|
import org.x4o.fc18.cake2.zero33.FCDotCDC1604DashP6;
|
||||||
import org.x4o.o2o.io.ContentWriterHtml.Tag;
|
import org.x4o.o2o.io.ContentWriterHtml.Tag;
|
||||||
import org.x4o.o2o.io.sax3.ContentCloseable;
|
import org.x4o.o2o.io.sax3.ContentCloseable;
|
||||||
import org.x4o.o2o.tdoc.ApiDocContentCss;
|
import org.x4o.o2o.tdoc.ApiDocContentCss;
|
||||||
import org.x4o.o2o.tdoc.ApiDocContentWriter;
|
import org.x4o.o2o.tdoc.ApiDocContentWriter;
|
||||||
import org.x4o.o2o.tdoc.dom.ApiDocPageWriter;
|
|
||||||
import org.xml.sax.helpers.AttributesImpl;
|
import org.xml.sax.helpers.AttributesImpl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -37,7 +39,71 @@ import org.xml.sax.helpers.AttributesImpl;
|
||||||
* @author Willem Cazander
|
* @author Willem Cazander
|
||||||
* @version 1.0 Jan 18, 2025
|
* @version 1.0 Jan 18, 2025
|
||||||
*/
|
*/
|
||||||
public interface FCDocPageWriter extends ApiDocPageWriter {
|
public interface FCDocSegmentWriter {
|
||||||
|
|
||||||
|
default void writeP7x(ApiDocContentWriter writer, FourCornerDotCake slice, Function<Integer, Integer> conv) throws IOException {
|
||||||
|
String prefixHex = String.format("0x%06X", slice.getStart());
|
||||||
|
try (ContentCloseable tableRow = writer.docTableRow()) {
|
||||||
|
writer.printTagStart(Tag.td, ApiDocContentCss.colFirst);
|
||||||
|
writer.printCharacters(prefixHex);
|
||||||
|
writer.printTagEnd(Tag.td);
|
||||||
|
writer.printTagStart(Tag.td, ApiDocContentCss.colOne);
|
||||||
|
writer.printCharacters(slice.nameSpec());
|
||||||
|
writer.printTagEnd(Tag.td);
|
||||||
|
for (int i = 0; i < 27; i++) {
|
||||||
|
int codePoint = conv.apply(i);
|
||||||
|
if (i + 1 < 27) {
|
||||||
|
writer.printTagStart(Tag.td);
|
||||||
|
} else {
|
||||||
|
writer.printTagStart(Tag.td, ApiDocContentCss.colLast);
|
||||||
|
}
|
||||||
|
StringBuilder buf = new StringBuilder();
|
||||||
|
if (codePoint == '\u0000') {
|
||||||
|
buf.append("␀");
|
||||||
|
} else {
|
||||||
|
buf.appendCodePoint(codePoint);
|
||||||
|
}
|
||||||
|
writer.printCharacters(buf.toString());
|
||||||
|
writer.printTagEnd(Tag.td);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
default void writeCDC(ApiDocContentWriter writer, int off) throws IOException {
|
||||||
|
String prefixHex = String.format("0x%05X0", off >> 4);
|
||||||
|
try (ContentCloseable tableRow = writer.docTableRow()) {
|
||||||
|
writer.printTagStart(Tag.td, ApiDocContentCss.colOne);
|
||||||
|
writer.printCharacters(prefixHex);
|
||||||
|
writer.printTagEnd(Tag.td);
|
||||||
|
for (int i = off; i < 16 + off; i++) {
|
||||||
|
FCDotCDC1604DashP6 cdc = FCDotCDC1604DashP6.valueOf(i);
|
||||||
|
int codePoint = cdc.codePoints()[0];
|
||||||
|
if (i + 1 < 16 + off) {
|
||||||
|
writer.printTagStart(Tag.td);
|
||||||
|
} else {
|
||||||
|
writer.printTagStart(Tag.td, ApiDocContentCss.colLast);
|
||||||
|
}
|
||||||
|
StringBuilder buf = new StringBuilder();
|
||||||
|
if (codePoint == '\u0000') {
|
||||||
|
buf.append("␀");
|
||||||
|
} else if (codePoint == '\u0001') {
|
||||||
|
buf.append("␁");
|
||||||
|
} else if (codePoint == '\u0002') {
|
||||||
|
buf.append("␂");
|
||||||
|
} else if (codePoint == '\u0003') {
|
||||||
|
buf.append("␃");
|
||||||
|
} else if (codePoint == ' ') {
|
||||||
|
buf.append("␠");
|
||||||
|
} else if (codePoint == '\n') {
|
||||||
|
buf.append("␊");
|
||||||
|
} else {
|
||||||
|
buf.appendCodePoint(codePoint);
|
||||||
|
}
|
||||||
|
writer.printCharacters(buf.toString());
|
||||||
|
writer.printTagEnd(Tag.td);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
default void writeTableBoxHeader(ApiDocContentWriter writer, String[] headers) throws IOException {
|
default void writeTableBoxHeader(ApiDocContentWriter writer, String[] headers) throws IOException {
|
||||||
try (ContentCloseable td = writer.printTag(Tag.tr)) {
|
try (ContentCloseable td = writer.printTag(Tag.tr)) {
|
|
@ -39,7 +39,7 @@ import org.xml.sax.SAXException;
|
||||||
* @author Willem Cazander
|
* @author Willem Cazander
|
||||||
* @version 1.0 Jan 17, 2025
|
* @version 1.0 Jan 17, 2025
|
||||||
*/
|
*/
|
||||||
public class FCDocWriterCake {
|
public class FCDocSegmentWriterCake implements FCDocSegmentWriter {
|
||||||
|
|
||||||
private final String[] FC_FEATURES = new String[] {
|
private 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",
|
|
@ -0,0 +1,129 @@
|
||||||
|
/*
|
||||||
|
* 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 java.io.IOException;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.function.Function;
|
||||||
|
|
||||||
|
import org.x4o.fc18.cake2.FourCornerDotCake;
|
||||||
|
import org.x4o.fc18.cake2.zero33.FCDotAPL0127DashP7A;
|
||||||
|
import org.x4o.fc18.cake2.zero33.FCDotAPL0127DashP7B;
|
||||||
|
import org.x4o.fc18.cake2.zero33.FCDotAPL0127DashP7C;
|
||||||
|
import org.x4o.fc18.cake2.zero33.FCDotBYD0127DashP7D;
|
||||||
|
import org.x4o.fc18.cake2.zero33.FCDotBYD0127DashP7E;
|
||||||
|
import org.x4o.fc18.cake2.zero33.FCDotBYD0127DashP7F;
|
||||||
|
import org.x4o.o2o.io.sax3.ContentCloseable;
|
||||||
|
import org.x4o.o2o.tdoc.ApiDocContentCss;
|
||||||
|
import org.x4o.o2o.tdoc.ApiDocContentWriter;
|
||||||
|
import org.x4o.o2o.tdoc.ApiDocNodeWriterMethod;
|
||||||
|
import org.x4o.o2o.tdoc.dom.ApiDocConcept;
|
||||||
|
import org.x4o.o2o.tdoc.dom.ApiDocNode;
|
||||||
|
import org.x4o.o2o.tdoc.dom.ApiDocNodeBody;
|
||||||
|
import org.x4o.o2o.tdoc.dom.ApiDocWriteEvent;
|
||||||
|
import org.xml.sax.SAXException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cake doc segment slice writer.
|
||||||
|
*
|
||||||
|
* @author Willem Cazander
|
||||||
|
* @version 1.0 Jan 17, 2025
|
||||||
|
*/
|
||||||
|
public class FCDocSegmentWriterCakeSlice implements FCDocSegmentWriter {
|
||||||
|
|
||||||
|
@ApiDocNodeWriterMethod(nodeBody=ApiDocNodeBody.SUMMARY, targetClasses={FourCornerDotCake.class}, nodeBodyOrders=20)
|
||||||
|
public void writeDefaultSummary(ApiDocWriteEvent<ApiDocNode> event) throws SAXException, IOException {
|
||||||
|
// NOTE: copyed from defaultWriteSummary as that only called with zero summaries
|
||||||
|
ApiDocContentWriter writer = event.getWriter();
|
||||||
|
ApiDocNode parent = event.getEventObject();
|
||||||
|
ApiDocConcept concept = event.getDoc().findConceptByClass(parent.getUserData().getClass());
|
||||||
|
List<ApiDocNode> nodes = parent.getNodes();
|
||||||
|
if (nodes.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
String name = concept.getName()+" Summary";
|
||||||
|
writer.docTableStart(name, "All childeren in "+name,ApiDocContentCss.overviewSummary);
|
||||||
|
writer.docTableHeader("Name", "Description");
|
||||||
|
for (ApiDocNode child : nodes) {
|
||||||
|
String link = ApiDocContentWriter.toSafeUri(child.getId())+"/index.html";
|
||||||
|
if (parent.getParent()==null) {
|
||||||
|
link = ApiDocContentWriter.toSafeUri(parent.getId())+"/"+link; // root node
|
||||||
|
}
|
||||||
|
writer.docTableRowLink(link,child.getName(),child.getDescription());
|
||||||
|
}
|
||||||
|
writer.docTableEnd();
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiDocNodeWriterMethod(nodeBody=ApiDocNodeBody.SUMMARY, targetClasses={FourCornerDotCake.class}, nodeBodyOrders=10)
|
||||||
|
public void writeSchemaViewSummary(ApiDocWriteEvent<ApiDocNode> event) throws SAXException, IOException {
|
||||||
|
ApiDocContentWriter writer = event.getWriter();
|
||||||
|
FourCornerDotCake slice = (FourCornerDotCake)event.getEventObject().getUserData();
|
||||||
|
if (slice.getStart() >= FourCornerDotCake.__MIND_THE_GAP8.getStart()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (FourCornerDotCake.FC_DEC0127_PX0.equals(slice)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (FourCornerDotCake.FC_APL0127_P7A.equals(slice)) {
|
||||||
|
writeP7xSlice(writer, slice, v -> FCDotAPL0127DashP7A.valueOf(v).codePoints()[0]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (FourCornerDotCake.FC_APL0127_P7B.equals(slice)) {
|
||||||
|
writeP7xSlice(writer, slice, v -> FCDotAPL0127DashP7B.valueOf(v).codePoints()[0]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (FourCornerDotCake.FC_APL0127_P7C.equals(slice)) {
|
||||||
|
writeP7xSlice(writer, slice, v -> FCDotAPL0127DashP7C.valueOf(v).codePoints()[0]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (FourCornerDotCake.FC_BYD0127_P7D.equals(slice)) {
|
||||||
|
writeP7xSlice(writer, slice, v -> FCDotBYD0127DashP7D.valueOf(v).codePoints()[0]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (FourCornerDotCake.FC_BYD0127_P7E.equals(slice)) {
|
||||||
|
writeP7xSlice(writer, slice, v -> FCDotBYD0127DashP7E.valueOf(v).codePoints()[0]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (FourCornerDotCake.FC_BYD0127_P7F.equals(slice)) {
|
||||||
|
writeP7xSlice(writer, slice, v -> FCDotBYD0127DashP7F.valueOf(v).codePoints()[0]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (FourCornerDotCake.FC_CDC1604_P6.equals(slice)) {
|
||||||
|
try (ContentCloseable table = writer.docTable(FourCornerDotCake.FC_CDC1604_P6.nameSpec(), null, ApiDocContentCss.overviewSummary)) {
|
||||||
|
writeTableBoxHeaderNumeric(writer, 17);
|
||||||
|
writeCDC(writer, 0x00);
|
||||||
|
writeCDC(writer, 0x10);
|
||||||
|
writeCDC(writer, 0x20);
|
||||||
|
writeCDC(writer, 0x30);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void writeP7xSlice(ApiDocContentWriter writer, FourCornerDotCake slice, Function<Integer, Integer> conv) throws IOException {
|
||||||
|
try (ContentCloseable table = writer.docTable(slice.nameSpec(), null, ApiDocContentCss.overviewSummary)) {
|
||||||
|
writeTableBoxHeaderNumeric(writer, 28, true);
|
||||||
|
writeP7x(writer, slice, conv);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -39,7 +39,7 @@ import org.xml.sax.SAXException;
|
||||||
* @author Willem Cazander
|
* @author Willem Cazander
|
||||||
* @version 1.0 Jan 17, 2025
|
* @version 1.0 Jan 17, 2025
|
||||||
*/
|
*/
|
||||||
public class FCDocWriterCakeWord {
|
public class FCDocSegmentWriterCakeWord implements FCDocSegmentWriter {
|
||||||
|
|
||||||
@ApiDocNodeWriterMethod(nodeBody=ApiDocNodeBody.SUMMARY,targetClasses={TDocCakeWord.class})
|
@ApiDocNodeWriterMethod(nodeBody=ApiDocNodeBody.SUMMARY,targetClasses={TDocCakeWord.class})
|
||||||
public void writeSchemaViewSummary(ApiDocWriteEvent<ApiDocNode> event) throws SAXException, IOException {
|
public void writeSchemaViewSummary(ApiDocWriteEvent<ApiDocNode> event) throws SAXException, IOException {
|
|
@ -114,10 +114,10 @@ public class FCDocWriter {
|
||||||
ApiDoc doc = new ApiDoc();
|
ApiDoc doc = new ApiDoc();
|
||||||
doc.setName("FourCorner");
|
doc.setName("FourCorner");
|
||||||
doc.setDescription("FourCorner 18 bit text encoding format.");
|
doc.setDescription("FourCorner 18 bit text encoding format.");
|
||||||
doc.setDocAbout("FourCorner Indexes\nThe World Of Words.");
|
doc.setDocAbout("FourCorner Indexes\nThe World Of Words™");
|
||||||
doc.createDocCopyright(System.getProperty("user.name"), "תשפ״ה"); // use hebrew quotation mark, the interweb uses latin which break unicode rendering
|
doc.createDocCopyright("𑀳𑁂𑀮𑀺𑀉𑁄𑀤𑁄𑀭𑁂𑀡𑀪𑀸𑀕", "תשפ״ה"); // use hebrew quotation mark, the interweb uses latin which break unicode rendering
|
||||||
doc.setDocPageSubTitle("FC18-Alpha1");
|
doc.setDocPageSubTitle("FC18-Alpha1");
|
||||||
doc.addMetaKeywordAll(List.of("FC18", "documentation", "four-corner", "china", "MSX"));
|
doc.addMetaKeywordAll(List.of("FC18", "documentation", "four-corner", "china", "MSX4"));
|
||||||
doc.setNoFrameAllName("All cake slices");
|
doc.setNoFrameAllName("All cake slices");
|
||||||
doc.setFrameNavOverviewPrintParent(true);
|
doc.setFrameNavOverviewPrintParent(true);
|
||||||
doc.setFrameNavPrintParent(true);
|
doc.setFrameNavPrintParent(true);
|
||||||
|
@ -131,8 +131,9 @@ public class FCDocWriter {
|
||||||
doc.addTreeNodePageModeClass(TDocCake.class);
|
doc.addTreeNodePageModeClass(TDocCake.class);
|
||||||
doc.addTreeNodePageModeClass(FourCornerDotCake.class);
|
doc.addTreeNodePageModeClass(FourCornerDotCake.class);
|
||||||
|
|
||||||
doc.addAnnotatedClasses(FCDocWriterCake.class);
|
doc.addAnnotatedClasses(FCDocSegmentWriterCake.class);
|
||||||
doc.addAnnotatedClasses(FCDocWriterCakeWord.class);
|
doc.addAnnotatedClasses(FCDocSegmentWriterCakeWord.class);
|
||||||
|
doc.addAnnotatedClasses(FCDocSegmentWriterCakeSlice.class);
|
||||||
|
|
||||||
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_SLICE,FourCornerDotCake.class));
|
ApiDocConcept adc2 = doc.addConcept(new ApiDocConcept(adc1,C_FC_SLICE,FourCornerDotCake.class));
|
||||||
|
@ -172,13 +173,14 @@ public class FCDocWriter {
|
||||||
}
|
}
|
||||||
return doc;
|
return doc;
|
||||||
}
|
}
|
||||||
|
|
||||||
private ApiDocNode createNodeCakeSlice(FourCornerDotCake dotCake) {
|
private ApiDocNode createNodeCakeSlice(FourCornerDotCake dotCake) {
|
||||||
return new ApiDocNode(dotCake,dotCake.name(),dotCake.nameSpec(),dotCake.description());
|
return new ApiDocNode(dotCake, dotCake.name(), dotCake.nameSpec(), dotCake.description());
|
||||||
}
|
}
|
||||||
|
|
||||||
private ApiDocNode createNodeCakeWord(FourCornerDotCake dotCake, int offset) {
|
private ApiDocNode createNodeCakeWord(FourCornerDotCake dotCake, int offset) {
|
||||||
int cakePoint = dotCake.getStart() + offset;
|
int cakePoint = dotCake.getStart() + offset;
|
||||||
String name = String.format("%s.0x%06X", dotCake.name(), cakePoint);
|
String name = String.format("%s.0x%06X", dotCake.name(), cakePoint);
|
||||||
return new ApiDocNode(new TDocCakeWord(dotCake, offset),name,name,name);
|
return new ApiDocNode(new TDocCakeWord(dotCake, offset), name, name, name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue