Updated warp manifest obj naming to bit width type

This commit is contained in:
Willem Cazander 2024-12-27 11:42:12 +01:00
parent 810c626663
commit 623fc32ab1
37 changed files with 294 additions and 294 deletions

View file

@ -70,8 +70,8 @@ import love.distributedrebirth.nx01.redsea.hyper.model.HyperFlowerAnther;
import love.distributedrebirth.nx01.redsea.hyper.local.HyperLocalFileSystem; import love.distributedrebirth.nx01.redsea.hyper.local.HyperLocalFileSystem;
import love.distributedrebirth.nx01.warp.fault.BassFaultAnchor; import love.distributedrebirth.nx01.warp.fault.BassFaultAnchor;
import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver; import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest3; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestTheMimeType; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX0TheMimeType;
import ᒢᐩᐩ.ᔆʸᔆᐪᓫᔿ.ᒃᣔᒃᓫᒻ.ᑊᐣᓑᖮᐪᔆ.DuytsDocAuthor注; import ᒢᐩᐩ.ᔆʸᔆᐪᓫᔿ.ᒃᣔᒃᓫᒻ.ᑊᐣᓑᖮᐪᔆ.DuytsDocAuthor注;
@ -263,14 +263,14 @@ public class Java3Seed extends PrintStream {
if (file.equals("/META-INF/MANIFEST.MF")) { if (file.equals("/META-INF/MANIFEST.MF")) {
System.out.println("jar: " + jar.getName()); System.out.println("jar: " + jar.getName());
InputStream in = jar.get(path).getAsset().openStream(); InputStream in = jar.get(path).getAsset().openStream();
WarpManifest3 manifest = WarpManifestorDriver..readV1Stream(in); WarpManifestX8 manifest = WarpManifestorDriver..readV1Stream(in);
in.close(); in.close();
jar.delete(path); jar.delete(path);
manifest.withAttribute("Manifest-Toilet-Cleaned-By", Java3Seed.class.getName()); manifest.withAttribute("Manifest-Toilet-Cleaned-By", Java3Seed.class.getName());
manifest.withAttribute("Manifest-Toilet-Cleaned-Date", toiletCleanDate); manifest.withAttribute("Manifest-Toilet-Cleaned-Date", toiletCleanDate);
jar.add(new StringAsset(WarpManifestorDriver..writeV1String(manifest)), "/META-INF/"+WarpManifestTheMimeType.MANIFEST_1.getQFileName()); jar.add(new StringAsset(WarpManifestorDriver..writeV1String(manifest)), "/META-INF/"+WarpManifestX0TheMimeType.MANIFEST_1.getQFileName());
jar.add(new StringAsset(WarpManifestorDriver..writeV2String(manifest)), "/META-INF/"+WarpManifestTheMimeType.MANIFEST_2.getQFileName()); jar.add(new StringAsset(WarpManifestorDriver..writeV2String(manifest)), "/META-INF/"+WarpManifestX0TheMimeType.MANIFEST_2.getQFileName());
jar.add(new ByteArrayAsset(WarpManifestorDriver..writeV3Array(manifest)), "/META-INF/"+WarpManifestTheMimeType.MANIFEST_3.getQFileName()); jar.add(new ByteArrayAsset(WarpManifestorDriver..writeV3Array(manifest)), "/META-INF/"+WarpManifestX0TheMimeType.MANIFEST_3.getQFileName());
convertedManifests++; convertedManifests++;
} }
} }

View file

@ -37,7 +37,7 @@ import java.util.function.Consumer;
import love.distributedrebirth.nx01.warp.fault.sitra.SitraManifestGenerator; import love.distributedrebirth.nx01.warp.fault.sitra.SitraManifestGenerator;
import love.distributedrebirth.nx01.warp.fault.sitra.SitraManifestSectionWhitePaper; import love.distributedrebirth.nx01.warp.fault.sitra.SitraManifestSectionWhitePaper;
import love.distributedrebirth.nx01.warp.fault.sitra.ZilLaLaManyfestoGrowlFactory; import love.distributedrebirth.nx01.warp.fault.sitra.ZilLaLaManyfestoGrowlFactory;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest3; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8;
/// Bass fault anchor (which replaces; Exception/RuntimeException) /// Bass fault anchor (which replaces; Exception/RuntimeException)
/// ///
@ -129,7 +129,7 @@ abstract public class BassFaultAnchor extends BassFaultAnchorSignalStore {
return ZilLaLaManyfestoGrowlFactory..buildFaultScreamBase64(toZilLaLaManyfesto(), this); return ZilLaLaManyfestoGrowlFactory..buildFaultScreamBase64(toZilLaLaManyfesto(), this);
} }
public final WarpManifest3 toZilLaLaManyfesto() { public final WarpManifestX8 toZilLaLaManyfesto() {
return SitraManifestGenerator..buildSignalTraceManifest(this); return SitraManifestGenerator..buildSignalTraceManifest(this);
} }

View file

