diff --git a/nx01-king-java3seed/src/main/java/love/distributedrebirth/nx01/king/java3seed/Java3Seed.java b/nx01-king-java3seed/src/main/java/love/distributedrebirth/nx01/king/java3seed/Java3Seed.java index ee2172b..c9528ab 100644 --- a/nx01-king-java3seed/src/main/java/love/distributedrebirth/nx01/king/java3seed/Java3Seed.java +++ b/nx01-king-java3seed/src/main/java/love/distributedrebirth/nx01/king/java3seed/Java3Seed.java @@ -70,8 +70,8 @@ import love.distributedrebirth.nx01.redsea.hyper.model.HyperFlowerAnther; import love.distributedrebirth.nx01.redsea.hyper.local.HyperLocalFileSystem; import love.distributedrebirth.nx01.warp.fault.BassFaultAnchor; import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver; -import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest3; -import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestTheMimeType; +import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8; +import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX0TheMimeType; import ᒢᐩᐩ.ᔆʸᔆᐪᓫᔿ.ᒃᣔᒃᓫᒻ.ᑊᐣᓑᖮᐪᔆ.DuytsDocAuthor注; @@ -263,14 +263,14 @@ public class Java3Seed extends PrintStream { if (file.equals("/META-INF/MANIFEST.MF")) { System.out.println("jar: " + jar.getName()); InputStream in = jar.get(path).getAsset().openStream(); - WarpManifest3 manifest = WarpManifestorDriver.亞.readV1Stream(in); + WarpManifestX8 manifest = WarpManifestorDriver.亞.readV1Stream(in); in.close(); jar.delete(path); manifest.withAttribute("Manifest-Toilet-Cleaned-By", Java3Seed.class.getName()); 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.亞.writeV2String(manifest)), "/META-INF/"+WarpManifestTheMimeType.MANIFEST_2.getQFileName()); - jar.add(new ByteArrayAsset(WarpManifestorDriver.亞.writeV3Array(manifest)), "/META-INF/"+WarpManifestTheMimeType.MANIFEST_3.getQFileName()); + jar.add(new StringAsset(WarpManifestorDriver.亞.writeV1String(manifest)), "/META-INF/"+WarpManifestX0TheMimeType.MANIFEST_1.getQFileName()); + jar.add(new StringAsset(WarpManifestorDriver.亞.writeV2String(manifest)), "/META-INF/"+WarpManifestX0TheMimeType.MANIFEST_2.getQFileName()); + jar.add(new ByteArrayAsset(WarpManifestorDriver.亞.writeV3Array(manifest)), "/META-INF/"+WarpManifestX0TheMimeType.MANIFEST_3.getQFileName()); convertedManifests++; } } diff --git a/nx01-warp-fault/src/main/java/love/distributedrebirth/nx01/warp/fault/BassFaultAnchor.java b/nx01-warp-fault/src/main/java/love/distributedrebirth/nx01/warp/fault/BassFaultAnchor.java index dc17cbf..1b96482 100644 --- a/nx01-warp-fault/src/main/java/love/distributedrebirth/nx01/warp/fault/BassFaultAnchor.java +++ b/nx01-warp-fault/src/main/java/love/distributedrebirth/nx01/warp/fault/BassFaultAnchor.java @@ -37,7 +37,7 @@ import java.util.function.Consumer; import love.distributedrebirth.nx01.warp.fault.sitra.SitraManifestGenerator; import love.distributedrebirth.nx01.warp.fault.sitra.SitraManifestSectionWhitePaper; 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) /// @@ -129,7 +129,7 @@ abstract public class BassFaultAnchor extends BassFaultAnchorSignalStore { return ZilLaLaManyfestoGrowlFactory.亞.buildFaultScreamBase64(toZilLaLaManyfesto(), this); } - public final WarpManifest3 toZilLaLaManyfesto() { + public final WarpManifestX8 toZilLaLaManyfesto() { return SitraManifestGenerator.亞.buildSignalTraceManifest(this); } diff --git a/nx01-warp-fault/src/main/java/love/distributedrebirth/nx01/warp/fault/sitra/SitraManifestGenerator.java b/nx01-warp-fault/src/main/java/love/distributedrebirth/nx01/warp/fault/sitra/SitraManifestGenerator.java index caecb28..8769041 100644 --- a/nx01-warp-fault/src/main/java/love/distributedrebirth/nx01/warp/fault/sitra/SitraManifestGenerator.java +++ b/nx01-warp-fault/src/main/java/love/distributedrebirth/nx01/warp/fault/sitra/SitraManifestGenerator.java @@ -37,8 +37,8 @@ import java.util.Map; import java.util.Optional; import love.distributedrebirth.nx01.warp.fault.BassFaultAnchor; -import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest3; -import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest3Section; +import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8; +import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8Section; import love.distributedrebirth.nx01.warp.manifestor.scopic.iomf.ScopicManifestConstants; /// Sitra manifest generator. @@ -50,13 +50,13 @@ public enum SitraManifestGenerator { private static final String SITRA_VALUE_NULL = "null"; - public WarpManifest3 buildSignalTraceManifest(BassFaultAnchor fault) { + public WarpManifestX8 buildSignalTraceManifest(BassFaultAnchor fault) { String message = fault.getLocalizedMessage(); if (message != null) { message = escapeSignalValue(message); } 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_AFOUR, ZilLaLaManyfesto.MANYFESTO_A4_JAVA); manifest.withAttribute(ZilLaLaManyfestoHeader.MAIN_FAULT_UUID_WM_ONE, SitraManifestUUIDCrematorium.亞.burnWaterMarkOne().toString()); @@ -81,7 +81,7 @@ public enum SitraManifestGenerator { continue; } Map signals = signalsOpt.get(); - WarpManifest3Section section = manifest.makeSection(traceKey.getName()); + WarpManifestX8Section section = manifest.makeSection(traceKey.getName()); if (SitraManifestSectionWhitePaper.class.equals(traceKey)) { section.withAttribute(ZilLaLaManyfestoHeader.SIGNAL_FAULT_SECTION_GOAL, ZilLaLaManyfestoSectionGoal.PAPER.toString()); } else { @@ -113,7 +113,7 @@ public enum SitraManifestGenerator { } Map signals = new LinkedHashMap<>(); report.fillReport(fault, signals); - WarpManifest3Section section = manifest.makeSection(report.getClass().getName()); + WarpManifestX8Section section = manifest.makeSection(report.getClass().getName()); for (String signalKey : signals.keySet()) { String signalValue = signals.get(signalKey); String attributeBody = signalValue==null?SITRA_VALUE_NULL:escapeSignalValue(signalValue); diff --git a/nx01-warp-fault/src/main/java/love/distributedrebirth/nx01/warp/fault/sitra/ZilLaLaManyfesto.java b/nx01-warp-fault/src/main/java/love/distributedrebirth/nx01/warp/fault/sitra/ZilLaLaManyfesto.java index fa87bfc..569e0ac 100644 --- a/nx01-warp-fault/src/main/java/love/distributedrebirth/nx01/warp/fault/sitra/ZilLaLaManyfesto.java +++ b/nx01-warp-fault/src/main/java/love/distributedrebirth/nx01/warp/fault/sitra/ZilLaLaManyfesto.java @@ -27,7 +27,7 @@ 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. /// @@ -39,6 +39,6 @@ public enum ZilLaLaManyfesto { public static final String MANYFESTO_A4_JAVA = "java"; 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 } diff --git a/nx01-warp-fault/src/main/java/love/distributedrebirth/nx01/warp/fault/sitra/ZilLaLaManyfestoGrowlFactory.java b/nx01-warp-fault/src/main/java/love/distributedrebirth/nx01/warp/fault/sitra/ZilLaLaManyfestoGrowlFactory.java index 8f52b0c..ec2901c 100644 --- a/nx01-warp-fault/src/main/java/love/distributedrebirth/nx01/warp/fault/sitra/ZilLaLaManyfestoGrowlFactory.java +++ b/nx01-warp-fault/src/main/java/love/distributedrebirth/nx01/warp/fault/sitra/ZilLaLaManyfestoGrowlFactory.java @@ -31,7 +31,7 @@ import java.util.Base64; import love.distributedrebirth.nx01.warp.fault.BassFaultAnchor; 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. /// @@ -44,7 +44,7 @@ public enum ZilLaLaManyfestoGrowlFactory { /// Multiple characters seen as a slug to indicate that words are eaten. private static final String VALUE_CUTOFF = "..."; - public String buildFaultScream(WarpManifest3 manifest, BassFaultAnchor fault) { + public String buildFaultScream(WarpManifestX8 manifest, BassFaultAnchor fault) { StringBuilder buf = new StringBuilder(); buf.append(fault.getClass().getSimpleName()); String messageShort = buildCutDottedMessage(fault); @@ -59,7 +59,7 @@ public enum ZilLaLaManyfestoGrowlFactory { } @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 ?? String trace64 = Base64.getEncoder().encodeToString(traceManifestBytes); // FIXME: report as "normal" text in nostr event StringBuilder buf = new StringBuilder(); diff --git a/nx01-warp-fault/src/test/java/love/distributedrebirth/nx01/warp/fault/FaultSignalTraceTest.java b/nx01-warp-fault/src/test/java/love/distributedrebirth/nx01/warp/fault/FaultSignalTraceTest.java index 5416a0c..22f0ab8 100644 --- a/nx01-warp-fault/src/test/java/love/distributedrebirth/nx01/warp/fault/FaultSignalTraceTest.java +++ b/nx01-warp-fault/src/test/java/love/distributedrebirth/nx01/warp/fault/FaultSignalTraceTest.java @@ -34,7 +34,7 @@ import love.distributedrebirth.nx01.warp.fault.BassFaultAnchor; import love.distributedrebirth.nx01.warp.fault.FaultBeanInstantiation; import love.distributedrebirth.nx01.warp.fault.FaultBeanState; 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צسُو /// @version ©Δ∞ 仙上主天 @@ -113,7 +113,7 @@ public class FaultSignalTraceTest { } Assertions.assertNotNull(error); Assertions.assertNotNull(error.getMessage()); - WarpManifest3 manifest = error.toZilLaLaManyfesto(); + WarpManifestX8 manifest = error.toZilLaLaManyfesto(); String sitraText = WarpManifestorDriver.亞.writeV2String(manifest); //System.out.println(sitraText); Assertions.assertNotNull(sitraText); diff --git a/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/WarpManifestorDriver.java b/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/WarpManifestorDriver.java index 3d4a497..b377482 100644 --- a/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/WarpManifestorDriver.java +++ b/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/WarpManifestorDriver.java @@ -42,13 +42,13 @@ import java.util.Objects; import org.x4o.o2o.io.tlv.TLVChainOctalSex; import org.x4o.o2o.io.tlv.TLVChainSexTeenBit; -import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest2; -import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest2HeaderField; -import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest2Section; -import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest3; -import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest4; -import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestTheMimeType; -import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestTheVersion; +import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX0; +import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX0HeaderField; +import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX0Section; +import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8; +import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX18; +import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX0TheMimeType; +import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX0TheVersion; import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestContent; import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestContentStringHandler; 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 WarpManifest3 readV1String(String input) { + public WarpManifestX8 readV1String(String input) { return readV1Array(input.getBytes(StandardCharsets.UTF_8)); } - public WarpManifest3 readV1Buffer(ByteBuffer input) { + public WarpManifestX8 readV1Buffer(ByteBuffer input) { return readV1Array(input.array()); } - public WarpManifest3 readV1Array(byte[] input) { + public WarpManifestX8 readV1Array(byte[] input) { return readV1Stream(new ByteArrayInputStream(input)); } - public WarpManifest3 readV1Stream(InputStream input) { - WarpManifest3 result = new WarpManifest3(); - ScopicManifestContentStringHandler handler = new ScopicManifestContentStringHandler(result, WarpManifestTheVersion.VERSION_1_0); + public WarpManifestX8 readV1Stream(InputStream input) { + WarpManifestX8 result = new WarpManifestX8(); + ScopicManifestContentStringHandler handler = new ScopicManifestContentStringHandler(result, WarpManifestX0TheVersion.VERSION_1_0); ScopicManifestContentReader reader = new ScopicManifestContentReader(handler, ScopicManifestContentReader.FORCE_VERSION_1_0); try { reader.parse(input); @@ -94,21 +94,21 @@ public enum WarpManifestorDriver { return result; } - public WarpManifest3 readV2String(String input) { + public WarpManifestX8 readV2String(String input) { return readV2Array(input.getBytes(StandardCharsets.UTF_8)); } - public WarpManifest3 readV2Buffer(ByteBuffer input) { + public WarpManifestX8 readV2Buffer(ByteBuffer input) { return readV2Array(input.array()); } - public WarpManifest3 readV2Array(byte[] input) { + public WarpManifestX8 readV2Array(byte[] input) { return readV2Stream(new ByteArrayInputStream(input)); } - public WarpManifest3 readV2Stream(InputStream input) { - WarpManifest3 result = new WarpManifest3(); - ScopicManifestContentStringHandler handler = new ScopicManifestContentStringHandler(result, WarpManifestTheVersion.VERSION_1_0, WarpManifestTheVersion.VERSION_2_0); + public WarpManifestX8 readV2Stream(InputStream input) { + WarpManifestX8 result = new WarpManifestX8(); + ScopicManifestContentStringHandler handler = new ScopicManifestContentStringHandler(result, WarpManifestX0TheVersion.VERSION_1_0, WarpManifestX0TheVersion.VERSION_2_0); ScopicManifestContentReader reader = new ScopicManifestContentReader(handler); try { reader.parse(input); @@ -118,22 +118,22 @@ public enum WarpManifestorDriver { return result; } - public WarpManifest3 readV3Buffer(ByteBuffer input) { + public WarpManifestX8 readV3Buffer(ByteBuffer input) { return readV3Array(input.array()); } - public WarpManifest3 readV3Array(byte[] input) { + public WarpManifestX8 readV3Array(byte[] input) { return readV3Stream(new ByteArrayInputStream(input)); } - public WarpManifest3 readV3Stream(InputStream input) { - WarpManifest3 result = new WarpManifest3(); - ScopicManifestContentStringHandler handler = new ScopicManifestContentStringHandler(result, WarpManifestTheVersion.VERSION_3_0); + public WarpManifestX8 readV3Stream(InputStream input) { + WarpManifestX8 result = new WarpManifestX8(); + ScopicManifestContentStringHandler handler = new ScopicManifestContentStringHandler(result, WarpManifestX0TheVersion.VERSION_3_0); ScopicManifest3ContentReader reader = new ScopicManifest3ContentReader(handler); TLVChainSexTeenBit chain = new TLVChainSexTeenBit(); try { - WarpManifestTheMimeType mimeType = WarpManifestTheMimeType.magicMarkerRead(input, WarpManifestTheMimeType.MARKER_3_LENGTH); - if (!WarpManifestTheMimeType.MANIFEST_3.equals(mimeType)) { + WarpManifestX0TheMimeType mimeType = WarpManifestX0TheMimeType.magicMarkerRead(input, WarpManifestX0TheMimeType.MARKER_3_LENGTH); + if (!WarpManifestX0TheMimeType.MANIFEST_3.equals(mimeType)) { throw new ScopicManifestException("Invalid stream magic marker: " + mimeType); // TODO: move and change magicMarkerRead(in,enum) } chain.dataReadStream(input); @@ -144,22 +144,22 @@ public enum WarpManifestorDriver { return result; } - public WarpManifest4 readV4Buffer(ByteBuffer input) { + public WarpManifestX18 readV4Buffer(ByteBuffer input) { return readV4Array(input.array()); } - public WarpManifest4 readV4Array(byte[] input) { + public WarpManifestX18 readV4Array(byte[] input) { return readV4Stream(new ByteArrayInputStream(input)); } - public WarpManifest4 readV4Stream(InputStream input) { - WarpManifest4 result = new WarpManifest4(); + public WarpManifestX18 readV4Stream(InputStream input) { + WarpManifestX18 result = new WarpManifestX18(); ScopicManifest4ContentHandler handler = new ScopicManifest4ContentHandler(result); ScopicManifest4ContentReader reader = new ScopicManifest4ContentReader(handler); TLVChainOctalSex chain = new TLVChainOctalSex(); try { - WarpManifestTheMimeType mimeType = WarpManifestTheMimeType.magicMarkerRead(input, WarpManifestTheMimeType.MARKER_4_LENGTH); - if (!WarpManifestTheMimeType.MANIFEST_4.equals(mimeType)) { + WarpManifestX0TheMimeType mimeType = WarpManifestX0TheMimeType.magicMarkerRead(input, WarpManifestX0TheMimeType.MARKER_4_LENGTH); + if (!WarpManifestX0TheMimeType.MANIFEST_4.equals(mimeType)) { throw new ScopicManifestException("Invalid stream magic marker: " + mimeType); // TODO: move and change magicMarkerRead(in,enum) } chain.dataReadStream(input); @@ -170,20 +170,20 @@ public enum WarpManifestorDriver { return result; } - public WarpManifest3 readViniString(String input) { + public WarpManifestX8 readViniString(String input) { return readViniArray(input.getBytes(StandardCharsets.UTF_8)); } - public WarpManifest3 readViniBuffer(ByteBuffer input) { + public WarpManifestX8 readViniBuffer(ByteBuffer input) { return readViniArray(input.array()); } - public WarpManifest3 readViniArray(byte[] input) { + public WarpManifestX8 readViniArray(byte[] input) { return readViniStream(new ByteArrayInputStream(input)); } - public WarpManifest3 readViniStream(InputStream input) { - WarpManifest3 result = new WarpManifest3(); + public WarpManifestX8 readViniStream(InputStream input) { + WarpManifestX8 result = new WarpManifestX8(); ScopicManifestContentStringHandler handler = new ScopicManifestContentStringHandler(result); ScopicIniContentReader reader = new ScopicIniContentReader(handler); 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... - private , H extends WarpManifest2HeaderField, S extends WarpManifest2Section> void strobelight(WarpManifest2 manifest, ScopicManifestContent writer, T version) { + private , H extends WarpManifestX0HeaderField, S extends WarpManifestX0Section> void strobelight(WarpManifestX0 manifest, ScopicManifestContent writer, T version) { writer.strobeManifestStart(); writer.strobeManifestDeclaration(Objects.requireNonNull(version, "Can't print null version")); - for (WarpManifest2HeaderField mainAttr : manifest.getAttributes()) { + for (WarpManifestX0HeaderField mainAttr : manifest.getAttributes()) { Objects.requireNonNull(mainAttr.getName(), "Can't print null attribute name"); for (T remarkValue : mainAttr.getRemarks()) { writer.strobeRemarkContent(remarkValue); } writer.strobeMainAttribute(mainAttr.getName(), mainAttr.getBody()); } - for (WarpManifest2Section section : manifest.getSections()) { + for (WarpManifestX0Section section : manifest.getSections()) { Objects.requireNonNull(section.getName(), "Can't print null section name"); for (T remarkValue : section.getRemarks()) { writer.strobeRemarkContent(remarkValue); } writer.strobeSectionHeader(section.getName()); - for (WarpManifest2HeaderField sectionAttr : section.getAttributes()) { + for (WarpManifestX0HeaderField sectionAttr : section.getAttributes()) { Objects.requireNonNull(sectionAttr.getName(), "Can't print null section attribute name"); for (T remarkValue : sectionAttr.getRemarks()) { writer.strobeRemarkContent(remarkValue); @@ -222,87 +222,87 @@ public enum WarpManifestorDriver { writer.strobeManifestEnd(); } - public String writeV1String(WarpManifest3 manifest) { + public String writeV1String(WarpManifestX8 manifest) { StringWriter writer = new StringWriter(); writeV1StreamChar(manifest, writer); 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)); } - public void writeV1StreamChar(WarpManifest3 manifest, Writer output) { - strobelight(manifest, new ScopicManifestContentWriter(output), WarpManifestTheVersion.VERSION_1_0.getQName()); + public void writeV1StreamChar(WarpManifestX8 manifest, Writer output) { + strobelight(manifest, new ScopicManifestContentWriter(output), WarpManifestX0TheVersion.VERSION_1_0.getQName()); } - public String writeV2String(WarpManifest3 manifest) { + public String writeV2String(WarpManifestX8 manifest) { StringWriter writer = new StringWriter(); writeV2StreamChar(manifest, writer); 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)); } - public void writeV2StreamChar(WarpManifest3 manifest, Writer output) { - strobelight(manifest, new ScopicManifestContentWriter(output), WarpManifestTheVersion.VERSION_2_0.getQName()); + public void writeV2StreamChar(WarpManifestX8 manifest, Writer output) { + 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)); } - public byte[] writeV3Array(WarpManifest3 manifest) { + public byte[] writeV3Array(WarpManifestX8 manifest) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); writeV3Stream(manifest, baos); return baos.toByteArray(); } - public void writeV3Stream(WarpManifest3 manifest, OutputStream output) { + public void writeV3Stream(WarpManifestX8 manifest, OutputStream output) { 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 { - WarpManifestTheMimeType.magicMarkerWrite(output, WarpManifestTheMimeType.MANIFEST_3); + WarpManifestX0TheMimeType.magicMarkerWrite(output, WarpManifestX0TheMimeType.MANIFEST_3); chain.dataWriteStream(output); } catch (IOException e) { throw new ScopicManifestException(e); } } - public ByteBuffer writeV4Buffer(WarpManifest4 manifest) { + public ByteBuffer writeV4Buffer(WarpManifestX18 manifest) { return ByteBuffer.wrap(writeV4Array(manifest)); } - public byte[] writeV4Array(WarpManifest4 manifest) { + public byte[] writeV4Array(WarpManifestX18 manifest) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); writeV4Stream(manifest, baos); return baos.toByteArray(); } - public void writeV4Stream(WarpManifest4 manifest, OutputStream output) { + public void writeV4Stream(WarpManifestX18 manifest, OutputStream output) { TLVChainOctalSex chain = new TLVChainOctalSex(); - strobelight(manifest, new ScopicManifest4ContentWriter(chain), WarpManifestTheVersion.VERSION_4_0); + strobelight(manifest, new ScopicManifest4ContentWriter(chain), WarpManifestX0TheVersion.VERSION_4_0); try { - WarpManifestTheMimeType.magicMarkerWrite(output, WarpManifestTheMimeType.MANIFEST_4); + WarpManifestX0TheMimeType.magicMarkerWrite(output, WarpManifestX0TheMimeType.MANIFEST_4); chain.dataWriteStream(output); } catch (IOException e) { throw new ScopicManifestException(e); } } - public String writeViniString(WarpManifest3 manifest) { + public String writeViniString(WarpManifestX8 manifest) { StringWriter writer = new StringWriter(); writeViniStreamChar(manifest, writer); 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)); } - public void writeViniStreamChar(WarpManifest3 manifest, Writer output) { + public void writeViniStreamChar(WarpManifestX8 manifest, Writer output) { strobelight(manifest, new ScopicIniContentWriter(output), ScopicIniConstants.VERSION_NEW_TESTAMENT); } } diff --git a/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifest2.java b/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestX0.java similarity index 92% rename from nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifest2.java rename to nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestX0.java index fc94cc6..616cf42 100644 --- a/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifest2.java +++ b/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestX0.java @@ -30,19 +30,19 @@ package love.distributedrebirth.nx01.warp.manifestor.manifest; import java.util.List; import java.util.Optional; -/// Warp manifest2 model. +/// Warp manifest 0 bit model. /// /// @author للَّٰهِilLצسُو /// @version ©Δ∞ 仙上主天 -public interface WarpManifest2, H extends WarpManifest2HeaderField, S extends WarpManifest2Section> { +public interface WarpManifestX0, H extends WarpManifestX0HeaderField, S extends WarpManifestX0Section> { List getAttributes(); H makeAttribute(T name, T body); - WarpManifest2 withAttribute(T name, T body); + WarpManifestX0 withAttribute(T name, T body); - WarpManifest2 withAttributes(List attrbutes); + WarpManifestX0 withAttributes(List attrbutes); default boolean hasAttribute(T attributeName) { for (H attr : getAttributes()) { diff --git a/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifest2HeaderField.java b/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestX0HeaderField.java similarity index 93% rename from nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifest2HeaderField.java rename to nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestX0HeaderField.java index 7ebfa93..c0880fc 100644 --- a/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifest2HeaderField.java +++ b/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestX0HeaderField.java @@ -29,11 +29,11 @@ package love.distributedrebirth.nx01.warp.manifestor.manifest; import java.util.List; -/// Warp manifest2 name value pair entry. +/// Warp manifest 0 bit name value pair entry. /// /// @author للَّٰهِilLצسُو /// @version ©Δ∞ 仙上主天 -public interface WarpManifest2HeaderField> { +public interface WarpManifestX0HeaderField> { T getName(); diff --git a/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifest2Section.java b/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestX0Section.java similarity index 94% rename from nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifest2Section.java rename to nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestX0Section.java index 6b936f2..74c3b7e 100644 --- a/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifest2Section.java +++ b/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestX0Section.java @@ -30,11 +30,11 @@ package love.distributedrebirth.nx01.warp.manifestor.manifest; import java.util.List; import java.util.Optional; -/// Warp manifest2 section. +/// Warp manifest 0 bit section. /// /// @author للَّٰهِilLצسُو /// @version ©Δ∞ 仙上主天 -public interface WarpManifest2Section, S extends WarpManifest2Section> { +public interface WarpManifestX0Section, S extends WarpManifestX0Section> { T getName(); diff --git a/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestTheMimeType.java b/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestX0TheMimeType.java similarity index 87% rename from nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestTheMimeType.java rename to nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestX0TheMimeType.java index b408f58..8221243 100644 --- a/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestTheMimeType.java +++ b/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestX0TheMimeType.java @@ -35,11 +35,11 @@ import java.util.Optional; 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צسُو /// @version ©Δ∞ 仙上主天 -public enum WarpManifestTheMimeType { +public enum WarpManifestX0TheMimeType { MANIFEST_1 ("application/manifest", "MF", null), MANIFEST_2 ("application/manifest2", "MF2", null), @@ -56,7 +56,7 @@ public enum WarpManifestTheMimeType { private final String qExtension; private final byte[] qMagicMarker; - private WarpManifestTheMimeType(String qName, String qExtension, byte[] qMagicMarker) { + private WarpManifestX0TheMimeType(String qName, String qExtension, byte[] qMagicMarker) { this.qName = qName; this.qExtension = qExtension; this.qMagicMarker = qMagicMarker; @@ -78,8 +78,8 @@ public enum WarpManifestTheMimeType { return qMagicMarker; } - static public Optional valueOfQName(String qName) { - for (WarpManifestTheMimeType mimeType : WarpManifestTheMimeType.values()) { + static public Optional valueOfQName(String qName) { + for (WarpManifestX0TheMimeType mimeType : WarpManifestX0TheMimeType.values()) { if (mimeType.getQName().equals(qName)) { return Optional.of(mimeType); } @@ -87,7 +87,7 @@ public enum WarpManifestTheMimeType { 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; if (markerLength == MARKER_3_LENGTH) { magicPrefix = input.readNBytes(markerLength); @@ -96,7 +96,7 @@ public enum WarpManifestTheMimeType { } else { throw new ScopicManifestException("Unsupported marker length: " + markerLength); } - for (WarpManifestTheMimeType mimeType : WarpManifestTheMimeType.values()) { + for (WarpManifestX0TheMimeType mimeType : WarpManifestX0TheMimeType.values()) { if (mimeType.getQMagicMarker() == null) { continue; } @@ -107,7 +107,7 @@ public enum WarpManifestTheMimeType { 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) { return; } diff --git a/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestTheVersion.java b/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestX0TheVersion.java similarity index 91% rename from nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestTheVersion.java rename to nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestX0TheVersion.java index 9f43a0a..2092d24 100644 --- a/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestTheVersion.java +++ b/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestX0TheVersion.java @@ -33,11 +33,11 @@ import java.util.Optional; import org.x4o.o2o.octal.PrimordialOctalOrangeJuiceCord; import org.x4o.o2o.octal.PrimordialOctalOrangeString; -/// Warp manifest schema of the version. +/// Warp manifest 0 bit schema of the version. /// /// @author للَّٰهِilLצسُو /// @version ©Δ∞ 仙上主天 -public enum WarpManifestTheVersion { +public enum WarpManifestX0TheVersion { /// Format: teapot-ascii VERSION_1_0("1.0"), @@ -62,7 +62,7 @@ public enum WarpManifestTheVersion { private final String qName; - private WarpManifestTheVersion(String qName) { + private WarpManifestX0TheVersion(String qName) { this.qName = qName; } @@ -70,8 +70,8 @@ public enum WarpManifestTheVersion { return qName; } - public static Optional valueOfQName(String qName) { - for (WarpManifestTheVersion version : WarpManifestTheVersion.values()) { + public static Optional valueOfQName(String qName) { + for (WarpManifestX0TheVersion version : WarpManifestX0TheVersion.values()) { if (version.getQName().equals(qName)) { return Optional.of(version); } diff --git a/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifest4.java b/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestX18.java similarity index 69% rename from nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifest4.java rename to nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestX18.java index ca3ef17..1d9d999 100644 --- a/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifest4.java +++ b/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestX18.java @@ -32,58 +32,58 @@ import java.util.List; import org.x4o.o2o.octal.PrimordialOctalOrangeJuiceCord; -/// Warp manifest4 model. +/// Warp manifest 18 bit model. /// /// @author للَّٰهِilLצسُو /// @version ©Δ∞ 仙上主天 -public final class WarpManifest4 implements WarpManifest2 { +public final class WarpManifestX18 implements WarpManifestX0 { - private final List attributes; - private final List sections; + private final List attributes; + private final List sections; - public WarpManifest4() { + public WarpManifestX18() { this.attributes = new ArrayList<>(); this.sections = new ArrayList<>(); } @Override - public List getAttributes() { + public List getAttributes() { return attributes; } @Override - public WarpManifest4HeaderField makeAttribute(PrimordialOctalOrangeJuiceCord name, PrimordialOctalOrangeJuiceCord body) { - WarpManifest4HeaderField result = new WarpManifest4HeaderField(name, body); + public WarpManifestX18HeaderField makeAttribute(PrimordialOctalOrangeJuiceCord name, PrimordialOctalOrangeJuiceCord body) { + WarpManifestX18HeaderField result = new WarpManifestX18HeaderField(name, body); this.attributes.add(result); return result; } @Override - public WarpManifest4 withAttribute(PrimordialOctalOrangeJuiceCord name, PrimordialOctalOrangeJuiceCord body) { + public WarpManifestX18 withAttribute(PrimordialOctalOrangeJuiceCord name, PrimordialOctalOrangeJuiceCord body) { makeAttribute(name, body); return this; } @Override - public WarpManifest4 withAttributes(List attributes) { + public WarpManifestX18 withAttributes(List attributes) { this.attributes.addAll(attributes); return this; } @Override - public List getSections() { + public List getSections() { return this.sections; } @Override - public WarpManifest4Section makeSection(PrimordialOctalOrangeJuiceCord sectionName) { - WarpManifest4Section result = new WarpManifest4Section(sectionName); + public WarpManifestX18Section makeSection(PrimordialOctalOrangeJuiceCord sectionName) { + WarpManifestX18Section result = new WarpManifestX18Section(sectionName); this.sections.add(result); return result; } @Override - public WarpManifest4 withSections(List sections) { + public WarpManifestX18 withSections(List sections) { this.sections.addAll(sections); return this; } diff --git a/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifest4HeaderField.java b/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestX18HeaderField.java similarity index 84% rename from nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifest4HeaderField.java rename to nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestX18HeaderField.java index 60d18c7..82c1579 100644 --- a/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifest4HeaderField.java +++ b/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestX18HeaderField.java @@ -32,21 +32,21 @@ import java.util.List; import org.x4o.o2o.octal.PrimordialOctalOrangeJuiceCord; -/// Warp manifest4 name value pair entry. +/// Warp manifest 18 bit name value pair entry. /// /// @author للَّٰهِilLצسُو /// @version ©Δ∞ 仙上主天 -public final class WarpManifest4HeaderField implements WarpManifest2HeaderField { +public final class WarpManifestX18HeaderField implements WarpManifestX0HeaderField { private PrimordialOctalOrangeJuiceCord name; private PrimordialOctalOrangeJuiceCord body; private final List remarks; - public WarpManifest4HeaderField() { + public WarpManifestX18HeaderField() { this.remarks = new ArrayList<>(); } - public WarpManifest4HeaderField(PrimordialOctalOrangeJuiceCord name, PrimordialOctalOrangeJuiceCord body) { + public WarpManifestX18HeaderField(PrimordialOctalOrangeJuiceCord name, PrimordialOctalOrangeJuiceCord body) { this(); this.name = name; this.body = body; @@ -78,13 +78,13 @@ public final class WarpManifest4HeaderField implements WarpManifest2HeaderField< } @Override - public WarpManifest4HeaderField withRemark(PrimordialOctalOrangeJuiceCord remark) { + public WarpManifestX18HeaderField withRemark(PrimordialOctalOrangeJuiceCord remark) { this.remarks.add(remark); return this; } @Override - public WarpManifest4HeaderField withRemarks(List remarks) { + public WarpManifestX18HeaderField withRemarks(List remarks) { this.remarks.addAll(remarks); return this; } diff --git a/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifest4Section.java b/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestX18Section.java similarity index 72% rename from nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifest4Section.java rename to nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestX18Section.java index 2e0e790..1bfaa4f 100644 --- a/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifest4Section.java +++ b/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestX18Section.java @@ -32,22 +32,22 @@ import java.util.List; import org.x4o.o2o.octal.PrimordialOctalOrangeJuiceCord; -/// Warp manifest4 section. +/// Warp manifest 18 bit section. /// /// @author للَّٰهِilLצسُو /// @version ©Δ∞ 仙上主天 -public final class WarpManifest4Section implements WarpManifest2Section { +public final class WarpManifestX18Section implements WarpManifestX0Section { private PrimordialOctalOrangeJuiceCord name; - private final List attributes; + private final List attributes; private final List remarks; - public WarpManifest4Section() { + public WarpManifestX18Section() { this.attributes = new ArrayList<>(); this.remarks = new ArrayList<>(); } - public WarpManifest4Section(PrimordialOctalOrangeJuiceCord name) { + public WarpManifestX18Section(PrimordialOctalOrangeJuiceCord name) { this(); this.name = name; } @@ -63,26 +63,26 @@ public final class WarpManifest4Section implements WarpManifest2Section getAttributes() { + public List getAttributes() { return attributes; } @Override - public WarpManifest4HeaderField makeAttribute(PrimordialOctalOrangeJuiceCord name, PrimordialOctalOrangeJuiceCord body) { - WarpManifest4HeaderField result = new WarpManifest4HeaderField(name, body); + public WarpManifestX18HeaderField makeAttribute(PrimordialOctalOrangeJuiceCord name, PrimordialOctalOrangeJuiceCord body) { + WarpManifestX18HeaderField result = new WarpManifestX18HeaderField(name, body); attributes.add(result); return result; } @Override - public WarpManifest4Section withAttribute(PrimordialOctalOrangeJuiceCord name, PrimordialOctalOrangeJuiceCord body) { - WarpManifest4HeaderField result = new WarpManifest4HeaderField(name, body); + public WarpManifestX18Section withAttribute(PrimordialOctalOrangeJuiceCord name, PrimordialOctalOrangeJuiceCord body) { + WarpManifestX18HeaderField result = new WarpManifestX18HeaderField(name, body); attributes.add(result); return this; } @Override - public WarpManifest4Section withAttributes(List attributes) { + public WarpManifestX18Section withAttributes(List attributes) { this.attributes.addAll(attributes); return this; } @@ -93,13 +93,13 @@ public final class WarpManifest4Section implements WarpManifest2Section remarks) { + public WarpManifestX18Section withRemarks(List remarks) { this.remarks.addAll(remarks); return this; } diff --git a/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifest3.java b/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestX8.java similarity index 72% rename from nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifest3.java rename to nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestX8.java index e8d5866..4195ac9 100644 --- a/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifest3.java +++ b/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestX8.java @@ -30,58 +30,58 @@ package love.distributedrebirth.nx01.warp.manifestor.manifest; import java.util.ArrayList; import java.util.List; -/// Warp manifest3 model. +/// Warp manifest 8 bit model. /// /// @author للَّٰهِilLצسُو /// @version ©Δ∞ 仙上主天 -public final class WarpManifest3 implements WarpManifest2 { +public final class WarpManifestX8 implements WarpManifestX0 { - private final List attributes; - private final List sections; + private final List attributes; + private final List sections; - public WarpManifest3() { + public WarpManifestX8() { this.attributes = new ArrayList<>(); this.sections = new ArrayList<>(); } @Override - public List getAttributes() { + public List getAttributes() { return this.attributes; } @Override - public WarpManifest3HeaderField makeAttribute(String name, String body) { - WarpManifest3HeaderField result = new WarpManifest3HeaderField(name, body); + public WarpManifestX8HeaderField makeAttribute(String name, String body) { + WarpManifestX8HeaderField result = new WarpManifestX8HeaderField(name, body); this.attributes.add(result); return result; } @Override - public WarpManifest3 withAttribute(String name, String body) { + public WarpManifestX8 withAttribute(String name, String body) { makeAttribute(name, body); return this; } @Override - public WarpManifest3 withAttributes(List attributes) { + public WarpManifestX8 withAttributes(List attributes) { this.attributes.addAll(attributes); return this; } @Override - public List getSections() { + public List getSections() { return this.sections; } @Override - public WarpManifest3Section makeSection(String sectionName) { - WarpManifest3Section result = new WarpManifest3Section(sectionName); + public WarpManifestX8Section makeSection(String sectionName) { + WarpManifestX8Section result = new WarpManifestX8Section(sectionName); this.sections.add(result); return result; } @Override - public WarpManifest3 withSections(List sections) { + public WarpManifestX8 withSections(List sections) { this.sections.addAll(sections); return this; } diff --git a/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifest3HeaderField.java b/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestX8HeaderField.java similarity index 86% rename from nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifest3HeaderField.java rename to nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestX8HeaderField.java index 6676e54..9999c78 100644 --- a/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifest3HeaderField.java +++ b/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestX8HeaderField.java @@ -30,21 +30,21 @@ package love.distributedrebirth.nx01.warp.manifestor.manifest; import java.util.ArrayList; import java.util.List; -/// Warp manifest3 name value pair entry. +/// Warp manifest 8 bit name value pair entry. /// /// @author للَّٰهِilLצسُو /// @version ©Δ∞ 仙上主天 -public final class WarpManifest3HeaderField implements WarpManifest2HeaderField { +public final class WarpManifestX8HeaderField implements WarpManifestX0HeaderField { private String name; private String body; private final List remarks; - public WarpManifest3HeaderField() { + public WarpManifestX8HeaderField() { this.remarks = new ArrayList<>(); } - public WarpManifest3HeaderField(String name, String body) { + public WarpManifestX8HeaderField(String name, String body) { this(); this.name = name; this.body = body; @@ -76,13 +76,13 @@ public final class WarpManifest3HeaderField implements WarpManifest2HeaderField< } @Override - public WarpManifest3HeaderField withRemark(String remark) { + public WarpManifestX8HeaderField withRemark(String remark) { this.remarks.add(remark); return this; } @Override - public WarpManifest3HeaderField withRemarks(List remarks) { + public WarpManifestX8HeaderField withRemarks(List remarks) { this.remarks.addAll(remarks); return this; } diff --git a/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifest3Section.java b/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestX8Section.java similarity index 75% rename from nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifest3Section.java rename to nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestX8Section.java index dbe4ba7..bbecf8b 100644 --- a/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifest3Section.java +++ b/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestX8Section.java @@ -30,22 +30,22 @@ package love.distributedrebirth.nx01.warp.manifestor.manifest; import java.util.ArrayList; import java.util.List; -/// Warp manifest3 section. +/// Warp manifest 8 bit section. /// /// @author للَّٰهِilLצسُو /// @version ©Δ∞ 仙上主天 -public final class WarpManifest3Section implements WarpManifest2Section { +public final class WarpManifestX8Section implements WarpManifestX0Section { private String name; - private final List attributes; + private final List attributes; private final List remarks; - public WarpManifest3Section() { + public WarpManifestX8Section() { this.attributes = new ArrayList<>(); this.remarks = new ArrayList<>(); } - public WarpManifest3Section(String name) { + public WarpManifestX8Section(String name) { this(); this.name = name; } @@ -61,26 +61,26 @@ public final class WarpManifest3Section implements WarpManifest2Section getAttributes() { + public List getAttributes() { return attributes; } @Override - public WarpManifest3HeaderField makeAttribute(String name, String body) { - WarpManifest3HeaderField result = new WarpManifest3HeaderField(name, body); + public WarpManifestX8HeaderField makeAttribute(String name, String body) { + WarpManifestX8HeaderField result = new WarpManifestX8HeaderField(name, body); this.attributes.add(result); return result; } @Override - public WarpManifest3Section withAttribute(String name, String body) { - WarpManifest3HeaderField result = new WarpManifest3HeaderField(name, body); + public WarpManifestX8Section withAttribute(String name, String body) { + WarpManifestX8HeaderField result = new WarpManifestX8HeaderField(name, body); this.attributes.add(result); return this; } @Override - public WarpManifest3Section withAttributes(List attributes) { + public WarpManifestX8Section withAttributes(List attributes) { this.attributes.addAll(attributes); return this; } @@ -91,13 +91,13 @@ public final class WarpManifest3Section implements WarpManifest2Section remarks) { + public WarpManifestX8Section withRemarks(List remarks) { this.remarks.addAll(remarks); return this; } diff --git a/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/scopic/ScopicManifestContentStringHandler.java b/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/scopic/ScopicManifestContentStringHandler.java index 19d778e..4bcb3db 100644 --- a/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/scopic/ScopicManifestContentStringHandler.java +++ b/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/scopic/ScopicManifestContentStringHandler.java @@ -32,9 +32,9 @@ import java.util.List; import java.util.Objects; import java.util.Optional; -import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest3; -import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest3Section; -import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestTheVersion; +import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8; +import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8Section; +import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX0TheVersion; /// Stroboscopic manifest 1 and 2 content handler. /// @@ -42,12 +42,12 @@ import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestTheVers /// @version ©Δ∞ 仙上主天 public class ScopicManifestContentStringHandler implements ScopicManifestContent { - private final WarpManifest3 manifest; - private WarpManifest3Section currentSection; + private final WarpManifestX8 manifest; + private WarpManifestX8Section currentSection; private List remarks; - private WarpManifestTheVersion[] supportedVersions; + private WarpManifestX0TheVersion[] supportedVersions; - public ScopicManifestContentStringHandler(WarpManifest3 manifest, WarpManifestTheVersion... supportedVersions) { + public ScopicManifestContentStringHandler(WarpManifestX8 manifest, WarpManifestX0TheVersion... supportedVersions) { this.manifest = manifest; this.remarks = new ArrayList<>(); this.supportedVersions = supportedVersions; @@ -58,12 +58,12 @@ public class ScopicManifestContentStringHandler implements ScopicManifestContent if (supportedVersions.length == 0) { return; // no check requested } - Optional manifestVersion = WarpManifestTheVersion.valueOfQName(version); + Optional manifestVersion = WarpManifestX0TheVersion.valueOfQName(version); if (manifestVersion.isEmpty()) { throw new ScopicManifestException("Unknown manifest version: " + version); } - WarpManifestTheVersion versionParsed = manifestVersion.get(); - for (WarpManifestTheVersion supportedVersion : supportedVersions) { + WarpManifestX0TheVersion versionParsed = manifestVersion.get(); + for (WarpManifestX0TheVersion supportedVersion : supportedVersions) { if (supportedVersion.equals(versionParsed)) { return; } diff --git a/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/scopic/iomf/ScopicManifestContentReader.java b/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/scopic/iomf/ScopicManifestContentReader.java index 3a23b1c..8ed08a4 100644 --- a/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/scopic/iomf/ScopicManifestContentReader.java +++ b/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/scopic/iomf/ScopicManifestContentReader.java @@ -37,8 +37,8 @@ import java.util.PrimitiveIterator; import org.x4o.o2o.io.sax3.XMLConstants; -import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest3HeaderField; -import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestTheVersion; +import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8HeaderField; +import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX0TheVersion; import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestContent; import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestException; @@ -51,7 +51,7 @@ public class ScopicManifestContentReader { static public final boolean FORCE_VERSION_1_0 = true; private final ScopicManifestContent handler; private final boolean forceV1; - private WarpManifestTheVersion version; + private WarpManifestX0TheVersion version; public ScopicManifestContentReader(ScopicManifestContent handler) { this(handler, false); @@ -66,11 +66,11 @@ public class ScopicManifestContentReader { try (BufferedReader in = new BufferedReader(new InputStreamReader(input, StandardCharsets.UTF_8))) { handler.strobeManifestStart(); String line = in.readLine(); - WarpManifest3HeaderField fieldVersion = parseLine(line); + WarpManifestX8HeaderField fieldVersion = parseLine(line); version = parseVersion(fieldVersion); handler.strobeManifestDeclaration(version.getQName()); - WarpManifest3HeaderField fieldPrev = null; - WarpManifest3HeaderField field = null; + WarpManifestX8HeaderField fieldPrev = null; + WarpManifestX8HeaderField field = null; boolean isContinuation = false; String currentName = null; 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())) { throw new ScopicManifestException("Wrong magic version: " + fieldVersion.getName()); // NOTE: on V3 input this should fail, name == null } - Optional versionOpt = WarpManifestTheVersion.valueOfQName(fieldVersion.getBody()); + Optional versionOpt = WarpManifestX0TheVersion.valueOfQName(fieldVersion.getBody()); if (versionOpt.isEmpty()) { throw new ScopicManifestException("Missing manifest version: " + fieldVersion.getBody()); } - WarpManifestTheVersion versionFile = versionOpt.get(); - if (WarpManifestTheVersion.VERSION_1_0.equals(versionFile)) { + WarpManifestX0TheVersion versionFile = versionOpt.get(); + if (WarpManifestX0TheVersion.VERSION_1_0.equals(versionFile)) { return versionFile; } - if (WarpManifestTheVersion.VERSION_2_0.equals(versionFile)) { + if (WarpManifestX0TheVersion.VERSION_2_0.equals(versionFile)) { if (forceV1) { 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); } - private WarpManifest3HeaderField parseLine(String line) { + private WarpManifestX8HeaderField parseLine(String line) { int splitIdx = line.indexOf(ScopicManifestConstants.PART_ATTR_SEPERATOR); if (splitIdx == -1) { - return new WarpManifest3HeaderField(line, line); + return new WarpManifestX8HeaderField(line, line); } String name = line.substring(0, splitIdx); - if (WarpManifestTheVersion.VERSION_2_0.equals(version)) { + if (WarpManifestX0TheVersion.VERSION_2_0.equals(version)) { name = normalizeV2NameString(name); } String body = line.substring(splitIdx + 2, line.length()); - return new WarpManifest3HeaderField(name, body); + return new WarpManifestX8HeaderField(name, body); } private String normalizeV2NameString(String value) { diff --git a/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/scopic/iomf/ScopicManifestContentWriter.java b/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/scopic/iomf/ScopicManifestContentWriter.java index d76570b..ab72e89 100644 --- a/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/scopic/iomf/ScopicManifestContentWriter.java +++ b/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/scopic/iomf/ScopicManifestContentWriter.java @@ -33,7 +33,7 @@ import java.util.Arrays; import java.util.PrimitiveIterator; 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.ScopicManifestDuplicateDetector; import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestDuplicatePart; @@ -78,7 +78,7 @@ public class ScopicManifestContentWriter implements ScopicManifestContent ScopicManifestConstants.ATTR_MANIFEST_VERSION_MAX_LENGHT) { diff --git a/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/scopic/iomf3/ScopicManifest3ContentReader.java b/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/scopic/iomf3/ScopicManifest3ContentReader.java index 0da0e63..658fc82 100644 --- a/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/scopic/iomf3/ScopicManifest3ContentReader.java +++ b/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/scopic/iomf3/ScopicManifest3ContentReader.java @@ -34,7 +34,7 @@ import java.util.Optional; import org.x4o.o2o.io.tlv.TLVChainSexTeenBit; 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.ScopicManifestException; @@ -62,14 +62,14 @@ public class ScopicManifest3ContentReader { throw new ScopicManifestException("Wrong magic version: 0x" + Integer.toHexString(frameVersion.getSegmentPrologSmurf())); } String fieldVersion = frameVersion.getSegmentChainString(); - Optional versionOpt = WarpManifestTheVersion.valueOfQName(fieldVersion); + Optional versionOpt = WarpManifestX0TheVersion.valueOfQName(fieldVersion); if (versionOpt.isEmpty()) { 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); } - handler.strobeManifestDeclaration(WarpManifestTheVersion.VERSION_3_0.getQName()); + handler.strobeManifestDeclaration(WarpManifestX0TheVersion.VERSION_3_0.getQName()); while (chainIterator.hasNext()) { TLVChainSexTeenBitFrame frame = chainIterator.next(); if (ScopicManifest3FrameTLV.MAIN_ATTRIBUTE_NAME.ordinalFrameTypeSmurf() == frame.getSegmentPrologSmurf()) { diff --git a/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/scopic/iomf4/ScopicManifest4ContentHandler.java b/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/scopic/iomf4/ScopicManifest4ContentHandler.java index 480e33d..c519d8c 100644 --- a/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/scopic/iomf4/ScopicManifest4ContentHandler.java +++ b/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/scopic/iomf4/ScopicManifest4ContentHandler.java @@ -33,9 +33,9 @@ import java.util.Objects; import org.x4o.o2o.octal.PrimordialOctalOrangeJuiceCord; -import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest4; -import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest4Section; -import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestTheVersion; +import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX18; +import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX18Section; +import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX0TheVersion; import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestContent; import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestException; @@ -45,18 +45,18 @@ import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestExcepti /// @version ©Δ∞ 仙上主天 public class ScopicManifest4ContentHandler implements ScopicManifestContent { - private final WarpManifest4 manifest; - private WarpManifest4Section currentSection; + private final WarpManifestX18 manifest; + private WarpManifestX18Section currentSection; private List remarks; - public ScopicManifest4ContentHandler(WarpManifest4 manifest) { + public ScopicManifest4ContentHandler(WarpManifestX18 manifest) { this.manifest = manifest; this.remarks = new ArrayList<>(); } @Override public void strobeManifestDeclaration(PrimordialOctalOrangeJuiceCord version) { - if (WarpManifestTheVersion.VERSION_4_0.equals(version)) { + if (WarpManifestX0TheVersion.VERSION_4_0.equals(version)) { return; } throw new ScopicManifestException("Unsupported manifest version: " + version); diff --git a/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/scopic/iomf4/ScopicManifest4ContentReader.java b/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/scopic/iomf4/ScopicManifest4ContentReader.java index 673d716..09cad40 100644 --- a/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/scopic/iomf4/ScopicManifest4ContentReader.java +++ b/nx01-warp-manifestor/src/main/java/love/distributedrebirth/nx01/warp/manifestor/scopic/iomf4/ScopicManifest4ContentReader.java @@ -34,7 +34,7 @@ import org.x4o.o2o.io.tlv.TLVChainOctalSex; import org.x4o.o2o.io.tlv.TLVChainOctalSexFrame; 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.ScopicManifestException; @@ -62,8 +62,8 @@ public class ScopicManifest4ContentReader { throw new ScopicManifestException("Wrong magic version: 0y" + frameVersion.getSegmentProlog()); } PrimordialOctalOrangeJuiceCord fieldVersion = frameVersion.getSegmentChainAtoms(); - if (!WarpManifestTheVersion.VERSION_4_0.equals(fieldVersion)) { - throw new ScopicManifestException("Mismatched version: " + fieldVersion + " requested: " + WarpManifestTheVersion.VERSION_4_0); + if (!WarpManifestX0TheVersion.VERSION_4_0.equals(fieldVersion)) { + throw new ScopicManifestException("Mismatched version: " + fieldVersion + " requested: " + WarpManifestX0TheVersion.VERSION_4_0); } handler.strobeManifestDeclaration(frameVersion.getSegmentChainAtoms()); while (chainIterator.hasNext()) { diff --git a/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/WarpManifestChinaTest.java b/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/WarpManifestChinaTest.java index 127ec51..9321c8e 100644 --- a/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/WarpManifestChinaTest.java +++ b/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/WarpManifestChinaTest.java @@ -31,8 +31,8 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver; -import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest3; -import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest3Section; +import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8; +import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8Section; /// @author للَّٰهِilLצسُو /// @version ©Δ∞ 仙上主天s @@ -40,11 +40,11 @@ public class WarpManifestChinaTest { @Test public void testFullChineesium() { - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.makeAttribute("書", "乞丐歌本").withRemark("同義詞 乞丐歌集"); manifest.makeAttribute("年", "一千五百八十一").withRemark("與中國年份時間不同的年份時間"); manifest.makeAttribute("描述", "起司頭押韻詞海盜歌曲歌詞"); - WarpManifest3Section section = null; + WarpManifestX8Section section = null; section = manifest.makeSection("第一節").withRemark("所以這是一個可選的額外元信息文本"); section.makeAttribute("一號線", "威廉斯·範·納蘇韋").withRemark("章魚有八隻手臂"); @@ -200,6 +200,6 @@ public class WarpManifestChinaTest { Assertions.assertNotNull(output); System.out.println(output); System.out.println("========="); - System.out.println(WarpManifestorDriver.亞.writeViniString(new WarpManifest3().withSections(manifest.getSections()))); + System.out.println(WarpManifestorDriver.亞.writeViniString(new WarpManifestX8().withSections(manifest.getSections()))); } } diff --git a/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/WarpManifestorDriverTest.java b/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/WarpManifestorDriverTest.java index 7546f00..d6f219e 100644 --- a/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/WarpManifestorDriverTest.java +++ b/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/WarpManifestorDriverTest.java @@ -31,7 +31,7 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; 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צسُو /// @version ©Δ∞ 仙上主天 @@ -39,7 +39,7 @@ public class WarpManifestorDriverTest { @Test public void testWriteSimple() { - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.makeAttribute("foo", "bar"); manifest.makeSection("my1").withAttribute("foo1", "bar1"); String output = WarpManifestorDriver.亞.writeV2String(manifest); @@ -51,7 +51,7 @@ public class WarpManifestorDriverTest { public void testLineWrapAsLastLine() { 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"; - WarpManifest3 manitest = WarpManifestorDriver.亞.readV2Stream(getClass().getResourceAsStream("test-line-wrap.mf")); + WarpManifestX8 manitest = WarpManifestorDriver.亞.readV2Stream(getClass().getResourceAsStream("test-line-wrap.mf")); Assertions.assertNotNull(manitest); Assertions.assertEquals(21, manitest.getAttributes().size()); Assertions.assertEquals("Implementation-Title", manitest.getAttributes().get(0).getName()); diff --git a/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/WarpManifestorVIniTest.java b/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/WarpManifestorVIniTest.java index 372855d..3b0bce0 100644 --- a/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/WarpManifestorVIniTest.java +++ b/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/WarpManifestorVIniTest.java @@ -31,7 +31,7 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; 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צسُو /// @version ©Δ∞ 仙上主天 @@ -39,7 +39,7 @@ public class WarpManifestorVIniTest { @Test 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.assertEquals(3, manitest.getSections().size()); Assertions.assertEquals("Network Time Service", manitest.getSectionAttributeBodyPrivate("Unit", "Description")); @@ -49,7 +49,7 @@ public class WarpManifestorVIniTest { @Test 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.assertEquals(3, manitest.getSections().size()); @@ -70,7 +70,7 @@ public class WarpManifestorVIniTest { @Test 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.assertEquals(6, manitest.getSections().size()); @@ -94,7 +94,7 @@ public class WarpManifestorVIniTest { @Test 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); String strini = WarpManifestorDriver.亞.writeViniString(manitest); Assertions.assertTrue(strini.contains("target region = Bay Area")); @@ -108,7 +108,7 @@ public class WarpManifestorVIniTest { @Test 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.assertEquals(3, manitest.getSections().size()); diff --git a/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestBigBodyTest.java b/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestBigBodyTest.java index f2ba565..eb4614f 100644 --- a/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestBigBodyTest.java +++ b/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestBigBodyTest.java @@ -33,7 +33,7 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; 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; /// @author للَّٰهِilLצسُو @@ -46,7 +46,7 @@ public class WarpManifestBigBodyTest { for (int i=0;i<512;i++) { buf.append("1234"); } - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.withAttribute("long-longer-longggger", buf.toString()); String output = WarpManifestorDriver.亞.writeV1String(manifest); Assertions.assertNotNull(output); @@ -62,7 +62,7 @@ public class WarpManifestBigBodyTest { for (int i=0;i<512;i++) { buf.append("1234"); } - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.withAttribute("long-longer-longggger", buf.toString()); String output = WarpManifestorDriver.亞.writeV2String(manifest); Assertions.assertNotNull(output); @@ -72,7 +72,7 @@ public class WarpManifestBigBodyTest { Assertions.assertEquals(2071, lines[1].getBytes(StandardCharsets.UTF_8).length); String outputV1 = WarpManifestorDriver.亞.writeV1String(manifest); - WarpManifest3 manitestV1 = WarpManifestorDriver.亞.readV2String(outputV1); + WarpManifestX8 manitestV1 = WarpManifestorDriver.亞.readV2String(outputV1); Assertions.assertNotNull(manitestV1); Assertions.assertEquals(1, manitestV1.getAttributes().size()); } @@ -83,11 +83,11 @@ public class WarpManifestBigBodyTest { for (int i=0;i<65535;i++) { buf.append("0"); } - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.withAttribute("limit-lines", buf.toString()); byte[] output = WarpManifestorDriver.亞.writeV3Array(manifest); 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.assertThrows(ScopicManifestException.class, () -> { manifest.withAttribute("limit-lines", "1" + buf.toString()); diff --git a/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestBodyIllegalTest.java b/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestBodyIllegalTest.java index fa4eddd..f38ece9 100644 --- a/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestBodyIllegalTest.java +++ b/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestBodyIllegalTest.java @@ -31,7 +31,7 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; 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; /// @author للَّٰهِilLצسُو @@ -40,7 +40,7 @@ public class WarpManifestBodyIllegalTest { @Test public void testWriteV1BodyNewLine() { - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.withAttribute("foo", "bar\n"); Assertions.assertThrows(ScopicManifestException.class, () -> { WarpManifestorDriver.亞.writeV1String(manifest); @@ -49,7 +49,7 @@ public class WarpManifestBodyIllegalTest { @Test public void testWriteV1BodyLineFeed() { - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.withAttribute("foo", "bar\r"); Assertions.assertThrows(ScopicManifestException.class, () -> { WarpManifestorDriver.亞.writeV1String(manifest); @@ -58,7 +58,7 @@ public class WarpManifestBodyIllegalTest { @Test public void testWriteV1BodyNull() { - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.withAttribute("foo", "bar\u0000"); Assertions.assertThrows(ScopicManifestException.class, () -> { WarpManifestorDriver.亞.writeV1String(manifest); @@ -67,7 +67,7 @@ public class WarpManifestBodyIllegalTest { @Test public void testWriteV2BodyNewLine() { - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.withAttribute("foo", "bar\n"); Assertions.assertThrows(ScopicManifestException.class, () -> { WarpManifestorDriver.亞.writeV2String(manifest); @@ -76,7 +76,7 @@ public class WarpManifestBodyIllegalTest { @Test public void testWriteV2BodyLineFeed() { - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.withAttribute("foo", "bar\r"); Assertions.assertThrows(ScopicManifestException.class, () -> { WarpManifestorDriver.亞.writeV2String(manifest); @@ -85,7 +85,7 @@ public class WarpManifestBodyIllegalTest { @Test public void testWriteV2BodyNull() { - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.withAttribute("foo", "bar\u0000"); Assertions.assertThrows(ScopicManifestException.class, () -> { WarpManifestorDriver.亞.writeV2String(manifest); @@ -94,7 +94,7 @@ public class WarpManifestBodyIllegalTest { @Test public void testWriteV3BodyNewLine() { - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.withAttribute("foo", "bar\n"); Assertions.assertThrows(ScopicManifestException.class, () -> { WarpManifestorDriver.亞.writeV3Array(manifest); @@ -103,7 +103,7 @@ public class WarpManifestBodyIllegalTest { @Test public void testWriteV3BodyLineFeed() { - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.withAttribute("foo", "bar\r"); Assertions.assertThrows(ScopicManifestException.class, () -> { WarpManifestorDriver.亞.writeV3Array(manifest); @@ -112,7 +112,7 @@ public class WarpManifestBodyIllegalTest { @Test public void testWriteV3BodyNull() { - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.withAttribute("foo", "bar\u0000"); Assertions.assertThrows(ScopicManifestException.class, () -> { WarpManifestorDriver.亞.writeV3Array(manifest); diff --git a/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestNameDupTest.java b/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestNameDupTest.java index 749ef27..d1abf74 100644 --- a/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestNameDupTest.java +++ b/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestNameDupTest.java @@ -34,8 +34,8 @@ import org.junit.jupiter.api.Test; import org.x4o.o2o.octal.PrimordialOctalOrangeString; import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver; -import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest3; -import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest4; +import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8; +import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX18; import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestException; /// @author للَّٰهِilLצسُو @@ -44,7 +44,7 @@ public class WarpManifestNameDupTest { @Test public void testWriteV1DuplicateMainAttribute() { - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.withAttribute("foo", "bar1"); manifest.withAttribute("foo", "bar2"); Assertions.assertThrows(ScopicManifestException.class, () -> { @@ -54,7 +54,7 @@ public class WarpManifestNameDupTest { @Test public void testWriteV1DuplicateSection() { - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.makeSection("junit"); manifest.makeSection("junit"); Assertions.assertThrows(ScopicManifestException.class, () -> { @@ -64,7 +64,7 @@ public class WarpManifestNameDupTest { @Test public void testWriteV1DuplicateSectionAttribute() { - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.makeSection("junit").withAttribute("foo", "bar1").withAttribute("foo", "bar1"); Assertions.assertThrows(ScopicManifestException.class, () -> { WarpManifestorDriver.亞.writeV1String(manifest); @@ -73,7 +73,7 @@ public class WarpManifestNameDupTest { @Test public void testWriteV2DuplicateMainAttribute() { - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.withAttribute("foo", "bar1"); manifest.withAttribute("foo", "bar2"); Assertions.assertThrows(ScopicManifestException.class, () -> { @@ -83,7 +83,7 @@ public class WarpManifestNameDupTest { @Test public void testWriteV2DuplicateSection() { - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.makeSection("junit"); manifest.makeSection("junit"); Assertions.assertThrows(ScopicManifestException.class, () -> { @@ -93,7 +93,7 @@ public class WarpManifestNameDupTest { @Test public void testWriteV2DuplicateSectionAttribute() { - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.makeSection("junit").withAttribute("foo", "bar1").withAttribute("foo", "bar1"); Assertions.assertThrows(ScopicManifestException.class, () -> { WarpManifestorDriver.亞.writeV2String(manifest); @@ -102,7 +102,7 @@ public class WarpManifestNameDupTest { @Test public void testWriteV3DuplicateMainAttribute() { - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.withAttribute("foo", "bar1"); manifest.withAttribute("foo", "bar2"); Assertions.assertThrows(ScopicManifestException.class, () -> { @@ -112,7 +112,7 @@ public class WarpManifestNameDupTest { @Test public void testWriteV3DuplicateSection() { - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.makeSection("junit"); manifest.makeSection("junit"); Assertions.assertThrows(ScopicManifestException.class, () -> { @@ -122,7 +122,7 @@ public class WarpManifestNameDupTest { @Test public void testWriteV3DuplicateSectionAttribute() { - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.makeSection("junit").withAttribute("foo", "bar1").withAttribute("foo", "bar1"); Assertions.assertThrows(ScopicManifestException.class, () -> { WarpManifestorDriver.亞.writeV3Array(manifest); @@ -131,7 +131,7 @@ public class WarpManifestNameDupTest { @Test 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))); Assertions.assertThrows(ScopicManifestException.class, () -> { @@ -141,7 +141,7 @@ public class WarpManifestNameDupTest { @Test 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))); Assertions.assertThrows(ScopicManifestException.class, () -> { @@ -151,7 +151,7 @@ public class WarpManifestNameDupTest { @Test public void testWriteV4DuplicateSectionAttribute() { - WarpManifest4 manifest = new WarpManifest4(); + WarpManifestX18 manifest = new WarpManifestX18(); 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))); diff --git a/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestNameEmptyTest.java b/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestNameEmptyTest.java index a0cf6bc..a0d55f2 100644 --- a/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestNameEmptyTest.java +++ b/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestNameEmptyTest.java @@ -34,8 +34,8 @@ import org.junit.jupiter.api.Test; import org.x4o.o2o.octal.PrimordialOctalOrangeString; import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver; -import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest3; -import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest4; +import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8; +import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX18; import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestException; /// @author للَّٰهِilLצسُو @@ -44,7 +44,7 @@ public class WarpManifestNameEmptyTest { @Test public void testWriteV1NameEmpty() { - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.withAttribute("", "bar"); Assertions.assertThrows(ScopicManifestException.class, () -> { WarpManifestorDriver.亞.writeV1String(manifest); @@ -53,7 +53,7 @@ public class WarpManifestNameEmptyTest { @Test public void testWriteV2NameEmpty() { - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.withAttribute("", "bar"); Assertions.assertThrows(ScopicManifestException.class, () -> { WarpManifestorDriver.亞.writeV2String(manifest); @@ -62,7 +62,7 @@ public class WarpManifestNameEmptyTest { @Test public void testWriteV3NameEmpty() { - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.withAttribute("", "bar"); Assertions.assertThrows(ScopicManifestException.class, () -> { WarpManifestorDriver.亞.writeV3Array(manifest); @@ -71,7 +71,7 @@ public class WarpManifestNameEmptyTest { @Test public void testWriteV4NameEmpty() { - WarpManifest4 manifest = new WarpManifest4(); + WarpManifestX18 manifest = new WarpManifestX18(); manifest.withAttribute(PrimordialOctalOrangeString.valueOfEmpty(), PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(12,34))); Assertions.assertThrows(ScopicManifestException.class, () -> { WarpManifestorDriver.亞.writeV4Array(manifest); diff --git a/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestNameForbidCharTest.java b/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestNameForbidCharTest.java index 52dfe32..78ea8ff 100644 --- a/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestNameForbidCharTest.java +++ b/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestNameForbidCharTest.java @@ -31,7 +31,7 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; 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; /// @author للَّٰهِilLצسُو @@ -40,7 +40,7 @@ public class WarpManifestNameForbidCharTest { @Test public void testWriteV1NameNewLine() { - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.withAttribute("foo\n", "bar"); Assertions.assertThrows(ScopicManifestException.class, () -> { WarpManifestorDriver.亞.writeV1String(manifest); @@ -49,7 +49,7 @@ public class WarpManifestNameForbidCharTest { @Test public void testWriteV1NameLineFeed() { - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.withAttribute("foo\r", "bar"); Assertions.assertThrows(ScopicManifestException.class, () -> { WarpManifestorDriver.亞.writeV1String(manifest); @@ -58,7 +58,7 @@ public class WarpManifestNameForbidCharTest { @Test public void testWriteV1NameNull() { - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.withAttribute("foo\u0000", "bar"); Assertions.assertThrows(ScopicManifestException.class, () -> { WarpManifestorDriver.亞.writeV1String(manifest); @@ -67,7 +67,7 @@ public class WarpManifestNameForbidCharTest { @Test public void testWriteV2NameNewLine() { - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.withAttribute("foo\n", "bar"); Assertions.assertThrows(ScopicManifestException.class, () -> { WarpManifestorDriver.亞.writeV2String(manifest); @@ -76,7 +76,7 @@ public class WarpManifestNameForbidCharTest { @Test public void testWriteV2NameLineFeed() { - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.withAttribute("foo\r", "bar"); Assertions.assertThrows(ScopicManifestException.class, () -> { WarpManifestorDriver.亞.writeV2String(manifest); @@ -85,7 +85,7 @@ public class WarpManifestNameForbidCharTest { @Test public void testWriteV2NameNull() { - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.withAttribute("foo\u0000", "bar"); Assertions.assertThrows(ScopicManifestException.class, () -> { WarpManifestorDriver.亞.writeV2String(manifest); @@ -94,7 +94,7 @@ public class WarpManifestNameForbidCharTest { @Test public void testWriteV3NameNewLine() { - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.withAttribute("foo\n", "bar"); Assertions.assertThrows(ScopicManifestException.class, () -> { WarpManifestorDriver.亞.writeV3Array(manifest); @@ -103,7 +103,7 @@ public class WarpManifestNameForbidCharTest { @Test public void testWriteV3NameLineFeed() { - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.withAttribute("foo\r", "bar"); Assertions.assertThrows(ScopicManifestException.class, () -> { WarpManifestorDriver.亞.writeV3Array(manifest); @@ -112,7 +112,7 @@ public class WarpManifestNameForbidCharTest { @Test public void testWriteV3NameNull() { - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.withAttribute("foo\u0000", "bar"); Assertions.assertThrows(ScopicManifestException.class, () -> { WarpManifestorDriver.亞.writeV3Array(manifest); diff --git a/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestNameLimitTest.java b/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestNameLimitTest.java index a4f845f..d6ba21f 100644 --- a/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestNameLimitTest.java +++ b/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestNameLimitTest.java @@ -31,7 +31,7 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; 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; /// @author للَّٰهِilLצسُو @@ -44,7 +44,7 @@ public class WarpManifestNameLimitTest { for (int i=0;i<70;i++) { buf.append("0"); } - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.withAttribute(buf.toString(), "foo"); WarpManifestorDriver.亞.writeV1String(manifest); Assertions.assertThrows(ScopicManifestException.class, () -> { @@ -59,7 +59,7 @@ public class WarpManifestNameLimitTest { for (int i=0;i<65535;i++) { buf.append("0"); } - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.makeAttribute(buf.toString(), "foo").withRemark("remarkable"); String output = WarpManifestorDriver.亞.writeV2String(manifest); Assertions.assertNotNull(output); @@ -77,7 +77,7 @@ public class WarpManifestNameLimitTest { for (int i=0;i<65535;i++) { buf.append("0"); } - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.makeAttribute(buf.toString(), "foo").withRemark("remarkable"); byte[] output = WarpManifestorDriver.亞.writeV3Array(manifest); Assertions.assertNotNull(output); diff --git a/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestNameSeperatorTest.java b/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestNameSeperatorTest.java index 8a97840..5d8b8b0 100644 --- a/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestNameSeperatorTest.java +++ b/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestNameSeperatorTest.java @@ -31,7 +31,7 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; 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; /// @author للَّٰهِilLצسُو @@ -40,7 +40,7 @@ public class WarpManifestNameSeperatorTest { @Test public void testWriteV1NameSeperator() { - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.withAttribute("foo:", "bar"); Assertions.assertThrows(ScopicManifestException.class, () -> { WarpManifestorDriver.亞.writeV1String(manifest); @@ -49,7 +49,7 @@ public class WarpManifestNameSeperatorTest { @Test public void testWriteV2OutputSeperator() { - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.withAttribute("ju n it:", "junit:"); String output = WarpManifestorDriver.亞.writeV2String(manifest); Assertions.assertNotNull(output); @@ -59,11 +59,11 @@ public class WarpManifestNameSeperatorTest { @Test public void testWriteV3OutputSeperator() { - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.withAttribute("ju n it:", "junit:"); byte[] output = WarpManifestorDriver.亞.writeV3Array(manifest); Assertions.assertNotNull(output); - WarpManifest3 manitest = WarpManifestorDriver.亞.readV3Array(output); + WarpManifestX8 manitest = WarpManifestorDriver.亞.readV3Array(output); Assertions.assertNotNull(manitest); Assertions.assertEquals(1, manitest.getAttributes().size()); Assertions.assertEquals("ju n it:", manitest.getAttributes().get(0).getName()); diff --git a/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestNameUnicodeTest.java b/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestNameUnicodeTest.java index e97ac75..9e33bb8 100644 --- a/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestNameUnicodeTest.java +++ b/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestNameUnicodeTest.java @@ -31,7 +31,7 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; 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; /// @author للَّٰهِilLצسُو @@ -40,7 +40,7 @@ public class WarpManifestNameUnicodeTest { @Test public void testWriteV1NameUnicode() { - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.withAttribute("foo", "仙上主天"); WarpManifestorDriver.亞.writeV1String(manifest); Assertions.assertThrows(ScopicManifestException.class, () -> { @@ -51,7 +51,7 @@ public class WarpManifestNameUnicodeTest { @Test public void testWriteV2NameUnicode() { - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.withAttribute("foo", "仙上主天"); manifest.withAttribute("仙上主天", "bar"); String output = WarpManifestorDriver.亞.writeV2String(manifest); @@ -61,7 +61,7 @@ public class WarpManifestNameUnicodeTest { Assertions.assertEquals("foo: 仙上主天", lines[1]); Assertions.assertEquals("仙上主天: bar", lines[2]); - WarpManifest3 manitest = WarpManifestorDriver.亞.readV2String(output); + WarpManifestX8 manitest = WarpManifestorDriver.亞.readV2String(output); Assertions.assertNotNull(manitest); Assertions.assertEquals(2, manitest.getAttributes().size()); Assertions.assertEquals("foo", manitest.getAttributes().get(0).getName()); @@ -74,12 +74,12 @@ public class WarpManifestNameUnicodeTest { @Test public void testWriteV3NameUnicode() { - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.withAttribute("foo", "仙上主天"); manifest.withAttribute("仙上主天", "bar"); byte[] output = WarpManifestorDriver.亞.writeV3Array(manifest); Assertions.assertNotNull(output); - WarpManifest3 manitest = WarpManifestorDriver.亞.readV3Array(output); + WarpManifestX8 manitest = WarpManifestorDriver.亞.readV3Array(output); Assertions.assertNotNull(manitest); Assertions.assertEquals(2, manitest.getAttributes().size()); Assertions.assertEquals("foo", manitest.getAttributes().get(0).getName()); diff --git a/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestSectionNameEmptyTest.java b/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestSectionNameEmptyTest.java index 1ed8337..9d1a287 100644 --- a/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestSectionNameEmptyTest.java +++ b/nx01-warp-manifestor/src/test/java/love/distributedrebirth/nx01/warp/manifestor/manifest/WarpManifestSectionNameEmptyTest.java @@ -34,8 +34,8 @@ import org.junit.jupiter.api.Test; import org.x4o.o2o.octal.PrimordialOctalOrangeString; import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver; -import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest3; -import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest4; +import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8; +import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX18; import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestException; /// @author للَّٰهِilLצسُو @@ -44,7 +44,7 @@ public class WarpManifestSectionNameEmptyTest { @Test public void testWriteV1SectionNameEmpty() { - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.makeSection("").withAttribute("foo", "bar"); Assertions.assertThrows(ScopicManifestException.class, () -> { WarpManifestorDriver.亞.writeV1String(manifest); @@ -53,7 +53,7 @@ public class WarpManifestSectionNameEmptyTest { @Test public void testWriteV2SectionNameEmpty() { - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.makeSection("").withAttribute("foo", "bar"); Assertions.assertThrows(ScopicManifestException.class, () -> { WarpManifestorDriver.亞.writeV2String(manifest); @@ -62,7 +62,7 @@ public class WarpManifestSectionNameEmptyTest { @Test public void testWriteV3SectionNameEmpty() { - WarpManifest3 manifest = new WarpManifest3(); + WarpManifestX8 manifest = new WarpManifestX8(); manifest.makeSection("").withAttribute("foo", "bar"); Assertions.assertThrows(ScopicManifestException.class, () -> { WarpManifestorDriver.亞.writeV3Array(manifest); @@ -72,7 +72,7 @@ public class WarpManifestSectionNameEmptyTest { @Test public void testWriteV4SectionNameEmpty() { PrimordialOctalOrangeString foobar = PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(123,456,789)); - WarpManifest4 manifest = new WarpManifest4(); + WarpManifestX18 manifest = new WarpManifestX18(); manifest.makeSection(PrimordialOctalOrangeString.valueOfEmpty()).withAttribute(foobar, foobar); Assertions.assertThrows(ScopicManifestException.class, () -> { WarpManifestorDriver.亞.writeV4Array(manifest); diff --git a/nx01-zerofungus-server/src/main/java/love/distributedrebirth/nx01/zerofungus/server/web/ZilLaLaFaultFilter.java b/nx01-zerofungus-server/src/main/java/love/distributedrebirth/nx01/zerofungus/server/web/ZilLaLaFaultFilter.java index b3c5564..93bc27a 100644 --- a/nx01-zerofungus-server/src/main/java/love/distributedrebirth/nx01/zerofungus/server/web/ZilLaLaFaultFilter.java +++ b/nx01-zerofungus-server/src/main/java/love/distributedrebirth/nx01/zerofungus/server/web/ZilLaLaFaultFilter.java @@ -39,7 +39,7 @@ import jakarta.servlet.http.HttpServletResponse; import love.distributedrebirth.nx01.warp.fault.BassFaultAnchor; import love.distributedrebirth.nx01.warp.fault.FaultStreamDelegate; 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. /// @@ -62,7 +62,7 @@ public class ZilLaLaFaultFilter extends HttpFilter { throw 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 // relay