@ -37,8 +37,8 @@ import java.util.Map;
import java.util.Optional; import java.util.Optional;
import love.distributedrebirth.nx01.warp.fault.BassFaultAnchor; import love.distributedrebirth.nx01.warp.fault.BassFaultAnchor;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest3; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest3Section; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8Section;
import love.distributedrebirth.nx01.warp.manifestor.scopic.iomf.ScopicManifestConstants; import love.distributedrebirth.nx01.warp.manifestor.scopic.iomf.ScopicManifestConstants;
/// Sitra manifest generator. /// Sitra manifest generator.
@ -50,13 +50,13 @@ public enum SitraManifestGenerator {
private static final String SITRA_VALUE_NULL = "null"; private static final String SITRA_VALUE_NULL = "null";
public WarpManifest3 buildSignalTraceManifest(BassFaultAnchor fault) { public WarpManifestX8 buildSignalTraceManifest(BassFaultAnchor fault) {
String message = fault.getLocalizedMessage(); String message = fault.getLocalizedMessage();
if (message != null) { if (message != null) {
message = escapeSignalValue(message); message = escapeSignalValue(message);
} }
String uuidDate = DateTimeFormatter.RFC_1123_DATE_TIME.format(ZonedDateTime.ofInstant(Instant.now(), ZoneOffset.UTC)); String uuidDate = DateTimeFormatter.RFC_1123_DATE_TIME.format(ZonedDateTime.ofInstant(Instant.now(), ZoneOffset.UTC));
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute(ZilLaLaManyfestoHeader.MAIN_FAULT_MANYFESTO_VCROSS, ZilLaLaManyfesto.MANYFESTO_VERSION); manifest.withAttribute(ZilLaLaManyfestoHeader.MAIN_FAULT_MANYFESTO_VCROSS, ZilLaLaManyfesto.MANYFESTO_VERSION);
manifest.withAttribute(ZilLaLaManyfestoHeader.MAIN_FAULT_MANYFESTO_AFOUR, ZilLaLaManyfesto.MANYFESTO_A4_JAVA); manifest.withAttribute(ZilLaLaManyfestoHeader.MAIN_FAULT_MANYFESTO_AFOUR, ZilLaLaManyfesto.MANYFESTO_A4_JAVA);
manifest.withAttribute(ZilLaLaManyfestoHeader.MAIN_FAULT_UUID_WM_ONE, SitraManifestUUIDCrematorium..burnWaterMarkOne().toString()); manifest.withAttribute(ZilLaLaManyfestoHeader.MAIN_FAULT_UUID_WM_ONE, SitraManifestUUIDCrematorium..burnWaterMarkOne().toString());
@ -81,7 +81,7 @@ public enum SitraManifestGenerator {
continue; continue;
} }
Map<String, String> signals = signalsOpt.get(); Map<String, String> signals = signalsOpt.get();
WarpManifest3Section section = manifest.makeSection(traceKey.getName()); WarpManifestX8Section section = manifest.makeSection(traceKey.getName());
if (SitraManifestSectionWhitePaper.class.equals(traceKey)) { if (SitraManifestSectionWhitePaper.class.equals(traceKey)) {
section.withAttribute(ZilLaLaManyfestoHeader.SIGNAL_FAULT_SECTION_GOAL, ZilLaLaManyfestoSectionGoal.PAPER.toString()); section.withAttribute(ZilLaLaManyfestoHeader.SIGNAL_FAULT_SECTION_GOAL, ZilLaLaManyfestoSectionGoal.PAPER.toString());
} else { } else {
@ -113,7 +113,7 @@ public enum SitraManifestGenerator {
} }
Map<String, String> signals = new LinkedHashMap<>(); Map<String, String> signals = new LinkedHashMap<>();
report.fillReport(fault, signals); report.fillReport(fault, signals);
WarpManifest3Section section = manifest.makeSection(report.getClass().getName()); WarpManifestX8Section section = manifest.makeSection(report.getClass().getName());
for (String signalKey : signals.keySet()) { for (String signalKey : signals.keySet()) {
String signalValue = signals.get(signalKey); String signalValue = signals.get(signalKey);
String attributeBody = signalValue==null?SITRA_VALUE_NULL:escapeSignalValue(signalValue); String attributeBody = signalValue==null?SITRA_VALUE_NULL:escapeSignalValue(signalValue);

View file

@ -27,7 +27,7 @@
package love.distributedrebirth.nx01.warp.fault.sitra; package love.distributedrebirth.nx01.warp.fault.sitra;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestTheMimeType; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX0TheMimeType;
/// ZilLaLa manyfesto protocol constants to build or parse the manifest data uri. /// ZilLaLa manyfesto protocol constants to build or parse the manifest data uri.
/// ///
@ -39,6 +39,6 @@ public enum ZilLaLaManyfesto {
public static final String MANYFESTO_A4_JAVA = "java"; public static final String MANYFESTO_A4_JAVA = "java";
public static final String MANYFESTO_A4_ERLANG = "erlang"; public static final String MANYFESTO_A4_ERLANG = "erlang";
public static final String ZILLALA_URI_PREFIX_DATA64 = "data:" + WarpManifestTheMimeType.MANIFEST_3.getQName() + ";base64,"; public static final String ZILLALA_URI_PREFIX_DATA64 = "data:" + WarpManifestX0TheMimeType.MANIFEST_3.getQName() + ";base64,";
public static final String ZILLALA_URI_PREFIX_NOSTR_TLV_GZ = "nostr:zillala"; // TODO: nostr link to replay to inject bug + TLV for gz sitra manifest payload public static final String ZILLALA_URI_PREFIX_NOSTR_TLV_GZ = "nostr:zillala"; // TODO: nostr link to replay to inject bug + TLV for gz sitra manifest payload
} }

View file

@ -31,7 +31,7 @@ import java.util.Base64;
import love.distributedrebirth.nx01.warp.fault.BassFaultAnchor; import love.distributedrebirth.nx01.warp.fault.BassFaultAnchor;
import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver; import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest3; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8;
/// ZilLaLa manyfesto protocol constants to build or parse the manifest data uri. /// ZilLaLa manyfesto protocol constants to build or parse the manifest data uri.
/// ///
@ -44,7 +44,7 @@ public enum ZilLaLaManyfestoGrowlFactory {
/// Multiple characters seen as a slug to indicate that words are eaten. /// Multiple characters seen as a slug to indicate that words are eaten.
private static final String VALUE_CUTOFF = "..."; private static final String VALUE_CUTOFF = "...";
public String buildFaultScream(WarpManifest3 manifest, BassFaultAnchor fault) { public String buildFaultScream(WarpManifestX8 manifest, BassFaultAnchor fault) {
StringBuilder buf = new StringBuilder(); StringBuilder buf = new StringBuilder();
buf.append(fault.getClass().getSimpleName()); buf.append(fault.getClass().getSimpleName());
String messageShort = buildCutDottedMessage(fault); String messageShort = buildCutDottedMessage(fault);
@ -59,7 +59,7 @@ public enum ZilLaLaManyfestoGrowlFactory {
} }
@Deprecated @Deprecated
public String buildFaultScreamBase64(WarpManifest3 manifest, BassFaultAnchor fault) { public String buildFaultScreamBase64(WarpManifestX8 manifest, BassFaultAnchor fault) {
byte[] traceManifestBytes = WarpManifestorDriver..writeV3Array(manifest); // TODO: Upgrade to version 6 or 7 ?? byte[] traceManifestBytes = WarpManifestorDriver..writeV3Array(manifest); // TODO: Upgrade to version 6 or 7 ??
String trace64 = Base64.getEncoder().encodeToString(traceManifestBytes); // FIXME: report as "normal" text in nostr event String trace64 = Base64.getEncoder().encodeToString(traceManifestBytes); // FIXME: report as "normal" text in nostr event
StringBuilder buf = new StringBuilder(); StringBuilder buf = new StringBuilder();

View file

@ -34,7 +34,7 @@ import love.distributedrebirth.nx01.warp.fault.BassFaultAnchor;
import love.distributedrebirth.nx01.warp.fault.FaultBeanInstantiation; import love.distributedrebirth.nx01.warp.fault.FaultBeanInstantiation;
import love.distributedrebirth.nx01.warp.fault.FaultBeanState; import love.distributedrebirth.nx01.warp.fault.FaultBeanState;
import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver; import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest3; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8;
/// @author للَّٰهِilLצسُو /// @author للَّٰهِilLצسُو
/// @version ©Δ 仙上主天 /// @version ©Δ 仙上主天
@ -113,7 +113,7 @@ public class FaultSignalTraceTest {
} }
Assertions.assertNotNull(error); Assertions.assertNotNull(error);
Assertions.assertNotNull(error.getMessage()); Assertions.assertNotNull(error.getMessage());
WarpManifest3 manifest = error.toZilLaLaManyfesto(); WarpManifestX8 manifest = error.toZilLaLaManyfesto();
String sitraText = WarpManifestorDriver..writeV2String(manifest); String sitraText = WarpManifestorDriver..writeV2String(manifest);
//System.out.println(sitraText); //System.out.println(sitraText);
Assertions.assertNotNull(sitraText); Assertions.assertNotNull(sitraText);

View file

@ -42,13 +42,13 @@ import java.util.Objects;
import org.x4o.o2o.io.tlv.TLVChainOctalSex; import org.x4o.o2o.io.tlv.TLVChainOctalSex;
import org.x4o.o2o.io.tlv.TLVChainSexTeenBit; import org.x4o.o2o.io.tlv.TLVChainSexTeenBit;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest2; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX0;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest2HeaderField; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX0HeaderField;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest2Section; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX0Section;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest3; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest4; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX18;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestTheMimeType; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX0TheMimeType;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestTheVersion; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX0TheVersion;
import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestContent; import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestContent;
import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestContentStringHandler; import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestContentStringHandler;
import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestException; import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestException;
@ -70,21 +70,21 @@ import love.distributedrebirth.nx01.warp.manifestor.scopic.iomf4.ScopicManifest4
public enum WarpManifestorDriver { public enum WarpManifestorDriver {
; ;
public WarpManifest3 readV1String(String input) { public WarpManifestX8 readV1String(String input) {
return readV1Array(input.getBytes(StandardCharsets.UTF_8)); return readV1Array(input.getBytes(StandardCharsets.UTF_8));
} }
public WarpManifest3 readV1Buffer(ByteBuffer input) { public WarpManifestX8 readV1Buffer(ByteBuffer input) {
return readV1Array(input.array()); return readV1Array(input.array());
} }
public WarpManifest3 readV1Array(byte[] input) { public WarpManifestX8 readV1Array(byte[] input) {
return readV1Stream(new ByteArrayInputStream(input)); return readV1Stream(new ByteArrayInputStream(input));
} }
public WarpManifest3 readV1Stream(InputStream input) { public WarpManifestX8 readV1Stream(InputStream input) {
WarpManifest3 result = new WarpManifest3(); WarpManifestX8 result = new WarpManifestX8();
ScopicManifestContentStringHandler handler = new ScopicManifestContentStringHandler(result, WarpManifestTheVersion.VERSION_1_0); ScopicManifestContentStringHandler handler = new ScopicManifestContentStringHandler(result, WarpManifestX0TheVersion.VERSION_1_0);
ScopicManifestContentReader reader = new ScopicManifestContentReader(handler, ScopicManifestContentReader.FORCE_VERSION_1_0); ScopicManifestContentReader reader = new ScopicManifestContentReader(handler, ScopicManifestContentReader.FORCE_VERSION_1_0);
try { try {
reader.parse(input); reader.parse(input);
@ -94,21 +94,21 @@ public enum WarpManifestorDriver {
return result; return result;
} }
public WarpManifest3 readV2String(String input) { public WarpManifestX8 readV2String(String input) {
return readV2Array(input.getBytes(StandardCharsets.UTF_8)); return readV2Array(input.getBytes(StandardCharsets.UTF_8));
} }
public WarpManifest3 readV2Buffer(ByteBuffer input) { public WarpManifestX8 readV2Buffer(ByteBuffer input) {
return readV2Array(input.array()); return readV2Array(input.array());
} }
public WarpManifest3 readV2Array(byte[] input) { public WarpManifestX8 readV2Array(byte[] input) {
return readV2Stream(new ByteArrayInputStream(input)); return readV2Stream(new ByteArrayInputStream(input));
} }
public WarpManifest3 readV2Stream(InputStream input) { public WarpManifestX8 readV2Stream(InputStream input) {
WarpManifest3 result = new WarpManifest3(); WarpManifestX8 result = new WarpManifestX8();
ScopicManifestContentStringHandler handler = new ScopicManifestContentStringHandler(result, WarpManifestTheVersion.VERSION_1_0, WarpManifestTheVersion.VERSION_2_0); ScopicManifestContentStringHandler handler = new ScopicManifestContentStringHandler(result, WarpManifestX0TheVersion.VERSION_1_0, WarpManifestX0TheVersion.VERSION_2_0);
ScopicManifestContentReader reader = new ScopicManifestContentReader(handler); ScopicManifestContentReader reader = new ScopicManifestContentReader(handler);
try { try {
reader.parse(input); reader.parse(input);
@ -118,22 +118,22 @@ public enum WarpManifestorDriver {
return result; return result;
} }
public WarpManifest3 readV3Buffer(ByteBuffer input) { public WarpManifestX8 readV3Buffer(ByteBuffer input) {
return readV3Array(input.array()); return readV3Array(input.array());
} }
public WarpManifest3 readV3Array(byte[] input) { public WarpManifestX8 readV3Array(byte[] input) {
return readV3Stream(new ByteArrayInputStream(input)); return readV3Stream(new ByteArrayInputStream(input));
} }
public WarpManifest3 readV3Stream(InputStream input) { public WarpManifestX8 readV3Stream(InputStream input) {
WarpManifest3 result = new WarpManifest3(); WarpManifestX8 result = new WarpManifestX8();
ScopicManifestContentStringHandler handler = new ScopicManifestContentStringHandler(result, WarpManifestTheVersion.VERSION_3_0); ScopicManifestContentStringHandler handler = new ScopicManifestContentStringHandler(result, WarpManifestX0TheVersion.VERSION_3_0);
ScopicManifest3ContentReader reader = new ScopicManifest3ContentReader(handler); ScopicManifest3ContentReader reader = new ScopicManifest3ContentReader(handler);
TLVChainSexTeenBit chain = new TLVChainSexTeenBit(); TLVChainSexTeenBit chain = new TLVChainSexTeenBit();
try { try {
WarpManifestTheMimeType mimeType = WarpManifestTheMimeType.magicMarkerRead(input, WarpManifestTheMimeType.MARKER_3_LENGTH); WarpManifestX0TheMimeType mimeType = WarpManifestX0TheMimeType.magicMarkerRead(input, WarpManifestX0TheMimeType.MARKER_3_LENGTH);
if (!WarpManifestTheMimeType.MANIFEST_3.equals(mimeType)) { if (!WarpManifestX0TheMimeType.MANIFEST_3.equals(mimeType)) {
throw new ScopicManifestException("Invalid stream magic marker: " + mimeType); // TODO: move and change magicMarkerRead(in,enum) throw new ScopicManifestException("Invalid stream magic marker: " + mimeType); // TODO: move and change magicMarkerRead(in,enum)
} }
chain.dataReadStream(input); chain.dataReadStream(input);
@ -144,22 +144,22 @@ public enum WarpManifestorDriver {
return result; return result;
} }
public WarpManifest4 readV4Buffer(ByteBuffer input) { public WarpManifestX18 readV4Buffer(ByteBuffer input) {
return readV4Array(input.array()); return readV4Array(input.array());
} }
public WarpManifest4 readV4Array(byte[] input) { public WarpManifestX18 readV4Array(byte[] input) {
return readV4Stream(new ByteArrayInputStream(input)); return readV4Stream(new ByteArrayInputStream(input));
} }
public WarpManifest4 readV4Stream(InputStream input) { public WarpManifestX18 readV4Stream(InputStream input) {
WarpManifest4 result = new WarpManifest4(); WarpManifestX18 result = new WarpManifestX18();
ScopicManifest4ContentHandler handler = new ScopicManifest4ContentHandler(result); ScopicManifest4ContentHandler handler = new ScopicManifest4ContentHandler(result);
ScopicManifest4ContentReader reader = new ScopicManifest4ContentReader(handler); ScopicManifest4ContentReader reader = new ScopicManifest4ContentReader(handler);
TLVChainOctalSex chain = new TLVChainOctalSex(); TLVChainOctalSex chain = new TLVChainOctalSex();
try { try {
WarpManifestTheMimeType mimeType = WarpManifestTheMimeType.magicMarkerRead(input, WarpManifestTheMimeType.MARKER_4_LENGTH); WarpManifestX0TheMimeType mimeType = WarpManifestX0TheMimeType.magicMarkerRead(input, WarpManifestX0TheMimeType.MARKER_4_LENGTH);
if (!WarpManifestTheMimeType.MANIFEST_4.equals(mimeType)) { if (!WarpManifestX0TheMimeType.MANIFEST_4.equals(mimeType)) {
throw new ScopicManifestException("Invalid stream magic marker: " + mimeType); // TODO: move and change magicMarkerRead(in,enum) throw new ScopicManifestException("Invalid stream magic marker: " + mimeType); // TODO: move and change magicMarkerRead(in,enum)
} }
chain.dataReadStream(input); chain.dataReadStream(input);
@ -170,20 +170,20 @@ public enum WarpManifestorDriver {
return result; return result;
} }
public WarpManifest3 readViniString(String input) { public WarpManifestX8 readViniString(String input) {
return readViniArray(input.getBytes(StandardCharsets.UTF_8)); return readViniArray(input.getBytes(StandardCharsets.UTF_8));
} }
public WarpManifest3 readViniBuffer(ByteBuffer input) { public WarpManifestX8 readViniBuffer(ByteBuffer input) {
return readViniArray(input.array()); return readViniArray(input.array());
} }
public WarpManifest3 readViniArray(byte[] input) { public WarpManifestX8 readViniArray(byte[] input) {
return readViniStream(new ByteArrayInputStream(input)); return readViniStream(new ByteArrayInputStream(input));
} }
public WarpManifest3 readViniStream(InputStream input) { public WarpManifestX8 readViniStream(InputStream input) {
WarpManifest3 result = new WarpManifest3(); WarpManifestX8 result = new WarpManifestX8();
ScopicManifestContentStringHandler handler = new ScopicManifestContentStringHandler(result); ScopicManifestContentStringHandler handler = new ScopicManifestContentStringHandler(result);
ScopicIniContentReader reader = new ScopicIniContentReader(handler); ScopicIniContentReader reader = new ScopicIniContentReader(handler);
try { try {
@ -195,23 +195,23 @@ public enum WarpManifestorDriver {
} }
// An "geniface" for complex generics would be nice, note all this generics is only to add 2 default methods in a interface... // An "geniface" for complex generics would be nice, note all this generics is only to add 2 default methods in a interface...
private <T, M extends WarpManifest2<T, M, H, S>, H extends WarpManifest2HeaderField<T, H>, S extends WarpManifest2Section<T, H, S>> void strobelight(WarpManifest2<T, M, H, S> manifest, ScopicManifestContent<T> writer, T version) { private <T, M extends WarpManifestX0<T, M, H, S>, H extends WarpManifestX0HeaderField<T, H>, S extends WarpManifestX0Section<T, H, S>> void strobelight(WarpManifestX0<T, M, H, S> manifest, ScopicManifestContent<T> writer, T version) {
writer.strobeManifestStart(); writer.strobeManifestStart();
writer.strobeManifestDeclaration(Objects.requireNonNull(version, "Can't print null version")); writer.strobeManifestDeclaration(Objects.requireNonNull(version, "Can't print null version"));
for (WarpManifest2HeaderField<T, H> mainAttr : manifest.getAttributes()) { for (WarpManifestX0HeaderField<T, H> mainAttr : manifest.getAttributes()) {
Objects.requireNonNull(mainAttr.getName(), "Can't print null attribute name"); Objects.requireNonNull(mainAttr.getName(), "Can't print null attribute name");
for (T remarkValue : mainAttr.getRemarks()) { for (T remarkValue : mainAttr.getRemarks()) {
writer.strobeRemarkContent(remarkValue); writer.strobeRemarkContent(remarkValue);
} }
writer.strobeMainAttribute(mainAttr.getName(), mainAttr.getBody()); writer.strobeMainAttribute(mainAttr.getName(), mainAttr.getBody());
} }
for (WarpManifest2Section<T, H, S> section : manifest.getSections()) { for (WarpManifestX0Section<T, H, S> section : manifest.getSections()) {
Objects.requireNonNull(section.getName(), "Can't print null section name"); Objects.requireNonNull(section.getName(), "Can't print null section name");
for (T remarkValue : section.getRemarks()) { for (T remarkValue : section.getRemarks()) {
writer.strobeRemarkContent(remarkValue); writer.strobeRemarkContent(remarkValue);
} }
writer.strobeSectionHeader(section.getName()); writer.strobeSectionHeader(section.getName());
for (WarpManifest2HeaderField<T, H> sectionAttr : section.getAttributes()) { for (WarpManifestX0HeaderField<T, H> sectionAttr : section.getAttributes()) {
Objects.requireNonNull(sectionAttr.getName(), "Can't print null section attribute name"); Objects.requireNonNull(sectionAttr.getName(), "Can't print null section attribute name");
for (T remarkValue : sectionAttr.getRemarks()) { for (T remarkValue : sectionAttr.getRemarks()) {
writer.strobeRemarkContent(remarkValue); writer.strobeRemarkContent(remarkValue);
@ -222,87 +222,87 @@ public enum WarpManifestorDriver {
writer.strobeManifestEnd(); writer.strobeManifestEnd();
} }
public String writeV1String(WarpManifest3 manifest) { public String writeV1String(WarpManifestX8 manifest) {
StringWriter writer = new StringWriter(); StringWriter writer = new StringWriter();
writeV1StreamChar(manifest, writer); writeV1StreamChar(manifest, writer);
return writer.toString(); return writer.toString();
} }
public void writeV1Stream(WarpManifest3 manifest, OutputStream output) { public void writeV1Stream(WarpManifestX8 manifest, OutputStream output) {
writeV1StreamChar(manifest, new OutputStreamWriter(output, StandardCharsets.UTF_8)); writeV1StreamChar(manifest, new OutputStreamWriter(output, StandardCharsets.UTF_8));
} }
public void writeV1StreamChar(WarpManifest3 manifest, Writer output) { public void writeV1StreamChar(WarpManifestX8 manifest, Writer output) {
strobelight(manifest, new ScopicManifestContentWriter(output), WarpManifestTheVersion.VERSION_1_0.getQName()); strobelight(manifest, new ScopicManifestContentWriter(output), WarpManifestX0TheVersion.VERSION_1_0.getQName());
} }
public String writeV2String(WarpManifest3 manifest) { public String writeV2String(WarpManifestX8 manifest) {
StringWriter writer = new StringWriter(); StringWriter writer = new StringWriter();
writeV2StreamChar(manifest, writer); writeV2StreamChar(manifest, writer);
return writer.toString(); return writer.toString();
} }
public void writeV2Stream(WarpManifest3 manifest, OutputStream output) { public void writeV2Stream(WarpManifestX8 manifest, OutputStream output) {
writeV2StreamChar(manifest, new OutputStreamWriter(output, StandardCharsets.UTF_8)); writeV2StreamChar(manifest, new OutputStreamWriter(output, StandardCharsets.UTF_8));
} }
public void writeV2StreamChar(WarpManifest3 manifest, Writer output) { public void writeV2StreamChar(WarpManifestX8 manifest, Writer output) {
strobelight(manifest, new ScopicManifestContentWriter(output), WarpManifestTheVersion.VERSION_2_0.getQName()); strobelight(manifest, new ScopicManifestContentWriter(output), WarpManifestX0TheVersion.VERSION_2_0.getQName());
} }
public ByteBuffer writeV3Buffer(WarpManifest3 manifest) { public ByteBuffer writeV3Buffer(WarpManifestX8 manifest) {
return ByteBuffer.wrap(writeV3Array(manifest)); return ByteBuffer.wrap(writeV3Array(manifest));
} }
public byte[] writeV3Array(WarpManifest3 manifest) { public byte[] writeV3Array(WarpManifestX8 manifest) {
ByteArrayOutputStream baos = new ByteArrayOutputStream(); ByteArrayOutputStream baos = new ByteArrayOutputStream();
writeV3Stream(manifest, baos); writeV3Stream(manifest, baos);
return baos.toByteArray(); return baos.toByteArray();
} }
public void writeV3Stream(WarpManifest3 manifest, OutputStream output) { public void writeV3Stream(WarpManifestX8 manifest, OutputStream output) {
TLVChainSexTeenBit chain = new TLVChainSexTeenBit(); TLVChainSexTeenBit chain = new TLVChainSexTeenBit();
strobelight(manifest, new ScopicManifest3ContentWriter(chain), WarpManifestTheVersion.VERSION_3_0.getQName()); strobelight(manifest, new ScopicManifest3ContentWriter(chain), WarpManifestX0TheVersion.VERSION_3_0.getQName());
try { try {
WarpManifestTheMimeType.magicMarkerWrite(output, WarpManifestTheMimeType.MANIFEST_3); WarpManifestX0TheMimeType.magicMarkerWrite(output, WarpManifestX0TheMimeType.MANIFEST_3);
chain.dataWriteStream(output); chain.dataWriteStream(output);
} catch (IOException e) { } catch (IOException e) {
throw new ScopicManifestException(e); throw new ScopicManifestException(e);
} }
} }
public ByteBuffer writeV4Buffer(WarpManifest4 manifest) { public ByteBuffer writeV4Buffer(WarpManifestX18 manifest) {
return ByteBuffer.wrap(writeV4Array(manifest)); return ByteBuffer.wrap(writeV4Array(manifest));
} }
public byte[] writeV4Array(WarpManifest4 manifest) { public byte[] writeV4Array(WarpManifestX18 manifest) {
ByteArrayOutputStream baos = new ByteArrayOutputStream(); ByteArrayOutputStream baos = new ByteArrayOutputStream();
writeV4Stream(manifest, baos); writeV4Stream(manifest, baos);
return baos.toByteArray(); return baos.toByteArray();
} }
public void writeV4Stream(WarpManifest4 manifest, OutputStream output) { public void writeV4Stream(WarpManifestX18 manifest, OutputStream output) {
TLVChainOctalSex chain = new TLVChainOctalSex(); TLVChainOctalSex chain = new TLVChainOctalSex();
strobelight(manifest, new ScopicManifest4ContentWriter(chain), WarpManifestTheVersion.VERSION_4_0); strobelight(manifest, new ScopicManifest4ContentWriter(chain), WarpManifestX0TheVersion.VERSION_4_0);
try { try {
WarpManifestTheMimeType.magicMarkerWrite(output, WarpManifestTheMimeType.MANIFEST_4); WarpManifestX0TheMimeType.magicMarkerWrite(output, WarpManifestX0TheMimeType.MANIFEST_4);
chain.dataWriteStream(output); chain.dataWriteStream(output);
} catch (IOException e) { } catch (IOException e) {
throw new ScopicManifestException(e); throw new ScopicManifestException(e);
} }
} }
public String writeViniString(WarpManifest3 manifest) { public String writeViniString(WarpManifestX8 manifest) {
StringWriter writer = new StringWriter(); StringWriter writer = new StringWriter();
writeViniStreamChar(manifest, writer); writeViniStreamChar(manifest, writer);
return writer.toString(); return writer.toString();
} }
public void writeViniStream(WarpManifest3 manifest, OutputStream output) { public void writeViniStream(WarpManifestX8 manifest, OutputStream output) {
writeViniStreamChar(manifest, new OutputStreamWriter(output, StandardCharsets.UTF_8)); writeViniStreamChar(manifest, new OutputStreamWriter(output, StandardCharsets.UTF_8));
} }
public void writeViniStreamChar(WarpManifest3 manifest, Writer output) { public void writeViniStreamChar(WarpManifestX8 manifest, Writer output) {
strobelight(manifest, new ScopicIniContentWriter(output), ScopicIniConstants.VERSION_NEW_TESTAMENT); strobelight(manifest, new ScopicIniContentWriter(output), ScopicIniConstants.VERSION_NEW_TESTAMENT);
} }
} }

View file

@ -30,19 +30,19 @@ package love.distributedrebirth.nx01.warp.manifestor.manifest;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
/// Warp manifest2 model. /// Warp manifest 0 bit model.
/// ///
/// @author للَّٰهِilLצسُو /// @author للَّٰهِilLצسُو
/// @version ©Δ 仙上主天 /// @version ©Δ 仙上主天
public interface WarpManifest2<T, M extends WarpManifest2<T, M, H, S>, H extends WarpManifest2HeaderField<T, H>, S extends WarpManifest2Section<T, H, S>> { public interface WarpManifestX0<T, M extends WarpManifestX0<T, M, H, S>, H extends WarpManifestX0HeaderField<T, H>, S extends WarpManifestX0Section<T, H, S>> {
List<H> getAttributes(); List<H> getAttributes();
H makeAttribute(T name, T body); H makeAttribute(T name, T body);
WarpManifest2<T, M, H, S> withAttribute(T name, T body); WarpManifestX0<T, M, H, S> withAttribute(T name, T body);
WarpManifest2<T, M, H, S> withAttributes(List<H> attrbutes); WarpManifestX0<T, M, H, S> withAttributes(List<H> attrbutes);
default boolean hasAttribute(T attributeName) { default boolean hasAttribute(T attributeName) {
for (H attr : getAttributes()) { for (H attr : getAttributes()) {

View file

@ -29,11 +29,11 @@ package love.distributedrebirth.nx01.warp.manifestor.manifest;
import java.util.List; import java.util.List;
/// Warp manifest2 name value pair entry. /// Warp manifest 0 bit name value pair entry.
/// ///
/// @author للَّٰهِilLצسُو /// @author للَّٰهِilLצسُو
/// @version ©Δ 仙上主天 /// @version ©Δ 仙上主天
public interface WarpManifest2HeaderField<T, H extends WarpManifest2HeaderField<T, H>> { public interface WarpManifestX0HeaderField<T, H extends WarpManifestX0HeaderField<T, H>> {
T getName(); T getName();

View file

@ -30,11 +30,11 @@ package love.distributedrebirth.nx01.warp.manifestor.manifest;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
/// Warp manifest2 section. /// Warp manifest 0 bit section.
/// ///
/// @author للَّٰهِilLצسُو /// @author للَّٰهِilLצسُو
/// @version ©Δ 仙上主天 /// @version ©Δ 仙上主天
public interface WarpManifest2Section<T, H extends WarpManifest2HeaderField<T, H>, S extends WarpManifest2Section<T, H, S>> { public interface WarpManifestX0Section<T, H extends WarpManifestX0HeaderField<T, H>, S extends WarpManifestX0Section<T, H, S>> {
T getName(); T getName();

View file

@ -35,11 +35,11 @@ import java.util.Optional;
import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestException; import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestException;
/// Warp manifest schema of the mime types and magic markers. /// Warp manifest 0 bit schema of the mime types and magic markers.
/// ///
/// @author للَّٰهِilLצسُو /// @author للَّٰهِilLצسُو
/// @version ©Δ 仙上主天 /// @version ©Δ 仙上主天
public enum WarpManifestTheMimeType { public enum WarpManifestX0TheMimeType {
MANIFEST_1 ("application/manifest", "MF", null), MANIFEST_1 ("application/manifest", "MF", null),
MANIFEST_2 ("application/manifest2", "MF2", null), MANIFEST_2 ("application/manifest2", "MF2", null),
@ -56,7 +56,7 @@ public enum WarpManifestTheMimeType {
private final String qExtension; private final String qExtension;
private final byte[] qMagicMarker; private final byte[] qMagicMarker;
private WarpManifestTheMimeType(String qName, String qExtension, byte[] qMagicMarker) { private WarpManifestX0TheMimeType(String qName, String qExtension, byte[] qMagicMarker) {
this.qName = qName; this.qName = qName;
this.qExtension = qExtension; this.qExtension = qExtension;
this.qMagicMarker = qMagicMarker; this.qMagicMarker = qMagicMarker;
@ -78,8 +78,8 @@ public enum WarpManifestTheMimeType {
return qMagicMarker; return qMagicMarker;
} }
static public Optional<WarpManifestTheMimeType> valueOfQName(String qName) { static public Optional<WarpManifestX0TheMimeType> valueOfQName(String qName) {
for (WarpManifestTheMimeType mimeType : WarpManifestTheMimeType.values()) { for (WarpManifestX0TheMimeType mimeType : WarpManifestX0TheMimeType.values()) {
if (mimeType.getQName().equals(qName)) { if (mimeType.getQName().equals(qName)) {
return Optional.of(mimeType); return Optional.of(mimeType);
} }
@ -87,7 +87,7 @@ public enum WarpManifestTheMimeType {
return Optional.empty(); return Optional.empty();
} }
static public WarpManifestTheMimeType magicMarkerRead(InputStream input, int markerLength) throws IOException { static public WarpManifestX0TheMimeType magicMarkerRead(InputStream input, int markerLength) throws IOException {
byte[] magicPrefix; byte[] magicPrefix;
if (markerLength == MARKER_3_LENGTH) { if (markerLength == MARKER_3_LENGTH) {
magicPrefix = input.readNBytes(markerLength); magicPrefix = input.readNBytes(markerLength);
@ -96,7 +96,7 @@ public enum WarpManifestTheMimeType {
} else { } else {
throw new ScopicManifestException("Unsupported marker length: " + markerLength); throw new ScopicManifestException("Unsupported marker length: " + markerLength);
} }
for (WarpManifestTheMimeType mimeType : WarpManifestTheMimeType.values()) { for (WarpManifestX0TheMimeType mimeType : WarpManifestX0TheMimeType.values()) {
if (mimeType.getQMagicMarker() == null) { if (mimeType.getQMagicMarker() == null) {
continue; continue;
} }
@ -107,7 +107,7 @@ public enum WarpManifestTheMimeType {
throw new ScopicManifestException("Unsupported marker: " + Arrays.toString(magicPrefix)); throw new ScopicManifestException("Unsupported marker: " + Arrays.toString(magicPrefix));
} }
static public void magicMarkerWrite(OutputStream output, WarpManifestTheMimeType marker) throws IOException { static public void magicMarkerWrite(OutputStream output, WarpManifestX0TheMimeType marker) throws IOException {
if (marker.getQMagicMarker() == null) { if (marker.getQMagicMarker() == null) {
return; return;
} }

View file

@ -33,11 +33,11 @@ import java.util.Optional;
import org.x4o.o2o.octal.PrimordialOctalOrangeJuiceCord; import org.x4o.o2o.octal.PrimordialOctalOrangeJuiceCord;
import org.x4o.o2o.octal.PrimordialOctalOrangeString; import org.x4o.o2o.octal.PrimordialOctalOrangeString;
/// Warp manifest schema of the version. /// Warp manifest 0 bit schema of the version.
/// ///
/// @author للَّٰهِilLצسُو /// @author للَّٰهِilLצسُو
/// @version ©Δ 仙上主天 /// @version ©Δ 仙上主天
public enum WarpManifestTheVersion { public enum WarpManifestX0TheVersion {
/// Format: teapot-ascii /// Format: teapot-ascii
VERSION_1_0("1.0"), VERSION_1_0("1.0"),
@ -62,7 +62,7 @@ public enum WarpManifestTheVersion {
private final String qName; private final String qName;
private WarpManifestTheVersion(String qName) { private WarpManifestX0TheVersion(String qName) {
this.qName = qName; this.qName = qName;
} }
@ -70,8 +70,8 @@ public enum WarpManifestTheVersion {
return qName; return qName;
} }
public static Optional<WarpManifestTheVersion> valueOfQName(String qName) { public static Optional<WarpManifestX0TheVersion> valueOfQName(String qName) {
for (WarpManifestTheVersion version : WarpManifestTheVersion.values()) { for (WarpManifestX0TheVersion version : WarpManifestX0TheVersion.values()) {
if (version.getQName().equals(qName)) { if (version.getQName().equals(qName)) {
return Optional.of(version); return Optional.of(version);
} }

View file

@ -32,58 +32,58 @@ import java.util.List;
import org.x4o.o2o.octal.PrimordialOctalOrangeJuiceCord; import org.x4o.o2o.octal.PrimordialOctalOrangeJuiceCord;
/// Warp manifest4 model. /// Warp manifest 18 bit model.
/// ///
/// @author للَّٰهِilLצسُو /// @author للَّٰهِilLצسُو
/// @version ©Δ 仙上主天 /// @version ©Δ 仙上主天
public final class WarpManifest4 implements WarpManifest2<PrimordialOctalOrangeJuiceCord, WarpManifest4, WarpManifest4HeaderField, WarpManifest4Section> { public final class WarpManifestX18 implements WarpManifestX0<PrimordialOctalOrangeJuiceCord, WarpManifestX18, WarpManifestX18HeaderField, WarpManifestX18Section> {
private final List<WarpManifest4HeaderField> attributes; private final List<WarpManifestX18HeaderField> attributes;
private final List<WarpManifest4Section> sections; private final List<WarpManifestX18Section> sections;
public WarpManifest4() { public WarpManifestX18() {
this.attributes = new ArrayList<>(); this.attributes = new ArrayList<>();
this.sections = new ArrayList<>(); this.sections = new ArrayList<>();
} }
@Override @Override
public List<WarpManifest4HeaderField> getAttributes() { public List<WarpManifestX18HeaderField> getAttributes() {
return attributes; return attributes;
} }
@Override @Override
public WarpManifest4HeaderField makeAttribute(PrimordialOctalOrangeJuiceCord name, PrimordialOctalOrangeJuiceCord body) { public WarpManifestX18HeaderField makeAttribute(PrimordialOctalOrangeJuiceCord name, PrimordialOctalOrangeJuiceCord body) {
WarpManifest4HeaderField result = new WarpManifest4HeaderField(name, body); WarpManifestX18HeaderField result = new WarpManifestX18HeaderField(name, body);
this.attributes.add(result); this.attributes.add(result);
return result; return result;
} }
@Override @Override
public WarpManifest4 withAttribute(PrimordialOctalOrangeJuiceCord name, PrimordialOctalOrangeJuiceCord body) { public WarpManifestX18 withAttribute(PrimordialOctalOrangeJuiceCord name, PrimordialOctalOrangeJuiceCord body) {
makeAttribute(name, body); makeAttribute(name, body);
return this; return this;
} }
@Override @Override
public WarpManifest4 withAttributes(List<WarpManifest4HeaderField> attributes) { public WarpManifestX18 withAttributes(List<WarpManifestX18HeaderField> attributes) {
this.attributes.addAll(attributes); this.attributes.addAll(attributes);
return this; return this;
} }
@Override @Override
public List<WarpManifest4Section> getSections() { public List<WarpManifestX18Section> getSections() {
return this.sections; return this.sections;
} }
@Override @Override
public WarpManifest4Section makeSection(PrimordialOctalOrangeJuiceCord sectionName) { public WarpManifestX18Section makeSection(PrimordialOctalOrangeJuiceCord sectionName) {
WarpManifest4Section result = new WarpManifest4Section(sectionName); WarpManifestX18Section result = new WarpManifestX18Section(sectionName);
this.sections.add(result); this.sections.add(result);
return result; return result;
} }
@Override @Override
public WarpManifest4 withSections(List<WarpManifest4Section> sections) { public WarpManifestX18 withSections(List<WarpManifestX18Section> sections) {
this.sections.addAll(sections); this.sections.addAll(sections);
return this; return this;
} }

View file

@ -32,21 +32,21 @@ import java.util.List;
import org.x4o.o2o.octal.PrimordialOctalOrangeJuiceCord; import org.x4o.o2o.octal.PrimordialOctalOrangeJuiceCord;
/// Warp manifest4 name value pair entry. /// Warp manifest 18 bit name value pair entry.
/// ///
/// @author للَّٰهِilLצسُو /// @author للَّٰهِilLצسُو
/// @version ©Δ 仙上主天 /// @version ©Δ 仙上主天
public final class WarpManifest4HeaderField implements WarpManifest2HeaderField<PrimordialOctalOrangeJuiceCord, WarpManifest4HeaderField> { public final class WarpManifestX18HeaderField implements WarpManifestX0HeaderField<PrimordialOctalOrangeJuiceCord, WarpManifestX18HeaderField> {
private PrimordialOctalOrangeJuiceCord name; private PrimordialOctalOrangeJuiceCord name;
private PrimordialOctalOrangeJuiceCord body; private PrimordialOctalOrangeJuiceCord body;
private final List<PrimordialOctalOrangeJuiceCord> remarks; private final List<PrimordialOctalOrangeJuiceCord> remarks;
public WarpManifest4HeaderField() { public WarpManifestX18HeaderField() {
this.remarks = new ArrayList<>(); this.remarks = new ArrayList<>();
} }
public WarpManifest4HeaderField(PrimordialOctalOrangeJuiceCord name, PrimordialOctalOrangeJuiceCord body) { public WarpManifestX18HeaderField(PrimordialOctalOrangeJuiceCord name, PrimordialOctalOrangeJuiceCord body) {
this(); this();
this.name = name; this.name = name;
this.body = body; this.body = body;
@ -78,13 +78,13 @@ public final class WarpManifest4HeaderField implements WarpManifest2HeaderField<
} }
@Override @Override
public WarpManifest4HeaderField withRemark(PrimordialOctalOrangeJuiceCord remark) { public WarpManifestX18HeaderField withRemark(PrimordialOctalOrangeJuiceCord remark) {
this.remarks.add(remark); this.remarks.add(remark);
return this; return this;
} }
@Override @Override
public WarpManifest4HeaderField withRemarks(List<PrimordialOctalOrangeJuiceCord> remarks) { public WarpManifestX18HeaderField withRemarks(List<PrimordialOctalOrangeJuiceCord> remarks) {
this.remarks.addAll(remarks); this.remarks.addAll(remarks);
return this; return this;
} }

View file

@ -32,22 +32,22 @@ import java.util.List;
import org.x4o.o2o.octal.PrimordialOctalOrangeJuiceCord; import org.x4o.o2o.octal.PrimordialOctalOrangeJuiceCord;
/// Warp manifest4 section. /// Warp manifest 18 bit section.
/// ///
/// @author للَّٰهِilLצسُو /// @author للَّٰهِilLצسُو
/// @version ©Δ 仙上主天 /// @version ©Δ 仙上主天
public final class WarpManifest4Section implements WarpManifest2Section<PrimordialOctalOrangeJuiceCord, WarpManifest4HeaderField, WarpManifest4Section> { public final class WarpManifestX18Section implements WarpManifestX0Section<PrimordialOctalOrangeJuiceCord, WarpManifestX18HeaderField, WarpManifestX18Section> {
private PrimordialOctalOrangeJuiceCord name; private PrimordialOctalOrangeJuiceCord name;
private final List<WarpManifest4HeaderField> attributes; private final List<WarpManifestX18HeaderField> attributes;
private final List<PrimordialOctalOrangeJuiceCord> remarks; private final List<PrimordialOctalOrangeJuiceCord> remarks;
public WarpManifest4Section() { public WarpManifestX18Section() {
this.attributes = new ArrayList<>(); this.attributes = new ArrayList<>();
this.remarks = new ArrayList<>(); this.remarks = new ArrayList<>();
} }
public WarpManifest4Section(PrimordialOctalOrangeJuiceCord name) { public WarpManifestX18Section(PrimordialOctalOrangeJuiceCord name) {
this(); this();
this.name = name; this.name = name;
} }
@ -63,26 +63,26 @@ public final class WarpManifest4Section implements WarpManifest2Section<Primordi
} }
@Override @Override
public List<WarpManifest4HeaderField> getAttributes() { public List<WarpManifestX18HeaderField> getAttributes() {
return attributes; return attributes;
} }
@Override @Override
public WarpManifest4HeaderField makeAttribute(PrimordialOctalOrangeJuiceCord name, PrimordialOctalOrangeJuiceCord body) { public WarpManifestX18HeaderField makeAttribute(PrimordialOctalOrangeJuiceCord name, PrimordialOctalOrangeJuiceCord body) {
WarpManifest4HeaderField result = new WarpManifest4HeaderField(name, body); WarpManifestX18HeaderField result = new WarpManifestX18HeaderField(name, body);
attributes.add(result); attributes.add(result);
return result; return result;
} }
@Override @Override
public WarpManifest4Section withAttribute(PrimordialOctalOrangeJuiceCord name, PrimordialOctalOrangeJuiceCord body) { public WarpManifestX18Section withAttribute(PrimordialOctalOrangeJuiceCord name, PrimordialOctalOrangeJuiceCord body) {
WarpManifest4HeaderField result = new WarpManifest4HeaderField(name, body); WarpManifestX18HeaderField result = new WarpManifestX18HeaderField(name, body);
attributes.add(result); attributes.add(result);
return this; return this;
} }
@Override @Override
public WarpManifest4Section withAttributes(List<WarpManifest4HeaderField> attributes) { public WarpManifestX18Section withAttributes(List<WarpManifestX18HeaderField> attributes) {
this.attributes.addAll(attributes); this.attributes.addAll(attributes);
return this; return this;
} }
@ -93,13 +93,13 @@ public final class WarpManifest4Section implements WarpManifest2Section<Primordi
} }
@Override @Override
public WarpManifest4Section withRemark(PrimordialOctalOrangeJuiceCord remark) { public WarpManifestX18Section withRemark(PrimordialOctalOrangeJuiceCord remark) {
this.remarks.add(remark); this.remarks.add(remark);
return this; return this;
} }
@Override @Override
public WarpManifest4Section withRemarks(List<PrimordialOctalOrangeJuiceCord> remarks) { public WarpManifestX18Section withRemarks(List<PrimordialOctalOrangeJuiceCord> remarks) {
this.remarks.addAll(remarks); this.remarks.addAll(remarks);
return this; return this;
} }

View file

@ -30,58 +30,58 @@ package love.distributedrebirth.nx01.warp.manifestor.manifest;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
/// Warp manifest3 model. /// Warp manifest 8 bit model.
/// ///
/// @author للَّٰهِilLצسُو /// @author للَّٰهِilLצسُو
/// @version ©Δ 仙上主天 /// @version ©Δ 仙上主天
public final class WarpManifest3 implements WarpManifest2<String, WarpManifest3, WarpManifest3HeaderField, WarpManifest3Section> { public final class WarpManifestX8 implements WarpManifestX0<String, WarpManifestX8, WarpManifestX8HeaderField, WarpManifestX8Section> {
private final List<WarpManifest3HeaderField> attributes; private final List<WarpManifestX8HeaderField> attributes;
private final List<WarpManifest3Section> sections; private final List<WarpManifestX8Section> sections;
public WarpManifest3() { public WarpManifestX8() {
this.attributes = new ArrayList<>(); this.attributes = new ArrayList<>();
this.sections = new ArrayList<>(); this.sections = new ArrayList<>();
} }
@Override @Override
public List<WarpManifest3HeaderField> getAttributes() { public List<WarpManifestX8HeaderField> getAttributes() {
return this.attributes; return this.attributes;
} }
@Override @Override
public WarpManifest3HeaderField makeAttribute(String name, String body) { public WarpManifestX8HeaderField makeAttribute(String name, String body) {
WarpManifest3HeaderField result = new WarpManifest3HeaderField(name, body); WarpManifestX8HeaderField result = new WarpManifestX8HeaderField(name, body);
this.attributes.add(result); this.attributes.add(result);
return result; return result;
} }
@Override @Override
public WarpManifest3 withAttribute(String name, String body) { public WarpManifestX8 withAttribute(String name, String body) {
makeAttribute(name, body); makeAttribute(name, body);
return this; return this;
} }
@Override @Override
public WarpManifest3 withAttributes(List<WarpManifest3HeaderField> attributes) { public WarpManifestX8 withAttributes(List<WarpManifestX8HeaderField> attributes) {
this.attributes.addAll(attributes); this.attributes.addAll(attributes);
return this; return this;
} }
@Override @Override
public List<WarpManifest3Section> getSections() { public List<WarpManifestX8Section> getSections() {
return this.sections; return this.sections;
} }
@Override @Override
public WarpManifest3Section makeSection(String sectionName) { public WarpManifestX8Section makeSection(String sectionName) {
WarpManifest3Section result = new WarpManifest3Section(sectionName); WarpManifestX8Section result = new WarpManifestX8Section(sectionName);
this.sections.add(result); this.sections.add(result);
return result; return result;
} }
@Override @Override
public WarpManifest3 withSections(List<WarpManifest3Section> sections) { public WarpManifestX8 withSections(List<WarpManifestX8Section> sections) {
this.sections.addAll(sections); this.sections.addAll(sections);
return this; return this;
} }

View file

@ -30,21 +30,21 @@ package love.distributedrebirth.nx01.warp.manifestor.manifest;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
/// Warp manifest3 name value pair entry. /// Warp manifest 8 bit name value pair entry.
/// ///
/// @author للَّٰهِilLצسُو /// @author للَّٰهِilLצسُو
/// @version ©Δ 仙上主天 /// @version ©Δ 仙上主天
public final class WarpManifest3HeaderField implements WarpManifest2HeaderField<String, WarpManifest3HeaderField> { public final class WarpManifestX8HeaderField implements WarpManifestX0HeaderField<String, WarpManifestX8HeaderField> {
private String name; private String name;
private String body; private String body;
private final List<String> remarks; private final List<String> remarks;
public WarpManifest3HeaderField() { public WarpManifestX8HeaderField() {
this.remarks = new ArrayList<>(); this.remarks = new ArrayList<>();
} }
public WarpManifest3HeaderField(String name, String body) { public WarpManifestX8HeaderField(String name, String body) {
this(); this();
this.name = name; this.name = name;
this.body = body; this.body = body;
@ -76,13 +76,13 @@ public final class WarpManifest3HeaderField implements WarpManifest2HeaderField<
} }
@Override @Override
public WarpManifest3HeaderField withRemark(String remark) { public WarpManifestX8HeaderField withRemark(String remark) {
this.remarks.add(remark); this.remarks.add(remark);
return this; return this;
} }
@Override @Override
public WarpManifest3HeaderField withRemarks(List<String> remarks) { public WarpManifestX8HeaderField withRemarks(List<String> remarks) {
this.remarks.addAll(remarks); this.remarks.addAll(remarks);
return this; return this;
} }

View file

@ -30,22 +30,22 @@ package love.distributedrebirth.nx01.warp.manifestor.manifest;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
/// Warp manifest3 section. /// Warp manifest 8 bit section.
/// ///
/// @author للَّٰهِilLצسُو /// @author للَّٰهِilLצسُو
/// @version ©Δ 仙上主天 /// @version ©Δ 仙上主天
public final class WarpManifest3Section implements WarpManifest2Section<String, WarpManifest3HeaderField, WarpManifest3Section> { public final class WarpManifestX8Section implements WarpManifestX0Section<String, WarpManifestX8HeaderField, WarpManifestX8Section> {
private String name; private String name;
private final List<WarpManifest3HeaderField> attributes; private final List<WarpManifestX8HeaderField> attributes;
private final List<String> remarks; private final List<String> remarks;
public WarpManifest3Section() { public WarpManifestX8Section() {
this.attributes = new ArrayList<>(); this.attributes = new ArrayList<>();
this.remarks = new ArrayList<>(); this.remarks = new ArrayList<>();
} }
public WarpManifest3Section(String name) { public WarpManifestX8Section(String name) {
this(); this();
this.name = name; this.name = name;
} }
@ -61,26 +61,26 @@ public final class WarpManifest3Section implements WarpManifest2Section<String,
} }
@Override @Override
public List<WarpManifest3HeaderField> getAttributes() { public List<WarpManifestX8HeaderField> getAttributes() {
return attributes; return attributes;
} }
@Override @Override
public WarpManifest3HeaderField makeAttribute(String name, String body) { public WarpManifestX8HeaderField makeAttribute(String name, String body) {
WarpManifest3HeaderField result = new WarpManifest3HeaderField(name, body); WarpManifestX8HeaderField result = new WarpManifestX8HeaderField(name, body);
this.attributes.add(result); this.attributes.add(result);
return result; return result;
} }
@Override @Override
public WarpManifest3Section withAttribute(String name, String body) { public WarpManifestX8Section withAttribute(String name, String body) {
WarpManifest3HeaderField result = new WarpManifest3HeaderField(name, body); WarpManifestX8HeaderField result = new WarpManifestX8HeaderField(name, body);
this.attributes.add(result); this.attributes.add(result);
return this; return this;
} }
@Override @Override
public WarpManifest3Section withAttributes(List<WarpManifest3HeaderField> attributes) { public WarpManifestX8Section withAttributes(List<WarpManifestX8HeaderField> attributes) {
this.attributes.addAll(attributes); this.attributes.addAll(attributes);
return this; return this;
} }
@ -91,13 +91,13 @@ public final class WarpManifest3Section implements WarpManifest2Section<String,
} }
@Override @Override
public WarpManifest3Section withRemark(String remark) { public WarpManifestX8Section withRemark(String remark) {
this.remarks.add(remark); this.remarks.add(remark);
return this; return this;
} }
@Override @Override
public WarpManifest3Section withRemarks(List<String> remarks) { public WarpManifestX8Section withRemarks(List<String> remarks) {
this.remarks.addAll(remarks); this.remarks.addAll(remarks);
return this; return this;
} }

View file

@ -32,9 +32,9 @@ import java.util.List;
import java.util.Objects; import java.util.Objects;
import java.util.Optional; import java.util.Optional;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest3; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest3Section; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8Section;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestTheVersion; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX0TheVersion;
/// Stroboscopic manifest 1 and 2 content handler. /// Stroboscopic manifest 1 and 2 content handler.
/// ///
@ -42,12 +42,12 @@ import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestTheVers
/// @version ©Δ 仙上主天 /// @version ©Δ 仙上主天
public class ScopicManifestContentStringHandler implements ScopicManifestContent<String> { public class ScopicManifestContentStringHandler implements ScopicManifestContent<String> {
private final WarpManifest3 manifest; private final WarpManifestX8 manifest;
private WarpManifest3Section currentSection; private WarpManifestX8Section currentSection;
private List<String> remarks; private List<String> remarks;
private WarpManifestTheVersion[] supportedVersions; private WarpManifestX0TheVersion[] supportedVersions;
public ScopicManifestContentStringHandler(WarpManifest3 manifest, WarpManifestTheVersion... supportedVersions) { public ScopicManifestContentStringHandler(WarpManifestX8 manifest, WarpManifestX0TheVersion... supportedVersions) {
this.manifest = manifest; this.manifest = manifest;
this.remarks = new ArrayList<>(); this.remarks = new ArrayList<>();
this.supportedVersions = supportedVersions; this.supportedVersions = supportedVersions;
@ -58,12 +58,12 @@ public class ScopicManifestContentStringHandler implements ScopicManifestContent
if (supportedVersions.length == 0) { if (supportedVersions.length == 0) {
return; // no check requested return; // no check requested
} }
Optional<WarpManifestTheVersion> manifestVersion = WarpManifestTheVersion.valueOfQName(version); Optional<WarpManifestX0TheVersion> manifestVersion = WarpManifestX0TheVersion.valueOfQName(version);
if (manifestVersion.isEmpty()) { if (manifestVersion.isEmpty()) {
throw new ScopicManifestException("Unknown manifest version: " + version); throw new ScopicManifestException("Unknown manifest version: " + version);
} }
WarpManifestTheVersion versionParsed = manifestVersion.get(); WarpManifestX0TheVersion versionParsed = manifestVersion.get();
for (WarpManifestTheVersion supportedVersion : supportedVersions) { for (WarpManifestX0TheVersion supportedVersion : supportedVersions) {
if (supportedVersion.equals(versionParsed)) { if (supportedVersion.equals(versionParsed)) {
return; return;
} }

View file

@ -37,8 +37,8 @@ import java.util.PrimitiveIterator;
import org.x4o.o2o.io.sax3.XMLConstants; import org.x4o.o2o.io.sax3.XMLConstants;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest3HeaderField; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8HeaderField;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestTheVersion; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX0TheVersion;
import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestContent; import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestContent;
import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestException; import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestException;
@ -51,7 +51,7 @@ public class ScopicManifestContentReader {
static public final boolean FORCE_VERSION_1_0 = true; static public final boolean FORCE_VERSION_1_0 = true;
private final ScopicManifestContent<String> handler; private final ScopicManifestContent<String> handler;
private final boolean forceV1; private final boolean forceV1;
private WarpManifestTheVersion version; private WarpManifestX0TheVersion version;
public ScopicManifestContentReader(ScopicManifestContent<String> handler) { public ScopicManifestContentReader(ScopicManifestContent<String> handler) {
this(handler, false); this(handler, false);
@ -66,11 +66,11 @@ public class ScopicManifestContentReader {
try (BufferedReader in = new BufferedReader(new InputStreamReader(input, StandardCharsets.UTF_8))) { try (BufferedReader in = new BufferedReader(new InputStreamReader(input, StandardCharsets.UTF_8))) {
handler.strobeManifestStart(); handler.strobeManifestStart();
String line = in.readLine(); String line = in.readLine();
WarpManifest3HeaderField fieldVersion = parseLine(line); WarpManifestX8HeaderField fieldVersion = parseLine(line);
version = parseVersion(fieldVersion); version = parseVersion(fieldVersion);
handler.strobeManifestDeclaration(version.getQName()); handler.strobeManifestDeclaration(version.getQName());
WarpManifest3HeaderField fieldPrev = null; WarpManifestX8HeaderField fieldPrev = null;
WarpManifest3HeaderField field = null; WarpManifestX8HeaderField field = null;
boolean isContinuation = false; boolean isContinuation = false;
String currentName = null; String currentName = null;
StringBuilder currentBody = new StringBuilder(); StringBuilder currentBody = new StringBuilder();
@ -140,19 +140,19 @@ public class ScopicManifestContentReader {
} }
} }
private WarpManifestTheVersion parseVersion(WarpManifest3HeaderField fieldVersion) { private WarpManifestX0TheVersion parseVersion(WarpManifestX8HeaderField fieldVersion) {
if (!ScopicManifestConstants.ATTR_MANIFEST_VERSION.equalsIgnoreCase(fieldVersion.getName())) { if (!ScopicManifestConstants.ATTR_MANIFEST_VERSION.equalsIgnoreCase(fieldVersion.getName())) {
throw new ScopicManifestException("Wrong magic version: " + fieldVersion.getName()); // NOTE: on V3 input this should fail, name == null throw new ScopicManifestException("Wrong magic version: " + fieldVersion.getName()); // NOTE: on V3 input this should fail, name == null
} }
Optional<WarpManifestTheVersion> versionOpt = WarpManifestTheVersion.valueOfQName(fieldVersion.getBody()); Optional<WarpManifestX0TheVersion> versionOpt = WarpManifestX0TheVersion.valueOfQName(fieldVersion.getBody());
if (versionOpt.isEmpty()) { if (versionOpt.isEmpty()) {
throw new ScopicManifestException("Missing manifest version: " + fieldVersion.getBody()); throw new ScopicManifestException("Missing manifest version: " + fieldVersion.getBody());
} }
WarpManifestTheVersion versionFile = versionOpt.get(); WarpManifestX0TheVersion versionFile = versionOpt.get();
if (WarpManifestTheVersion.VERSION_1_0.equals(versionFile)) { if (WarpManifestX0TheVersion.VERSION_1_0.equals(versionFile)) {
return versionFile; return versionFile;
} }
if (WarpManifestTheVersion.VERSION_2_0.equals(versionFile)) { if (WarpManifestX0TheVersion.VERSION_2_0.equals(versionFile)) {
if (forceV1) { if (forceV1) {
throw new ScopicManifestException("Illegal manifest V2 version in V1 mode: " + version); throw new ScopicManifestException("Illegal manifest V2 version in V1 mode: " + version);
} }
@ -161,17 +161,17 @@ public class ScopicManifestContentReader {
throw new ScopicManifestException("Unsupported manifest version: " + version); throw new ScopicManifestException("Unsupported manifest version: " + version);
} }
private WarpManifest3HeaderField parseLine(String line) { private WarpManifestX8HeaderField parseLine(String line) {
int splitIdx = line.indexOf(ScopicManifestConstants.PART_ATTR_SEPERATOR); int splitIdx = line.indexOf(ScopicManifestConstants.PART_ATTR_SEPERATOR);
if (splitIdx == -1) { if (splitIdx == -1) {
return new WarpManifest3HeaderField(line, line); return new WarpManifestX8HeaderField(line, line);
} }
String name = line.substring(0, splitIdx); String name = line.substring(0, splitIdx);
if (WarpManifestTheVersion.VERSION_2_0.equals(version)) { if (WarpManifestX0TheVersion.VERSION_2_0.equals(version)) {
name = normalizeV2NameString(name); name = normalizeV2NameString(name);
} }
String body = line.substring(splitIdx + 2, line.length()); String body = line.substring(splitIdx + 2, line.length());
return new WarpManifest3HeaderField(name, body); return new WarpManifestX8HeaderField(name, body);
} }
private String normalizeV2NameString(String value) { private String normalizeV2NameString(String value) {

View file

@ -33,7 +33,7 @@ import java.util.Arrays;
import java.util.PrimitiveIterator; import java.util.PrimitiveIterator;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestTheVersion; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX0TheVersion;
import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestContent; import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestContent;
import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestDuplicateDetector; import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestDuplicateDetector;
import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestDuplicatePart; import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestDuplicatePart;
@ -78,7 +78,7 @@ public class ScopicManifestContentWriter implements ScopicManifestContent<String
throw new ScopicManifestException("Declaration already printed."); throw new ScopicManifestException("Declaration already printed.");
} }
printedDeclaration = true; printedDeclaration = true;
if (WarpManifestTheVersion.VERSION_1_0.getQName().equals(version)) { if (WarpManifestX0TheVersion.VERSION_1_0.getQName().equals(version)) {
printVersion1 = true; printVersion1 = true;
} }
if (version.length() > ScopicManifestConstants.ATTR_MANIFEST_VERSION_MAX_LENGHT) { if (version.length() > ScopicManifestConstants.ATTR_MANIFEST_VERSION_MAX_LENGHT) {

View file

@ -34,7 +34,7 @@ import java.util.Optional;
import org.x4o.o2o.io.tlv.TLVChainSexTeenBit; import org.x4o.o2o.io.tlv.TLVChainSexTeenBit;
import org.x4o.o2o.io.tlv.TLVChainSexTeenBitFrame; import org.x4o.o2o.io.tlv.TLVChainSexTeenBitFrame;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestTheVersion; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX0TheVersion;
import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestContent; import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestContent;
import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestException; import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestException;
@ -62,14 +62,14 @@ public class ScopicManifest3ContentReader {
throw new ScopicManifestException("Wrong magic version: 0x" + Integer.toHexString(frameVersion.getSegmentPrologSmurf())); throw new ScopicManifestException("Wrong magic version: 0x" + Integer.toHexString(frameVersion.getSegmentPrologSmurf()));
} }
String fieldVersion = frameVersion.getSegmentChainString(); String fieldVersion = frameVersion.getSegmentChainString();
Optional<WarpManifestTheVersion> versionOpt = WarpManifestTheVersion.valueOfQName(fieldVersion); Optional<WarpManifestX0TheVersion> versionOpt = WarpManifestX0TheVersion.valueOfQName(fieldVersion);
if (versionOpt.isEmpty()) { if (versionOpt.isEmpty()) {
throw new ScopicManifestException("Unsupported version: " + fieldVersion); throw new ScopicManifestException("Unsupported version: " + fieldVersion);
} }
if (!versionOpt.get().equals(WarpManifestTheVersion.VERSION_3_0)) { if (!versionOpt.get().equals(WarpManifestX0TheVersion.VERSION_3_0)) {
throw new ScopicManifestException("Mismatched version: " + fieldVersion); throw new ScopicManifestException("Mismatched version: " + fieldVersion);
} }
handler.strobeManifestDeclaration(WarpManifestTheVersion.VERSION_3_0.getQName()); handler.strobeManifestDeclaration(WarpManifestX0TheVersion.VERSION_3_0.getQName());
while (chainIterator.hasNext()) { while (chainIterator.hasNext()) {
TLVChainSexTeenBitFrame frame = chainIterator.next(); TLVChainSexTeenBitFrame frame = chainIterator.next();
if (ScopicManifest3FrameTLV.MAIN_ATTRIBUTE_NAME.ordinalFrameTypeSmurf() == frame.getSegmentPrologSmurf()) { if (ScopicManifest3FrameTLV.MAIN_ATTRIBUTE_NAME.ordinalFrameTypeSmurf() == frame.getSegmentPrologSmurf()) {

View file

@ -33,9 +33,9 @@ import java.util.Objects;
import org.x4o.o2o.octal.PrimordialOctalOrangeJuiceCord; import org.x4o.o2o.octal.PrimordialOctalOrangeJuiceCord;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest4; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX18;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest4Section; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX18Section;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestTheVersion; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX0TheVersion;
import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestContent; import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestContent;
import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestException; import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestException;
@ -45,18 +45,18 @@ import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestExcepti
/// @version ©Δ 仙上主天 /// @version ©Δ 仙上主天
public class ScopicManifest4ContentHandler implements ScopicManifestContent<PrimordialOctalOrangeJuiceCord> { public class ScopicManifest4ContentHandler implements ScopicManifestContent<PrimordialOctalOrangeJuiceCord> {
private final WarpManifest4 manifest; private final WarpManifestX18 manifest;
private WarpManifest4Section currentSection; private WarpManifestX18Section currentSection;
private List<PrimordialOctalOrangeJuiceCord> remarks; private List<PrimordialOctalOrangeJuiceCord> remarks;
public ScopicManifest4ContentHandler(WarpManifest4 manifest) { public ScopicManifest4ContentHandler(WarpManifestX18 manifest) {
this.manifest = manifest; this.manifest = manifest;
this.remarks = new ArrayList<>(); this.remarks = new ArrayList<>();
} }
@Override @Override
public void strobeManifestDeclaration(PrimordialOctalOrangeJuiceCord version) { public void strobeManifestDeclaration(PrimordialOctalOrangeJuiceCord version) {
if (WarpManifestTheVersion.VERSION_4_0.equals(version)) { if (WarpManifestX0TheVersion.VERSION_4_0.equals(version)) {
return; return;
} }
throw new ScopicManifestException("Unsupported manifest version: " + version); throw new ScopicManifestException("Unsupported manifest version: " + version);

View file

@ -34,7 +34,7 @@ import org.x4o.o2o.io.tlv.TLVChainOctalSex;
import org.x4o.o2o.io.tlv.TLVChainOctalSexFrame; import org.x4o.o2o.io.tlv.TLVChainOctalSexFrame;
import org.x4o.o2o.octal.PrimordialOctalOrangeJuiceCord; import org.x4o.o2o.octal.PrimordialOctalOrangeJuiceCord;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestTheVersion; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX0TheVersion;
import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestContent; import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestContent;
import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestException; import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestException;
@ -62,8 +62,8 @@ public class ScopicManifest4ContentReader {
throw new ScopicManifestException("Wrong magic version: 0y" + frameVersion.getSegmentProlog()); throw new ScopicManifestException("Wrong magic version: 0y" + frameVersion.getSegmentProlog());
} }
PrimordialOctalOrangeJuiceCord fieldVersion = frameVersion.getSegmentChainAtoms(); PrimordialOctalOrangeJuiceCord fieldVersion = frameVersion.getSegmentChainAtoms();
if (!WarpManifestTheVersion.VERSION_4_0.equals(fieldVersion)) { if (!WarpManifestX0TheVersion.VERSION_4_0.equals(fieldVersion)) {
throw new ScopicManifestException("Mismatched version: " + fieldVersion + " requested: " + WarpManifestTheVersion.VERSION_4_0); throw new ScopicManifestException("Mismatched version: " + fieldVersion + " requested: " + WarpManifestX0TheVersion.VERSION_4_0);
} }
handler.strobeManifestDeclaration(frameVersion.getSegmentChainAtoms()); handler.strobeManifestDeclaration(frameVersion.getSegmentChainAtoms());
while (chainIterator.hasNext()) { while (chainIterator.hasNext()) {

View file

@ -31,8 +31,8 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver; import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest3; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest3Section; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8Section;
/// @author للَّٰهِilLצسُو /// @author للَّٰهِilLצسُو
/// @version ©Δ 仙上主天s /// @version ©Δ 仙上主天s
@ -40,11 +40,11 @@ public class WarpManifestChinaTest {
@Test @Test
public void testFullChineesium() { public void testFullChineesium() {
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.makeAttribute("", "乞丐歌本").withRemark("同義詞 乞丐歌集"); manifest.makeAttribute("", "乞丐歌本").withRemark("同義詞 乞丐歌集");
manifest.makeAttribute("", "一千五百八十一").withRemark("與中國年份時間不同的年份時間"); manifest.makeAttribute("", "一千五百八十一").withRemark("與中國年份時間不同的年份時間");
manifest.makeAttribute("描述", "起司頭押韻詞海盜歌曲歌詞"); manifest.makeAttribute("描述", "起司頭押韻詞海盜歌曲歌詞");
WarpManifest3Section section = null; WarpManifestX8Section section = null;
section = manifest.makeSection("第一節").withRemark("所以這是一個可選的額外元信息文本"); section = manifest.makeSection("第一節").withRemark("所以這是一個可選的額外元信息文本");
section.makeAttribute("一號線", "威廉斯·範·納蘇韋").withRemark("章魚有八隻手臂"); section.makeAttribute("一號線", "威廉斯·範·納蘇韋").withRemark("章魚有八隻手臂");
@ -200,6 +200,6 @@ public class WarpManifestChinaTest {
Assertions.assertNotNull(output); Assertions.assertNotNull(output);
System.out.println(output); System.out.println(output);
System.out.println("========="); System.out.println("=========");
System.out.println(WarpManifestorDriver..writeViniString(new WarpManifest3().withSections(manifest.getSections()))); System.out.println(WarpManifestorDriver..writeViniString(new WarpManifestX8().withSections(manifest.getSections())));
} }
} }

View file

@ -31,7 +31,7 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver; import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest3; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8;
/// @author للَّٰهِilLצسُو /// @author للَّٰهِilLצسُو
/// @version ©Δ 仙上主天 /// @version ©Δ 仙上主天
@ -39,7 +39,7 @@ public class WarpManifestorDriverTest {
@Test @Test
public void testWriteSimple() { public void testWriteSimple() {
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.makeAttribute("foo", "bar"); manifest.makeAttribute("foo", "bar");
manifest.makeSection("my1").withAttribute("foo1", "bar1"); manifest.makeSection("my1").withAttribute("foo1", "bar1");
String output = WarpManifestorDriver..writeV2String(manifest); String output = WarpManifestorDriver..writeV2String(manifest);
@ -51,7 +51,7 @@ public class WarpManifestorDriverTest {
public void testLineWrapAsLastLine() { public void testLineWrapAsLastLine() {
String checkWrap = "https://github.com/shrinkwrap/resolver/shrinkwrap-resolver-spi-maven-archive"; String checkWrap = "https://github.com/shrinkwrap/resolver/shrinkwrap-resolver-spi-maven-archive";
String checkWrapLast = "http://www.jboss.org/shrinkwrap-resolver-parent/shrinkwrap-resolver-spi-maven-archive"; String checkWrapLast = "http://www.jboss.org/shrinkwrap-resolver-parent/shrinkwrap-resolver-spi-maven-archive";
WarpManifest3 manitest = WarpManifestorDriver..readV2Stream(getClass().getResourceAsStream("test-line-wrap.mf")); WarpManifestX8 manitest = WarpManifestorDriver..readV2Stream(getClass().getResourceAsStream("test-line-wrap.mf"));
Assertions.assertNotNull(manitest); Assertions.assertNotNull(manitest);
Assertions.assertEquals(21, manitest.getAttributes().size()); Assertions.assertEquals(21, manitest.getAttributes().size());
Assertions.assertEquals("Implementation-Title", manitest.getAttributes().get(0).getName()); Assertions.assertEquals("Implementation-Title", manitest.getAttributes().get(0).getName());

View file

@ -31,7 +31,7 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver; import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest3; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8;
/// @author للَّٰهِilLצسُو /// @author للَّٰهِilLצسُو
/// @version ©Δ 仙上主天 /// @version ©Δ 仙上主天
@ -39,7 +39,7 @@ public class WarpManifestorVIniTest {
@Test @Test
public void testViniReadSystemdService() { public void testViniReadSystemdService() {
WarpManifest3 manitest = WarpManifestorDriver..readViniStream(getClass().getResourceAsStream("ini/test-ntp.service")); WarpManifestX8 manitest = WarpManifestorDriver..readViniStream(getClass().getResourceAsStream("ini/test-ntp.service"));
Assertions.assertNotNull(manitest); Assertions.assertNotNull(manitest);
Assertions.assertEquals(3, manitest.getSections().size()); Assertions.assertEquals(3, manitest.getSections().size());
Assertions.assertEquals("Network Time Service", manitest.getSectionAttributeBodyPrivate("Unit", "Description")); Assertions.assertEquals("Network Time Service", manitest.getSectionAttributeBodyPrivate("Unit", "Description"));
@ -49,7 +49,7 @@ public class WarpManifestorVIniTest {
@Test @Test
public void testViniReadSimple() { public void testViniReadSimple() {
WarpManifest3 manitest = WarpManifestorDriver..readViniStream(getClass().getResourceAsStream("ini/test-simple.ini")); WarpManifestX8 manitest = WarpManifestorDriver..readViniStream(getClass().getResourceAsStream("ini/test-simple.ini"));
Assertions.assertNotNull(manitest); Assertions.assertNotNull(manitest);
Assertions.assertEquals(3, manitest.getSections().size()); Assertions.assertEquals(3, manitest.getSections().size());
@ -70,7 +70,7 @@ public class WarpManifestorVIniTest {
@Test @Test
public void testViniReadFruitFolding() { public void testViniReadFruitFolding() {
WarpManifest3 manitest = WarpManifestorDriver..readViniStream(getClass().getResourceAsStream("ini/test-fruit-folding.ini")); WarpManifestX8 manitest = WarpManifestorDriver..readViniStream(getClass().getResourceAsStream("ini/test-fruit-folding.ini"));
Assertions.assertNotNull(manitest); Assertions.assertNotNull(manitest);
Assertions.assertEquals(6, manitest.getSections().size()); Assertions.assertEquals(6, manitest.getSections().size());
@ -94,7 +94,7 @@ public class WarpManifestorVIniTest {
@Test @Test
public void testViniWriteFruitFolding() { public void testViniWriteFruitFolding() {
WarpManifest3 manitest = WarpManifestorDriver..readViniStream(getClass().getResourceAsStream("ini/test-fruit-folding.ini")); WarpManifestX8 manitest = WarpManifestorDriver..readViniStream(getClass().getResourceAsStream("ini/test-fruit-folding.ini"));
Assertions.assertNotNull(manitest); Assertions.assertNotNull(manitest);
String strini = WarpManifestorDriver..writeViniString(manitest); String strini = WarpManifestorDriver..writeViniString(manitest);
Assertions.assertTrue(strini.contains("target region = Bay Area")); Assertions.assertTrue(strini.contains("target region = Bay Area"));
@ -108,7 +108,7 @@ public class WarpManifestorVIniTest {
@Test @Test
public void testViniReadEscQuote() { public void testViniReadEscQuote() {
WarpManifest3 manitest = WarpManifestorDriver..readViniStream(getClass().getResourceAsStream("ini/test-esc-quote.ini")); WarpManifestX8 manitest = WarpManifestorDriver..readViniStream(getClass().getResourceAsStream("ini/test-esc-quote.ini"));
Assertions.assertNotNull(manitest); Assertions.assertNotNull(manitest);
Assertions.assertEquals(3, manitest.getSections().size()); Assertions.assertEquals(3, manitest.getSections().size());

View file

@ -33,7 +33,7 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver; import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest3; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8;
import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestException; import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestException;
/// @author للَّٰهِilLצسُو /// @author للَّٰهِilLצسُو
@ -46,7 +46,7 @@ public class WarpManifestBigBodyTest {
for (int i=0;i<512;i++) { for (int i=0;i<512;i++) {
buf.append("1234"); buf.append("1234");
} }
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("long-longer-longggger", buf.toString()); manifest.withAttribute("long-longer-longggger", buf.toString());
String output = WarpManifestorDriver..writeV1String(manifest); String output = WarpManifestorDriver..writeV1String(manifest);
Assertions.assertNotNull(output); Assertions.assertNotNull(output);
@ -62,7 +62,7 @@ public class WarpManifestBigBodyTest {
for (int i=0;i<512;i++) { for (int i=0;i<512;i++) {
buf.append("1234"); buf.append("1234");
} }
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("long-longer-longggger", buf.toString()); manifest.withAttribute("long-longer-longggger", buf.toString());
String output = WarpManifestorDriver..writeV2String(manifest); String output = WarpManifestorDriver..writeV2String(manifest);
Assertions.assertNotNull(output); Assertions.assertNotNull(output);
@ -72,7 +72,7 @@ public class WarpManifestBigBodyTest {
Assertions.assertEquals(2071, lines[1].getBytes(StandardCharsets.UTF_8).length); Assertions.assertEquals(2071, lines[1].getBytes(StandardCharsets.UTF_8).length);
String outputV1 = WarpManifestorDriver..writeV1String(manifest); String outputV1 = WarpManifestorDriver..writeV1String(manifest);
WarpManifest3 manitestV1 = WarpManifestorDriver..readV2String(outputV1); WarpManifestX8 manitestV1 = WarpManifestorDriver..readV2String(outputV1);
Assertions.assertNotNull(manitestV1); Assertions.assertNotNull(manitestV1);
Assertions.assertEquals(1, manitestV1.getAttributes().size()); Assertions.assertEquals(1, manitestV1.getAttributes().size());
} }
@ -83,11 +83,11 @@ public class WarpManifestBigBodyTest {
for (int i=0;i<65535;i++) { for (int i=0;i<65535;i++) {
buf.append("0"); buf.append("0");
} }
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("limit-lines", buf.toString()); manifest.withAttribute("limit-lines", buf.toString());
byte[] output = WarpManifestorDriver..writeV3Array(manifest); byte[] output = WarpManifestorDriver..writeV3Array(manifest);
Assertions.assertNotNull(output); Assertions.assertNotNull(output);
WarpManifest3 manifestClone = WarpManifestorDriver..readV3Array(output); WarpManifestX8 manifestClone = WarpManifestorDriver..readV3Array(output);
Assertions.assertEquals(manifest.getAttributes().get(0).getBody(), manifestClone.getAttributes().get(0).getBody()); Assertions.assertEquals(manifest.getAttributes().get(0).getBody(), manifestClone.getAttributes().get(0).getBody());
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
manifest.withAttribute("limit-lines", "1" + buf.toString()); manifest.withAttribute("limit-lines", "1" + buf.toString());

View file

@ -31,7 +31,7 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver; import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest3; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8;
import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestException; import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestException;
/// @author للَّٰهِilLצسُو /// @author للَّٰهِilLצسُو
@ -40,7 +40,7 @@ public class WarpManifestBodyIllegalTest {
@Test @Test
public void testWriteV1BodyNewLine() { public void testWriteV1BodyNewLine() {
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo", "bar\n"); manifest.withAttribute("foo", "bar\n");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV1String(manifest); WarpManifestorDriver..writeV1String(manifest);
@ -49,7 +49,7 @@ public class WarpManifestBodyIllegalTest {
@Test @Test
public void testWriteV1BodyLineFeed() { public void testWriteV1BodyLineFeed() {
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo", "bar\r"); manifest.withAttribute("foo", "bar\r");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV1String(manifest); WarpManifestorDriver..writeV1String(manifest);
@ -58,7 +58,7 @@ public class WarpManifestBodyIllegalTest {
@Test @Test
public void testWriteV1BodyNull() { public void testWriteV1BodyNull() {
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo", "bar\u0000"); manifest.withAttribute("foo", "bar\u0000");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV1String(manifest); WarpManifestorDriver..writeV1String(manifest);
@ -67,7 +67,7 @@ public class WarpManifestBodyIllegalTest {
@Test @Test
public void testWriteV2BodyNewLine() { public void testWriteV2BodyNewLine() {
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo", "bar\n"); manifest.withAttribute("foo", "bar\n");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV2String(manifest); WarpManifestorDriver..writeV2String(manifest);
@ -76,7 +76,7 @@ public class WarpManifestBodyIllegalTest {
@Test @Test
public void testWriteV2BodyLineFeed() { public void testWriteV2BodyLineFeed() {
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo", "bar\r"); manifest.withAttribute("foo", "bar\r");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV2String(manifest); WarpManifestorDriver..writeV2String(manifest);
@ -85,7 +85,7 @@ public class WarpManifestBodyIllegalTest {
@Test @Test
public void testWriteV2BodyNull() { public void testWriteV2BodyNull() {
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo", "bar\u0000"); manifest.withAttribute("foo", "bar\u0000");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV2String(manifest); WarpManifestorDriver..writeV2String(manifest);
@ -94,7 +94,7 @@ public class WarpManifestBodyIllegalTest {
@Test @Test
public void testWriteV3BodyNewLine() { public void testWriteV3BodyNewLine() {
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo", "bar\n"); manifest.withAttribute("foo", "bar\n");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV3Array(manifest); WarpManifestorDriver..writeV3Array(manifest);
@ -103,7 +103,7 @@ public class WarpManifestBodyIllegalTest {
@Test @Test
public void testWriteV3BodyLineFeed() { public void testWriteV3BodyLineFeed() {
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo", "bar\r"); manifest.withAttribute("foo", "bar\r");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV3Array(manifest); WarpManifestorDriver..writeV3Array(manifest);
@ -112,7 +112,7 @@ public class WarpManifestBodyIllegalTest {
@Test @Test
public void testWriteV3BodyNull() { public void testWriteV3BodyNull() {
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo", "bar\u0000"); manifest.withAttribute("foo", "bar\u0000");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV3Array(manifest); WarpManifestorDriver..writeV3Array(manifest);

View file

@ -34,8 +34,8 @@ import org.junit.jupiter.api.Test;
import org.x4o.o2o.octal.PrimordialOctalOrangeString; import org.x4o.o2o.octal.PrimordialOctalOrangeString;
import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver; import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest3; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest4; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX18;
import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestException; import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestException;
/// @author للَّٰهِilLצسُو /// @author للَّٰهِilLצسُو
@ -44,7 +44,7 @@ public class WarpManifestNameDupTest {
@Test @Test
public void testWriteV1DuplicateMainAttribute() { public void testWriteV1DuplicateMainAttribute() {
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo", "bar1"); manifest.withAttribute("foo", "bar1");
manifest.withAttribute("foo", "bar2"); manifest.withAttribute("foo", "bar2");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
@ -54,7 +54,7 @@ public class WarpManifestNameDupTest {
@Test @Test
public void testWriteV1DuplicateSection() { public void testWriteV1DuplicateSection() {
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.makeSection("junit"); manifest.makeSection("junit");
manifest.makeSection("junit"); manifest.makeSection("junit");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
@ -64,7 +64,7 @@ public class WarpManifestNameDupTest {
@Test @Test
public void testWriteV1DuplicateSectionAttribute() { public void testWriteV1DuplicateSectionAttribute() {
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.makeSection("junit").withAttribute("foo", "bar1").withAttribute("foo", "bar1"); manifest.makeSection("junit").withAttribute("foo", "bar1").withAttribute("foo", "bar1");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV1String(manifest); WarpManifestorDriver..writeV1String(manifest);
@ -73,7 +73,7 @@ public class WarpManifestNameDupTest {
@Test @Test
public void testWriteV2DuplicateMainAttribute() { public void testWriteV2DuplicateMainAttribute() {
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo", "bar1"); manifest.withAttribute("foo", "bar1");
manifest.withAttribute("foo", "bar2"); manifest.withAttribute("foo", "bar2");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
@ -83,7 +83,7 @@ public class WarpManifestNameDupTest {
@Test @Test
public void testWriteV2DuplicateSection() { public void testWriteV2DuplicateSection() {
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.makeSection("junit"); manifest.makeSection("junit");
manifest.makeSection("junit"); manifest.makeSection("junit");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
@ -93,7 +93,7 @@ public class WarpManifestNameDupTest {
@Test @Test
public void testWriteV2DuplicateSectionAttribute() { public void testWriteV2DuplicateSectionAttribute() {
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.makeSection("junit").withAttribute("foo", "bar1").withAttribute("foo", "bar1"); manifest.makeSection("junit").withAttribute("foo", "bar1").withAttribute("foo", "bar1");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV2String(manifest); WarpManifestorDriver..writeV2String(manifest);
@ -102,7 +102,7 @@ public class WarpManifestNameDupTest {
@Test @Test
public void testWriteV3DuplicateMainAttribute() { public void testWriteV3DuplicateMainAttribute() {
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo", "bar1"); manifest.withAttribute("foo", "bar1");
manifest.withAttribute("foo", "bar2"); manifest.withAttribute("foo", "bar2");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
@ -112,7 +112,7 @@ public class WarpManifestNameDupTest {
@Test @Test
public void testWriteV3DuplicateSection() { public void testWriteV3DuplicateSection() {
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.makeSection("junit"); manifest.makeSection("junit");
manifest.makeSection("junit"); manifest.makeSection("junit");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
@ -122,7 +122,7 @@ public class WarpManifestNameDupTest {
@Test @Test
public void testWriteV3DuplicateSectionAttribute() { public void testWriteV3DuplicateSectionAttribute() {
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.makeSection("junit").withAttribute("foo", "bar1").withAttribute("foo", "bar1"); manifest.makeSection("junit").withAttribute("foo", "bar1").withAttribute("foo", "bar1");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV3Array(manifest); WarpManifestorDriver..writeV3Array(manifest);
@ -131,7 +131,7 @@ public class WarpManifestNameDupTest {
@Test @Test
public void testWriteV4DuplicateMainAttribute() { public void testWriteV4DuplicateMainAttribute() {
WarpManifest4 manifest = new WarpManifest4(); WarpManifestX18 manifest = new WarpManifestX18();
manifest.withAttribute(PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3)), PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3))); manifest.withAttribute(PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3)), PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3)));
manifest.withAttribute(PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3)), PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3))); manifest.withAttribute(PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3)), PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3)));
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
@ -141,7 +141,7 @@ public class WarpManifestNameDupTest {
@Test @Test
public void testWriteV4DuplicateSection() { public void testWriteV4DuplicateSection() {
WarpManifest4 manifest = new WarpManifest4(); WarpManifestX18 manifest = new WarpManifestX18();
manifest.makeSection(PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3))); manifest.makeSection(PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3)));
manifest.makeSection(PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3))); manifest.makeSection(PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3)));
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
@ -151,7 +151,7 @@ public class WarpManifestNameDupTest {
@Test @Test
public void testWriteV4DuplicateSectionAttribute() { public void testWriteV4DuplicateSectionAttribute() {
WarpManifest4 manifest = new WarpManifest4(); WarpManifestX18 manifest = new WarpManifestX18();
manifest.makeSection(PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3))) manifest.makeSection(PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3)))
.withAttribute(PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3)), PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3))) .withAttribute(PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3)), PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3)))
.withAttribute(PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3)), PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3))); .withAttribute(PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3)), PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(1, 2, 3)));

View file

@ -34,8 +34,8 @@ import org.junit.jupiter.api.Test;
import org.x4o.o2o.octal.PrimordialOctalOrangeString; import org.x4o.o2o.octal.PrimordialOctalOrangeString;
import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver; import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest3; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest4; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX18;
import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestException; import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestException;
/// @author للَّٰهِilLצسُو /// @author للَّٰهِilLצسُو
@ -44,7 +44,7 @@ public class WarpManifestNameEmptyTest {
@Test @Test
public void testWriteV1NameEmpty() { public void testWriteV1NameEmpty() {
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("", "bar"); manifest.withAttribute("", "bar");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV1String(manifest); WarpManifestorDriver..writeV1String(manifest);
@ -53,7 +53,7 @@ public class WarpManifestNameEmptyTest {
@Test @Test
public void testWriteV2NameEmpty() { public void testWriteV2NameEmpty() {
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("", "bar"); manifest.withAttribute("", "bar");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV2String(manifest); WarpManifestorDriver..writeV2String(manifest);
@ -62,7 +62,7 @@ public class WarpManifestNameEmptyTest {
@Test @Test
public void testWriteV3NameEmpty() { public void testWriteV3NameEmpty() {
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("", "bar"); manifest.withAttribute("", "bar");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV3Array(manifest); WarpManifestorDriver..writeV3Array(manifest);
@ -71,7 +71,7 @@ public class WarpManifestNameEmptyTest {
@Test @Test
public void testWriteV4NameEmpty() { public void testWriteV4NameEmpty() {
WarpManifest4 manifest = new WarpManifest4(); WarpManifestX18 manifest = new WarpManifestX18();
manifest.withAttribute(PrimordialOctalOrangeString.valueOfEmpty(), PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(12,34))); manifest.withAttribute(PrimordialOctalOrangeString.valueOfEmpty(), PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(12,34)));
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV4Array(manifest); WarpManifestorDriver..writeV4Array(manifest);

View file

@ -31,7 +31,7 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver; import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest3; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8;
import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestException; import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestException;
/// @author للَّٰهِilLצسُو /// @author للَّٰهِilLצسُو
@ -40,7 +40,7 @@ public class WarpManifestNameForbidCharTest {
@Test @Test
public void testWriteV1NameNewLine() { public void testWriteV1NameNewLine() {
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo\n", "bar"); manifest.withAttribute("foo\n", "bar");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV1String(manifest); WarpManifestorDriver..writeV1String(manifest);
@ -49,7 +49,7 @@ public class WarpManifestNameForbidCharTest {
@Test @Test
public void testWriteV1NameLineFeed() { public void testWriteV1NameLineFeed() {
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo\r", "bar"); manifest.withAttribute("foo\r", "bar");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV1String(manifest); WarpManifestorDriver..writeV1String(manifest);
@ -58,7 +58,7 @@ public class WarpManifestNameForbidCharTest {
@Test @Test
public void testWriteV1NameNull() { public void testWriteV1NameNull() {
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo\u0000", "bar"); manifest.withAttribute("foo\u0000", "bar");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV1String(manifest); WarpManifestorDriver..writeV1String(manifest);
@ -67,7 +67,7 @@ public class WarpManifestNameForbidCharTest {
@Test @Test
public void testWriteV2NameNewLine() { public void testWriteV2NameNewLine() {
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo\n", "bar"); manifest.withAttribute("foo\n", "bar");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV2String(manifest); WarpManifestorDriver..writeV2String(manifest);
@ -76,7 +76,7 @@ public class WarpManifestNameForbidCharTest {
@Test @Test
public void testWriteV2NameLineFeed() { public void testWriteV2NameLineFeed() {
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo\r", "bar"); manifest.withAttribute("foo\r", "bar");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV2String(manifest); WarpManifestorDriver..writeV2String(manifest);
@ -85,7 +85,7 @@ public class WarpManifestNameForbidCharTest {
@Test @Test
public void testWriteV2NameNull() { public void testWriteV2NameNull() {
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo\u0000", "bar"); manifest.withAttribute("foo\u0000", "bar");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV2String(manifest); WarpManifestorDriver..writeV2String(manifest);
@ -94,7 +94,7 @@ public class WarpManifestNameForbidCharTest {
@Test @Test
public void testWriteV3NameNewLine() { public void testWriteV3NameNewLine() {
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo\n", "bar"); manifest.withAttribute("foo\n", "bar");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV3Array(manifest); WarpManifestorDriver..writeV3Array(manifest);
@ -103,7 +103,7 @@ public class WarpManifestNameForbidCharTest {
@Test @Test
public void testWriteV3NameLineFeed() { public void testWriteV3NameLineFeed() {
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo\r", "bar"); manifest.withAttribute("foo\r", "bar");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV3Array(manifest); WarpManifestorDriver..writeV3Array(manifest);
@ -112,7 +112,7 @@ public class WarpManifestNameForbidCharTest {
@Test @Test
public void testWriteV3NameNull() { public void testWriteV3NameNull() {
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo\u0000", "bar"); manifest.withAttribute("foo\u0000", "bar");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV3Array(manifest); WarpManifestorDriver..writeV3Array(manifest);

View file

@ -31,7 +31,7 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver; import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest3; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8;
import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestException; import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestException;
/// @author للَّٰهِilLצسُو /// @author للَّٰهِilLצسُو
@ -44,7 +44,7 @@ public class WarpManifestNameLimitTest {
for (int i=0;i<70;i++) { for (int i=0;i<70;i++) {
buf.append("0"); buf.append("0");
} }
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute(buf.toString(), "foo"); manifest.withAttribute(buf.toString(), "foo");
WarpManifestorDriver..writeV1String(manifest); WarpManifestorDriver..writeV1String(manifest);
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
@ -59,7 +59,7 @@ public class WarpManifestNameLimitTest {
for (int i=0;i<65535;i++) { for (int i=0;i<65535;i++) {
buf.append("0"); buf.append("0");
} }
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.makeAttribute(buf.toString(), "foo").withRemark("remarkable"); manifest.makeAttribute(buf.toString(), "foo").withRemark("remarkable");
String output = WarpManifestorDriver..writeV2String(manifest); String output = WarpManifestorDriver..writeV2String(manifest);
Assertions.assertNotNull(output); Assertions.assertNotNull(output);
@ -77,7 +77,7 @@ public class WarpManifestNameLimitTest {
for (int i=0;i<65535;i++) { for (int i=0;i<65535;i++) {
buf.append("0"); buf.append("0");
} }
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.makeAttribute(buf.toString(), "foo").withRemark("remarkable"); manifest.makeAttribute(buf.toString(), "foo").withRemark("remarkable");
byte[] output = WarpManifestorDriver..writeV3Array(manifest); byte[] output = WarpManifestorDriver..writeV3Array(manifest);
Assertions.assertNotNull(output); Assertions.assertNotNull(output);

View file

@ -31,7 +31,7 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver; import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest3; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8;
import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestException; import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestException;
/// @author للَّٰهِilLצسُو /// @author للَّٰهِilLצسُو
@ -40,7 +40,7 @@ public class WarpManifestNameSeperatorTest {
@Test @Test
public void testWriteV1NameSeperator() { public void testWriteV1NameSeperator() {
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo:", "bar"); manifest.withAttribute("foo:", "bar");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV1String(manifest); WarpManifestorDriver..writeV1String(manifest);
@ -49,7 +49,7 @@ public class WarpManifestNameSeperatorTest {
@Test @Test
public void testWriteV2OutputSeperator() { public void testWriteV2OutputSeperator() {
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("ju n it:", "junit:"); manifest.withAttribute("ju n it:", "junit:");
String output = WarpManifestorDriver..writeV2String(manifest); String output = WarpManifestorDriver..writeV2String(manifest);
Assertions.assertNotNull(output); Assertions.assertNotNull(output);
@ -59,11 +59,11 @@ public class WarpManifestNameSeperatorTest {
@Test @Test
public void testWriteV3OutputSeperator() { public void testWriteV3OutputSeperator() {
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("ju n it:", "junit:"); manifest.withAttribute("ju n it:", "junit:");
byte[] output = WarpManifestorDriver..writeV3Array(manifest); byte[] output = WarpManifestorDriver..writeV3Array(manifest);
Assertions.assertNotNull(output); Assertions.assertNotNull(output);
WarpManifest3 manitest = WarpManifestorDriver..readV3Array(output); WarpManifestX8 manitest = WarpManifestorDriver..readV3Array(output);
Assertions.assertNotNull(manitest); Assertions.assertNotNull(manitest);
Assertions.assertEquals(1, manitest.getAttributes().size()); Assertions.assertEquals(1, manitest.getAttributes().size());
Assertions.assertEquals("ju n it:", manitest.getAttributes().get(0).getName()); Assertions.assertEquals("ju n it:", manitest.getAttributes().get(0).getName());

View file

@ -31,7 +31,7 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver; import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest3; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8;
import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestException; import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestException;
/// @author للَّٰهِilLצسُو /// @author للَّٰهِilLצسُو
@ -40,7 +40,7 @@ public class WarpManifestNameUnicodeTest {
@Test @Test
public void testWriteV1NameUnicode() { public void testWriteV1NameUnicode() {
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo", "仙上主天"); manifest.withAttribute("foo", "仙上主天");
WarpManifestorDriver..writeV1String(manifest); WarpManifestorDriver..writeV1String(manifest);
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
@ -51,7 +51,7 @@ public class WarpManifestNameUnicodeTest {
@Test @Test
public void testWriteV2NameUnicode() { public void testWriteV2NameUnicode() {
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo", "仙上主天"); manifest.withAttribute("foo", "仙上主天");
manifest.withAttribute("仙上主天", "bar"); manifest.withAttribute("仙上主天", "bar");
String output = WarpManifestorDriver..writeV2String(manifest); String output = WarpManifestorDriver..writeV2String(manifest);
@ -61,7 +61,7 @@ public class WarpManifestNameUnicodeTest {
Assertions.assertEquals("foo: 仙上主天", lines[1]); Assertions.assertEquals("foo: 仙上主天", lines[1]);
Assertions.assertEquals("&#x4ED9;&#x4E0A;&#x4E3B;&#x5929;: bar", lines[2]); Assertions.assertEquals("&#x4ED9;&#x4E0A;&#x4E3B;&#x5929;: bar", lines[2]);
WarpManifest3 manitest = WarpManifestorDriver..readV2String(output); WarpManifestX8 manitest = WarpManifestorDriver..readV2String(output);
Assertions.assertNotNull(manitest); Assertions.assertNotNull(manitest);
Assertions.assertEquals(2, manitest.getAttributes().size()); Assertions.assertEquals(2, manitest.getAttributes().size());
Assertions.assertEquals("foo", manitest.getAttributes().get(0).getName()); Assertions.assertEquals("foo", manitest.getAttributes().get(0).getName());
@ -74,12 +74,12 @@ public class WarpManifestNameUnicodeTest {
@Test @Test
public void testWriteV3NameUnicode() { public void testWriteV3NameUnicode() {
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.withAttribute("foo", "仙上主天"); manifest.withAttribute("foo", "仙上主天");
manifest.withAttribute("仙上主天", "bar"); manifest.withAttribute("仙上主天", "bar");
byte[] output = WarpManifestorDriver..writeV3Array(manifest); byte[] output = WarpManifestorDriver..writeV3Array(manifest);
Assertions.assertNotNull(output); Assertions.assertNotNull(output);
WarpManifest3 manitest = WarpManifestorDriver..readV3Array(output); WarpManifestX8 manitest = WarpManifestorDriver..readV3Array(output);
Assertions.assertNotNull(manitest); Assertions.assertNotNull(manitest);
Assertions.assertEquals(2, manitest.getAttributes().size()); Assertions.assertEquals(2, manitest.getAttributes().size());
Assertions.assertEquals("foo", manitest.getAttributes().get(0).getName()); Assertions.assertEquals("foo", manitest.getAttributes().get(0).getName());

View file

@ -34,8 +34,8 @@ import org.junit.jupiter.api.Test;
import org.x4o.o2o.octal.PrimordialOctalOrangeString; import org.x4o.o2o.octal.PrimordialOctalOrangeString;
import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver; import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest3; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest4; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX18;
import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestException; import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestException;
/// @author للَّٰهِilLצسُو /// @author للَّٰهِilLצسُو
@ -44,7 +44,7 @@ public class WarpManifestSectionNameEmptyTest {
@Test @Test
public void testWriteV1SectionNameEmpty() { public void testWriteV1SectionNameEmpty() {
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.makeSection("").withAttribute("foo", "bar"); manifest.makeSection("").withAttribute("foo", "bar");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV1String(manifest); WarpManifestorDriver..writeV1String(manifest);
@ -53,7 +53,7 @@ public class WarpManifestSectionNameEmptyTest {
@Test @Test
public void testWriteV2SectionNameEmpty() { public void testWriteV2SectionNameEmpty() {
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.makeSection("").withAttribute("foo", "bar"); manifest.makeSection("").withAttribute("foo", "bar");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV2String(manifest); WarpManifestorDriver..writeV2String(manifest);
@ -62,7 +62,7 @@ public class WarpManifestSectionNameEmptyTest {
@Test @Test
public void testWriteV3SectionNameEmpty() { public void testWriteV3SectionNameEmpty() {
WarpManifest3 manifest = new WarpManifest3(); WarpManifestX8 manifest = new WarpManifestX8();
manifest.makeSection("").withAttribute("foo", "bar"); manifest.makeSection("").withAttribute("foo", "bar");
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV3Array(manifest); WarpManifestorDriver..writeV3Array(manifest);
@ -72,7 +72,7 @@ public class WarpManifestSectionNameEmptyTest {
@Test @Test
public void testWriteV4SectionNameEmpty() { public void testWriteV4SectionNameEmpty() {
PrimordialOctalOrangeString foobar = PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(123,456,789)); PrimordialOctalOrangeString foobar = PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(123,456,789));
WarpManifest4 manifest = new WarpManifest4(); WarpManifestX18 manifest = new WarpManifestX18();
manifest.makeSection(PrimordialOctalOrangeString.valueOfEmpty()).withAttribute(foobar, foobar); manifest.makeSection(PrimordialOctalOrangeString.valueOfEmpty()).withAttribute(foobar, foobar);
Assertions.assertThrows(ScopicManifestException.class, () -> { Assertions.assertThrows(ScopicManifestException.class, () -> {
WarpManifestorDriver..writeV4Array(manifest); WarpManifestorDriver..writeV4Array(manifest);

View file

@ -39,7 +39,7 @@ import jakarta.servlet.http.HttpServletResponse;
import love.distributedrebirth.nx01.warp.fault.BassFaultAnchor; import love.distributedrebirth.nx01.warp.fault.BassFaultAnchor;
import love.distributedrebirth.nx01.warp.fault.FaultStreamDelegate; import love.distributedrebirth.nx01.warp.fault.FaultStreamDelegate;
import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver; import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest3; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8;
/// Generic fault handler for human interaction. /// Generic fault handler for human interaction.
/// ///
@ -62,7 +62,7 @@ public class ZilLaLaFaultFilter extends HttpFilter {
throw error; throw error;
} }
BassFaultAnchor fault = wrap(error); BassFaultAnchor fault = wrap(error);
WarpManifest3 report = fault.toZilLaLaManyfesto(); WarpManifestX8 report = fault.toZilLaLaManyfesto();
// TODO: repack and forward to UI form to inspect AND connect+send into a NOSTR // TODO: repack and forward to UI form to inspect AND connect+send into a NOSTR
// relay // relay