Renamed juice Atoms to Cord as string interface

This commit is contained in:
Willem Cazander 2024-12-25 17:09:02 +01:00
parent 5679aa0b0f
commit 9c3966f0bf
18 changed files with 114 additions and 67 deletions

View file

@ -27,6 +27,9 @@ a smurf village and lego bricks.
* Body from the void [ᒢꞱSkeletorObject](nx01-jpp-base/src/main/java/ᒢᐩᐩ/ᒡᒢᑊᒻᒻᓫᔿ/ᒢꞱSkeletorObject.java) * Body from the void [ᒢꞱSkeletorObject](nx01-jpp-base/src/main/java/ᒢᐩᐩ/ᒡᒢᑊᒻᒻᓫᔿ/ᒢꞱSkeletorObject.java)
* Flying coffins [BãßBȍőnIconOfSinCube𓄯ᶠˡʸ](nx01-jpp-base/src/main/java/ᒢᐩᐩ/ᒃᣔᔆᔆᒃᐤᐤᣕ/ᒼᒻᣔᙆᙆ/BãßBȍőnIconOfSinCube𓄯ᶠˡʸ.java) * Flying coffins [BãßBȍőnIconOfSinCube𓄯ᶠˡʸ](nx01-jpp-base/src/main/java/ᒢᐩᐩ/ᒃᣔᔆᔆᒃᐤᐤᣕ/ᒼᒻᣔᙆᙆ/BãßBȍőnIconOfSinCube𓄯ᶠˡʸ.java)
* Local laser pointers [BãßBȍőnSpiderTest](nx01-jpp-base/src/test/java/ᒢᐩᐩ/ᒃᣔᔆᔆᒃᐤᐤᣕ/ᒄᓫᣔᐪᑋ/ᔆᣖᑊᒄᓫᣗ/BãßBȍőnSpiderTest.java) * Local laser pointers [BãßBȍőnSpiderTest](nx01-jpp-base/src/test/java/ᒢᐩᐩ/ᒃᣔᔆᔆᒃᐤᐤᣕ/ᒄᓫᣔᐪᑋ/ᔆᣖᑊᒄᓫᣗ/BãßBȍőnSpiderTest.java)
* Lego stair way [LegoBrickStairWay](nx01-jpp-base/src/main/java/ᒢᐩᐩ/ᒡᒢᑊᒻᒻᓫᔿ/ᣳᣝᐤᣜᣳ/ᒢᓫᑊᐣᑊ/LegoBrickStairWay.java)
* LegoᐧBrickᐧTapeᐧReplicatorᐧχ3 [LegoBrickTapeStudio](nx01-jpp-base/src/main/java/ᒢᐩᐩ/ᒡᒢᑊᒻᒻᓫᔿ/ᣳᣝᐤᣜᣳ/ᒢᓫᑊᐣᑊ/LegoBrickTapeStudio.java)
* Enterprise mainframe text [CDC1604DashP6](nx01-x4o-o2o/src/main/java/org/x4o/o2o/CDC1604DashP6.java)
## Code of Conduct ## Code of Conduct

View file

@ -30,13 +30,13 @@ package love.distributedrebirth.nx01.warp.manifestor.manifest;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.x4o.o2o.octal.PrimordialOctalOrangeJuiceAtoms; import org.x4o.o2o.octal.PrimordialOctalOrangeJuiceCord;
/// Warp manifest4 model. /// Warp manifest4 model.
/// ///
/// @author للَّٰهِilLצسُو /// @author للَّٰهِilLצسُو
/// @version ©Δ 仙上主天 /// @version ©Δ 仙上主天
public final class WarpManifest4 implements WarpManifest2<PrimordialOctalOrangeJuiceAtoms, WarpManifest4, WarpManifest4HeaderField, WarpManifest4Section> { public final class WarpManifest4 implements WarpManifest2<PrimordialOctalOrangeJuiceCord, WarpManifest4, WarpManifest4HeaderField, WarpManifest4Section> {
private final List<WarpManifest4HeaderField> attributes; private final List<WarpManifest4HeaderField> attributes;
private final List<WarpManifest4Section> sections; private final List<WarpManifest4Section> sections;
@ -52,14 +52,14 @@ public final class WarpManifest4 implements WarpManifest2<PrimordialOctalOrangeJ
} }
@Override @Override
public WarpManifest4HeaderField makeAttribute(PrimordialOctalOrangeJuiceAtoms name, PrimordialOctalOrangeJuiceAtoms body) { public WarpManifest4HeaderField makeAttribute(PrimordialOctalOrangeJuiceCord name, PrimordialOctalOrangeJuiceCord body) {
WarpManifest4HeaderField result = new WarpManifest4HeaderField(name, body); WarpManifest4HeaderField result = new WarpManifest4HeaderField(name, body);
this.attributes.add(result); this.attributes.add(result);
return result; return result;
} }
@Override @Override
public WarpManifest4 withAttribute(PrimordialOctalOrangeJuiceAtoms name, PrimordialOctalOrangeJuiceAtoms body) { public WarpManifest4 withAttribute(PrimordialOctalOrangeJuiceCord name, PrimordialOctalOrangeJuiceCord body) {
makeAttribute(name, body); makeAttribute(name, body);
return this; return this;
} }
@ -76,7 +76,7 @@ public final class WarpManifest4 implements WarpManifest2<PrimordialOctalOrangeJ
} }
@Override @Override
public WarpManifest4Section makeSection(PrimordialOctalOrangeJuiceAtoms sectionName) { public WarpManifest4Section makeSection(PrimordialOctalOrangeJuiceCord sectionName) {
WarpManifest4Section result = new WarpManifest4Section(sectionName); WarpManifest4Section result = new WarpManifest4Section(sectionName);
this.sections.add(result); this.sections.add(result);
return result; return result;

View file

@ -30,61 +30,61 @@ package love.distributedrebirth.nx01.warp.manifestor.manifest;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.x4o.o2o.octal.PrimordialOctalOrangeJuiceAtoms; import org.x4o.o2o.octal.PrimordialOctalOrangeJuiceCord;
/// Warp manifest4 name value pair entry. /// Warp manifest4 name value pair entry.
/// ///
/// @author للَّٰهِilLצسُو /// @author للَّٰهِilLצسُو
/// @version ©Δ 仙上主天 /// @version ©Δ 仙上主天
public final class WarpManifest4HeaderField implements WarpManifest2HeaderField<PrimordialOctalOrangeJuiceAtoms, WarpManifest4HeaderField> { public final class WarpManifest4HeaderField implements WarpManifest2HeaderField<PrimordialOctalOrangeJuiceCord, WarpManifest4HeaderField> {
private PrimordialOctalOrangeJuiceAtoms name; private PrimordialOctalOrangeJuiceCord name;
private PrimordialOctalOrangeJuiceAtoms body; private PrimordialOctalOrangeJuiceCord body;
private final List<PrimordialOctalOrangeJuiceAtoms> remarks; private final List<PrimordialOctalOrangeJuiceCord> remarks;
public WarpManifest4HeaderField() { public WarpManifest4HeaderField() {
this.remarks = new ArrayList<>(); this.remarks = new ArrayList<>();
} }
public WarpManifest4HeaderField(PrimordialOctalOrangeJuiceAtoms name, PrimordialOctalOrangeJuiceAtoms body) { public WarpManifest4HeaderField(PrimordialOctalOrangeJuiceCord name, PrimordialOctalOrangeJuiceCord body) {
this(); this();
this.name = name; this.name = name;
this.body = body; this.body = body;
} }
@Override @Override
public PrimordialOctalOrangeJuiceAtoms getName() { public PrimordialOctalOrangeJuiceCord getName() {
return this.name; return this.name;
} }
@Override @Override
public void setName(PrimordialOctalOrangeJuiceAtoms name) { public void setName(PrimordialOctalOrangeJuiceCord name) {
this.name = name; this.name = name;
} }
@Override @Override
public PrimordialOctalOrangeJuiceAtoms getBody() { public PrimordialOctalOrangeJuiceCord getBody() {
return this.body; return this.body;
} }
@Override @Override
public void setBody(PrimordialOctalOrangeJuiceAtoms body) { public void setBody(PrimordialOctalOrangeJuiceCord body) {
this.body = body; this.body = body;
} }
@Override @Override
public List<PrimordialOctalOrangeJuiceAtoms> getRemarks() { public List<PrimordialOctalOrangeJuiceCord> getRemarks() {
return this.remarks; return this.remarks;
} }
@Override @Override
public WarpManifest4HeaderField withRemark(PrimordialOctalOrangeJuiceAtoms remark) { public WarpManifest4HeaderField withRemark(PrimordialOctalOrangeJuiceCord remark) {
this.remarks.add(remark); this.remarks.add(remark);
return this; return this;
} }
@Override @Override
public WarpManifest4HeaderField withRemarks(List<PrimordialOctalOrangeJuiceAtoms> remarks) { public WarpManifest4HeaderField withRemarks(List<PrimordialOctalOrangeJuiceCord> remarks) {
this.remarks.addAll(remarks); this.remarks.addAll(remarks);
return this; return this;
} }

View file

@ -30,35 +30,35 @@ package love.distributedrebirth.nx01.warp.manifestor.manifest;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.x4o.o2o.octal.PrimordialOctalOrangeJuiceAtoms; import org.x4o.o2o.octal.PrimordialOctalOrangeJuiceCord;
/// Warp manifest4 section. /// Warp manifest4 section.
/// ///
/// @author للَّٰهِilLצسُو /// @author للَّٰهِilLצسُو
/// @version ©Δ 仙上主天 /// @version ©Δ 仙上主天
public final class WarpManifest4Section implements WarpManifest2Section<PrimordialOctalOrangeJuiceAtoms, WarpManifest4HeaderField, WarpManifest4Section> { public final class WarpManifest4Section implements WarpManifest2Section<PrimordialOctalOrangeJuiceCord, WarpManifest4HeaderField, WarpManifest4Section> {
private PrimordialOctalOrangeJuiceAtoms name; private PrimordialOctalOrangeJuiceCord name;
private final List<WarpManifest4HeaderField> attributes; private final List<WarpManifest4HeaderField> attributes;
private final List<PrimordialOctalOrangeJuiceAtoms> remarks; private final List<PrimordialOctalOrangeJuiceCord> remarks;
public WarpManifest4Section() { public WarpManifest4Section() {
this.attributes = new ArrayList<>(); this.attributes = new ArrayList<>();
this.remarks = new ArrayList<>(); this.remarks = new ArrayList<>();
} }
public WarpManifest4Section(PrimordialOctalOrangeJuiceAtoms name) { public WarpManifest4Section(PrimordialOctalOrangeJuiceCord name) {
this(); this();
this.name = name; this.name = name;
} }
@Override @Override
public PrimordialOctalOrangeJuiceAtoms getName() { public PrimordialOctalOrangeJuiceCord getName() {
return name; return name;
} }
@Override @Override
public void setName(PrimordialOctalOrangeJuiceAtoms name) { public void setName(PrimordialOctalOrangeJuiceCord name) {
this.name = name; this.name = name;
} }
@ -68,14 +68,14 @@ public final class WarpManifest4Section implements WarpManifest2Section<Primordi
} }
@Override @Override
public WarpManifest4HeaderField makeAttribute(PrimordialOctalOrangeJuiceAtoms name, PrimordialOctalOrangeJuiceAtoms body) { public WarpManifest4HeaderField makeAttribute(PrimordialOctalOrangeJuiceCord name, PrimordialOctalOrangeJuiceCord body) {
WarpManifest4HeaderField result = new WarpManifest4HeaderField(name, body); WarpManifest4HeaderField result = new WarpManifest4HeaderField(name, body);
attributes.add(result); attributes.add(result);
return result; return result;
} }
@Override @Override
public WarpManifest4Section withAttribute(PrimordialOctalOrangeJuiceAtoms name, PrimordialOctalOrangeJuiceAtoms body) { public WarpManifest4Section withAttribute(PrimordialOctalOrangeJuiceCord name, PrimordialOctalOrangeJuiceCord body) {
WarpManifest4HeaderField result = new WarpManifest4HeaderField(name, body); WarpManifest4HeaderField result = new WarpManifest4HeaderField(name, body);
attributes.add(result); attributes.add(result);
return this; return this;
@ -88,18 +88,18 @@ public final class WarpManifest4Section implements WarpManifest2Section<Primordi
} }
@Override @Override
public List<PrimordialOctalOrangeJuiceAtoms> getRemarks() { public List<PrimordialOctalOrangeJuiceCord> getRemarks() {
return this.remarks; return this.remarks;
} }
@Override @Override
public WarpManifest4Section withRemark(PrimordialOctalOrangeJuiceAtoms remark) { public WarpManifest4Section withRemark(PrimordialOctalOrangeJuiceCord remark) {
this.remarks.add(remark); this.remarks.add(remark);
return this; return this;
} }
@Override @Override
public WarpManifest4Section withRemarks(List<PrimordialOctalOrangeJuiceAtoms> remarks) { public WarpManifest4Section withRemarks(List<PrimordialOctalOrangeJuiceCord> remarks) {
this.remarks.addAll(remarks); this.remarks.addAll(remarks);
return this; return this;
} }

View file

@ -30,7 +30,7 @@ package love.distributedrebirth.nx01.warp.manifestor.manifest;
import java.util.Arrays; import java.util.Arrays;
import java.util.Optional; import java.util.Optional;
import org.x4o.o2o.octal.PrimordialOctalOrangeJuiceAtoms; import org.x4o.o2o.octal.PrimordialOctalOrangeJuiceCord;
import org.x4o.o2o.octal.PrimordialOctalOrangeString; import org.x4o.o2o.octal.PrimordialOctalOrangeString;
/// Warp manifest schema of the version. /// Warp manifest schema of the version.
@ -49,7 +49,7 @@ public enum WarpManifestTheVersion {
VERSION_3_0("3.0"), VERSION_3_0("3.0"),
; ;
/// Format: binary-hinari (18 bit or 6 octals) /// Format: binary-hinari (18 bit or 6 octals)
public static final PrimordialOctalOrangeJuiceAtoms VERSION_4_0 = PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(4, 0)); public static final PrimordialOctalOrangeJuiceCord VERSION_4_0 = PrimordialOctalOrangeString.valueOfSmurfs(Arrays.asList(4, 0));
private final String qName; private final String qName;

View file

@ -30,7 +30,7 @@ package love.distributedrebirth.nx01.warp.manifestor.scopic.iomf;
import java.util.PrimitiveIterator; import java.util.PrimitiveIterator;
import org.x4o.o2o.io.sax3.XMLConstants; import org.x4o.o2o.io.sax3.XMLConstants;
import org.x4o.o2o.octal.PrimordialOctalOrangeJuiceAtoms; import org.x4o.o2o.octal.PrimordialOctalOrangeJuiceCord;
/// Stroboscopic manifest 1 and 2 constants. /// Stroboscopic manifest 1 and 2 constants.
/// ///
@ -152,7 +152,7 @@ public enum ScopicManifestConstants {
return true; return true;
} }
static public boolean isV4DataArraySizeLegal(PrimordialOctalOrangeJuiceAtoms value) { static public boolean isV4DataArraySizeLegal(PrimordialOctalOrangeJuiceCord value) {
// Source; // Source;
// 18 bit TLV length value // 18 bit TLV length value
if (value.length() > VERSION_4_MAX_DATA_LENGHT) { if (value.length() > VERSION_4_MAX_DATA_LENGHT) {

View file

@ -31,7 +31,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
import org.x4o.o2o.octal.PrimordialOctalOrangeJuiceAtoms; import org.x4o.o2o.octal.PrimordialOctalOrangeJuiceCord;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest4; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest4;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest4Section; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifest4Section;
@ -43,11 +43,11 @@ import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestExcepti
/// ///
/// @author للَّٰهِilLצسُو /// @author للَّٰهِilLצسُو
/// @version ©Δ 仙上主天 /// @version ©Δ 仙上主天
public class ScopicManifest4ContentHandler implements ScopicManifestContent<PrimordialOctalOrangeJuiceAtoms> { public class ScopicManifest4ContentHandler implements ScopicManifestContent<PrimordialOctalOrangeJuiceCord> {
private final WarpManifest4 manifest; private final WarpManifest4 manifest;
private WarpManifest4Section currentSection; private WarpManifest4Section currentSection;
private List<PrimordialOctalOrangeJuiceAtoms> remarks; private List<PrimordialOctalOrangeJuiceCord> remarks;
public ScopicManifest4ContentHandler(WarpManifest4 manifest) { public ScopicManifest4ContentHandler(WarpManifest4 manifest) {
this.manifest = manifest; this.manifest = manifest;
@ -55,7 +55,7 @@ public class ScopicManifest4ContentHandler implements ScopicManifestContent<Prim
} }
@Override @Override
public void strobeManifestDeclaration(PrimordialOctalOrangeJuiceAtoms version) { public void strobeManifestDeclaration(PrimordialOctalOrangeJuiceCord version) {
if (WarpManifestTheVersion.VERSION_4_0.equals(version)) { if (WarpManifestTheVersion.VERSION_4_0.equals(version)) {
return; return;
} }
@ -63,26 +63,26 @@ public class ScopicManifest4ContentHandler implements ScopicManifestContent<Prim
} }
@Override @Override
public void strobeMainAttribute(PrimordialOctalOrangeJuiceAtoms name, PrimordialOctalOrangeJuiceAtoms body) { public void strobeMainAttribute(PrimordialOctalOrangeJuiceCord name, PrimordialOctalOrangeJuiceCord body) {
this.manifest.makeAttribute(name, body).withRemarks(remarks); this.manifest.makeAttribute(name, body).withRemarks(remarks);
this.remarks.clear(); this.remarks.clear();
} }
@Override @Override
public void strobeSectionHeader(PrimordialOctalOrangeJuiceAtoms sectionName) { public void strobeSectionHeader(PrimordialOctalOrangeJuiceCord sectionName) {
this.currentSection = manifest.makeSection(sectionName); this.currentSection = manifest.makeSection(sectionName);
this.currentSection.withRemarks(remarks); this.currentSection.withRemarks(remarks);
this.remarks.clear(); this.remarks.clear();
} }
@Override @Override
public void strobeSectionAttribute(PrimordialOctalOrangeJuiceAtoms name, PrimordialOctalOrangeJuiceAtoms body) { public void strobeSectionAttribute(PrimordialOctalOrangeJuiceCord name, PrimordialOctalOrangeJuiceCord body) {
Objects.requireNonNull(this.currentSection, "Section header is not yet strobed.").makeAttribute(name, body).withRemarks(remarks); Objects.requireNonNull(this.currentSection, "Section header is not yet strobed.").makeAttribute(name, body).withRemarks(remarks);
this.remarks.clear(); this.remarks.clear();
} }
@Override @Override
public void strobeRemarkContent(PrimordialOctalOrangeJuiceAtoms remark) { public void strobeRemarkContent(PrimordialOctalOrangeJuiceCord remark) {
this.remarks.add(remark); this.remarks.add(remark);
} }

View file

@ -32,7 +32,7 @@ import java.util.Objects;
import org.x4o.o2o.io.tlv.TLVChainOctalSex; import org.x4o.o2o.io.tlv.TLVChainOctalSex;
import org.x4o.o2o.io.tlv.TLVChainOctalSexFrame; import org.x4o.o2o.io.tlv.TLVChainOctalSexFrame;
import org.x4o.o2o.octal.PrimordialOctalOrangeJuiceAtoms; import org.x4o.o2o.octal.PrimordialOctalOrangeJuiceCord;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestTheVersion; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestTheVersion;
import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestContent; import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestContent;
@ -44,9 +44,9 @@ import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestExcepti
/// @version ©Δ 仙上主天 /// @version ©Δ 仙上主天
public class ScopicManifest4ContentReader { public class ScopicManifest4ContentReader {
private final ScopicManifestContent<PrimordialOctalOrangeJuiceAtoms> handler; private final ScopicManifestContent<PrimordialOctalOrangeJuiceCord> handler;
public ScopicManifest4ContentReader(ScopicManifestContent<PrimordialOctalOrangeJuiceAtoms> handler) { public ScopicManifest4ContentReader(ScopicManifestContent<PrimordialOctalOrangeJuiceCord> handler) {
this.handler = Objects.requireNonNull(handler); this.handler = Objects.requireNonNull(handler);
} }
@ -61,7 +61,7 @@ public class ScopicManifest4ContentReader {
if (!ScopicManifest4FrameTLV.META_DECLARATION_VERSION.ordinalFrameType().equals(frameVersion.getSegmentProlog())) { if (!ScopicManifest4FrameTLV.META_DECLARATION_VERSION.ordinalFrameType().equals(frameVersion.getSegmentProlog())) {
throw new ScopicManifestException("Wrong magic version: 0y" + frameVersion.getSegmentProlog()); throw new ScopicManifestException("Wrong magic version: 0y" + frameVersion.getSegmentProlog());
} }
PrimordialOctalOrangeJuiceAtoms fieldVersion = frameVersion.getSegmentChainAtoms(); PrimordialOctalOrangeJuiceCord fieldVersion = frameVersion.getSegmentChainAtoms();
if (!WarpManifestTheVersion.VERSION_4_0.equals(fieldVersion)) { if (!WarpManifestTheVersion.VERSION_4_0.equals(fieldVersion)) {
throw new ScopicManifestException("Mismatched version: " + fieldVersion + " requested: " + WarpManifestTheVersion.VERSION_4_0); throw new ScopicManifestException("Mismatched version: " + fieldVersion + " requested: " + WarpManifestTheVersion.VERSION_4_0);
} }

View file

@ -29,7 +29,7 @@ package love.distributedrebirth.nx01.warp.manifestor.scopic.iomf4;
import org.x4o.o2o.io.tlv.TLVChainOctalSex; import org.x4o.o2o.io.tlv.TLVChainOctalSex;
import org.x4o.o2o.io.tlv.TLVChainOctalSexFrameType; import org.x4o.o2o.io.tlv.TLVChainOctalSexFrameType;
import org.x4o.o2o.octal.PrimordialOctalOrangeJuiceAtoms; import org.x4o.o2o.octal.PrimordialOctalOrangeJuiceCord;
import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestContent; import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestContent;
import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestDuplicateDetector; import love.distributedrebirth.nx01.warp.manifestor.scopic.ScopicManifestDuplicateDetector;
@ -41,10 +41,10 @@ import love.distributedrebirth.nx01.warp.manifestor.scopic.iomf.ScopicManifestCo
/// ///
/// @author للَّٰهِilLצسُو /// @author للَّٰهِilLצسُو
/// @version ©Δ 仙上主天 /// @version ©Δ 仙上主天
public class ScopicManifest4ContentWriter implements ScopicManifestContent<PrimordialOctalOrangeJuiceAtoms> { public class ScopicManifest4ContentWriter implements ScopicManifestContent<PrimordialOctalOrangeJuiceCord> {
private final TLVChainOctalSex chain; private final TLVChainOctalSex chain;
private final ScopicManifestDuplicateDetector<PrimordialOctalOrangeJuiceAtoms> duplicateDetector; private final ScopicManifestDuplicateDetector<PrimordialOctalOrangeJuiceCord> duplicateDetector;
public ScopicManifest4ContentWriter(TLVChainOctalSex chain) { public ScopicManifest4ContentWriter(TLVChainOctalSex chain) {
this.chain = chain; this.chain = chain;
@ -52,7 +52,7 @@ public class ScopicManifest4ContentWriter implements ScopicManifestContent<Primo
} }
@Override @Override
public void strobeManifestDeclaration(PrimordialOctalOrangeJuiceAtoms version) { public void strobeManifestDeclaration(PrimordialOctalOrangeJuiceCord version) {
if (version.length() > ScopicManifestConstants.ATTR_MANIFEST_VERSION_MAX_LENGHT) { if (version.length() > ScopicManifestConstants.ATTR_MANIFEST_VERSION_MAX_LENGHT) {
throw new ScopicManifestException("Declaration version too large: " + version.length()); throw new ScopicManifestException("Declaration version too large: " + version.length());
} }
@ -60,21 +60,21 @@ public class ScopicManifest4ContentWriter implements ScopicManifestContent<Primo
} }
@Override @Override
public void strobeMainAttribute(PrimordialOctalOrangeJuiceAtoms name, PrimordialOctalOrangeJuiceAtoms body) { public void strobeMainAttribute(PrimordialOctalOrangeJuiceCord name, PrimordialOctalOrangeJuiceCord body) {
duplicateDetector.validateUniqueKey(ScopicManifestDuplicatePart.MAIN_ATTRIBUTE, name); duplicateDetector.validateUniqueKey(ScopicManifestDuplicatePart.MAIN_ATTRIBUTE, name);
addFrameSafe(ScopicManifest4FrameTLV.MAIN_ATTRIBUTE_NAME, name); addFrameSafe(ScopicManifest4FrameTLV.MAIN_ATTRIBUTE_NAME, name);
addFrameSafe(ScopicManifest4FrameTLV.MAIN_ATTRIBUTE_BODY, body); addFrameSafe(ScopicManifest4FrameTLV.MAIN_ATTRIBUTE_BODY, body);
} }
@Override @Override
public void strobeSectionHeader(PrimordialOctalOrangeJuiceAtoms sectionName) { public void strobeSectionHeader(PrimordialOctalOrangeJuiceCord sectionName) {
duplicateDetector.validateUniqueKey(ScopicManifestDuplicatePart.SECTION_NAME, sectionName); duplicateDetector.validateUniqueKey(ScopicManifestDuplicatePart.SECTION_NAME, sectionName);
duplicateDetector.clearPart(ScopicManifestDuplicatePart.SECTION_ATTRIBUTE); duplicateDetector.clearPart(ScopicManifestDuplicatePart.SECTION_ATTRIBUTE);
addFrameSafe(ScopicManifest4FrameTLV.SECTION_HEADER_NAME, sectionName); addFrameSafe(ScopicManifest4FrameTLV.SECTION_HEADER_NAME, sectionName);
} }
@Override @Override
public void strobeSectionAttribute(PrimordialOctalOrangeJuiceAtoms name, PrimordialOctalOrangeJuiceAtoms body) { public void strobeSectionAttribute(PrimordialOctalOrangeJuiceCord name, PrimordialOctalOrangeJuiceCord body) {
duplicateDetector.validateUniqueKey(ScopicManifestDuplicatePart.SECTION_ATTRIBUTE, name); duplicateDetector.validateUniqueKey(ScopicManifestDuplicatePart.SECTION_ATTRIBUTE, name);
addFrameSafe(ScopicManifest4FrameTLV.SECTION_ATTRIBUTE_NAME, name); addFrameSafe(ScopicManifest4FrameTLV.SECTION_ATTRIBUTE_NAME, name);
addFrameSafe(ScopicManifest4FrameTLV.SECTION_ATTRIBUTE_BODY, body); addFrameSafe(ScopicManifest4FrameTLV.SECTION_ATTRIBUTE_BODY, body);
@ -82,7 +82,7 @@ public class ScopicManifest4ContentWriter implements ScopicManifestContent<Primo
@Override @Override
public void strobeRemarkContent(PrimordialOctalOrangeJuiceAtoms remark) { public void strobeRemarkContent(PrimordialOctalOrangeJuiceCord remark) {
addFrameSafe(ScopicManifest4FrameTLV.META_REMARK_CONTENT, remark); addFrameSafe(ScopicManifest4FrameTLV.META_REMARK_CONTENT, remark);
} }
@ -91,7 +91,7 @@ public class ScopicManifest4ContentWriter implements ScopicManifestContent<Primo
duplicateDetector.clearAll(); duplicateDetector.clearAll();
} }
private void addFrameSafe(TLVChainOctalSexFrameType type, PrimordialOctalOrangeJuiceAtoms data) { private void addFrameSafe(TLVChainOctalSexFrameType type, PrimordialOctalOrangeJuiceCord data) {
if (!ScopicManifestConstants.isV4DataArraySizeLegal(data)) { if (!ScopicManifestConstants.isV4DataArraySizeLegal(data)) {
throw new ScopicManifestException("Manifest data token size too long: " + data); throw new ScopicManifestException("Manifest data token size too long: " + data);
} }

View file

@ -30,6 +30,9 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.function.Supplier; import java.util.function.Supplier;
import org.x4o.o2o.octal.PrimordialOctalOrangeJuiceCord;
import org.x4o.o2o.octal.PrimordialOctalOrangeString;
/** /**
* ContentConfig Defines checked config options. * ContentConfig Defines checked config options.
* *
@ -390,6 +393,34 @@ public final class PropertyConfig implements Cloneable {
return defaultValue.get(); return defaultValue.get();
} }
public final PrimordialOctalOrangeJuiceCord getPropertyString18(String key) {
Object value = getProperty(key);
if (value instanceof PrimordialOctalOrangeJuiceCord) {
return (PrimordialOctalOrangeJuiceCord)value;
}
if (value==null) {
return null;
}
throw new IllegalStateException("Wrong value type: "+value.getClass()+" for key: "+key);
}
public final PrimordialOctalOrangeJuiceCord getPropertyString18(String key,PrimordialOctalOrangeJuiceCord defaultValue) {
PrimordialOctalOrangeJuiceCord propertyValue = getPropertyString18(key);
if (propertyValue==null) {
return defaultValue;
} else {
return propertyValue;
}
}
public final PrimordialOctalOrangeJuiceCord getPropertyString18(String key,Supplier<PrimordialOctalOrangeJuiceCord> defaultValue) {
PrimordialOctalOrangeJuiceCord result = getPropertyString18(key);
if (result != null) {
return result;
}
return defaultValue.get();
}
public final void copyParentProperties(PropertyConfig config) { public final void copyParentProperties(PropertyConfig config) {
for (String key:getPropertyKeys()) { for (String key:getPropertyKeys()) {
Object value = config.getProperty(key); Object value = config.getProperty(key);
@ -455,6 +486,10 @@ public final class PropertyConfig implements Cloneable {
result.put(mKey, mValue); result.put(mKey, mValue);
return; return;
} }
if (PrimordialOctalOrangeJuiceCord.class.equals(valueType)) {
setProperty(key, PrimordialOctalOrangeString.valueOfHinari(value));
return;
}
} }
/** /**

View file

@ -123,7 +123,7 @@ public class AbstractContentWriterHandler implements ContentHandler {
return propertyConfig; return propertyConfig;
} }
// TODO: check location of this. (add to api?) @Deprecated
public void closeWriter() throws IOException { public void closeWriter() throws IOException {
if (out==null) { if (out==null) {
return; return;
@ -131,6 +131,7 @@ public class AbstractContentWriterHandler implements ContentHandler {
out.close(); out.close();
} }
@Deprecated
public void closeWriterSafe() { public void closeWriterSafe() {
try { try {
closeWriter(); closeWriter();

View file

@ -20,10 +20,10 @@
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
/** /**
* The SAX Extended classes and interfaces. * The SAX Extended classes and interfaces.
* *
* @since 1.0 * @since 1.0
*/ */
package org.x4o.o2o.io.sax3; package org.x4o.o2o.io.sax3;

View file

@ -47,7 +47,7 @@ public enum XDBXContentTag {
ATTRIBUTE_III('y'), ATTRIBUTE_III('y'),
ATTRIBUTE_III_FAST('b'), // no CR,AMP,GT,LT,',",\t,\n ATTRIBUTE_III_FAST('b'), // no CR,AMP,GT,LT,',",\t,\n
TEXT_T('T'), TEXT_T('T'),
TEXT_UNESCAPED('U'), // no CR,AMP,GT,LT in text node TEXT_T_FAST('U'), // no CR,AMP,GT,LT in text node
TEXT_CDATA('C'), TEXT_CDATA('C'),
TEXT_WHITE_SPACE('W'), TEXT_WHITE_SPACE('W'),
COMMENT('c'), COMMENT('c'),

View file

@ -20,10 +20,10 @@
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
/** /**
* The SAX XDBX classes and interfaces. * The SAX XDBX classes and interfaces.
* *
* @since 1.0 * @since 1.0
*/ */
package org.x4o.o2o.io.sax3.xdbx; package org.x4o.o2o.io.sax3.xdbx;

View file

@ -36,7 +36,7 @@ import java.util.List;
import org.x4o.o2o.octal.PrimordialOctal; import org.x4o.o2o.octal.PrimordialOctal;
import org.x4o.o2o.octal.PrimordialOctalIterator; import org.x4o.o2o.octal.PrimordialOctalIterator;
import org.x4o.o2o.octal.PrimordialOctalOrangeJuice; import org.x4o.o2o.octal.PrimordialOctalOrangeJuice;
import org.x4o.o2o.octal.PrimordialOctalOrangeJuiceAtoms; import org.x4o.o2o.octal.PrimordialOctalOrangeJuiceCord;
import org.x4o.o2o.octal.PrimordialOctalOrangeSexWord; import org.x4o.o2o.octal.PrimordialOctalOrangeSexWord;
/// @author للَّٰهِilLצسُو /// @author للَّٰهِilLצسُو
@ -53,11 +53,11 @@ public final class TLVChainOctalSex
addFrame(type.ordinalFrameType(), data); addFrame(type.ordinalFrameType(), data);
} }
public void addFrame(PrimordialOctalOrangeJuice type, PrimordialOctalOrangeJuiceAtoms data) { public void addFrame(PrimordialOctalOrangeJuice type, PrimordialOctalOrangeJuiceCord data) {
addFrame(type, data.toJuiceArray()); addFrame(type, data.toJuiceArray());
} }
public void addFrame(TLVChainOctalSexFrameType type, PrimordialOctalOrangeJuiceAtoms data) { public void addFrame(TLVChainOctalSexFrameType type, PrimordialOctalOrangeJuiceCord data) {
addFrame(type.ordinalFrameType(), data.toJuiceArray()); addFrame(type.ordinalFrameType(), data.toJuiceArray());
} }

View file

@ -30,7 +30,7 @@ package org.x4o.o2o.io.tlv;
import java.util.Objects; import java.util.Objects;
import org.x4o.o2o.octal.PrimordialOctalOrangeJuice; import org.x4o.o2o.octal.PrimordialOctalOrangeJuice;
import org.x4o.o2o.octal.PrimordialOctalOrangeJuiceAtoms; import org.x4o.o2o.octal.PrimordialOctalOrangeJuiceCord;
import org.x4o.o2o.octal.PrimordialOctalOrangeString; import org.x4o.o2o.octal.PrimordialOctalOrangeString;
/// @author للَّٰهِilLצسُو /// @author للَّٰهِilLצسُو
@ -55,7 +55,7 @@ public final class TLVChainOctalSexFrame implements TLVChainAtomFrame<Primordial
return segmentChain; return segmentChain;
} }
public PrimordialOctalOrangeJuiceAtoms getSegmentChainAtoms() { public PrimordialOctalOrangeJuiceCord getSegmentChainAtoms() {
return new PrimordialOctalOrangeString(segmentChain); return new PrimordialOctalOrangeString(segmentChain);
} }
} }

View file

@ -27,11 +27,13 @@
package org.x4o.o2o.octal; package org.x4o.o2o.octal;
import java.util.function.Consumer;
/// Primordial octal string of juice atoms. /// Primordial octal string of juice atoms.
/// ///
/// @author للَّٰهِilLצسُو /// @author للَّٰهِilLצسُو
/// @version ©Δ 仙上主天 /// @version ©Δ 仙上主天
public interface PrimordialOctalOrangeJuiceAtoms extends PrimordialOctalSkullBaitIterable { public interface PrimordialOctalOrangeJuiceCord extends PrimordialOctalSkullBaitIterable {
int length(); int length();
@ -39,6 +41,12 @@ public interface PrimordialOctalOrangeJuiceAtoms extends PrimordialOctalSkullBai
PrimordialOctalOrangeJuice[] toJuiceArray(); PrimordialOctalOrangeJuice[] toJuiceArray();
default void juiceForEach(Consumer<PrimordialOctalOrangeJuice> action) {
for (int i=0;i<length();i++) {
action.accept(juiceAt(i));
}
}
default PrimordialOctalIterator baitOctalIterator() { default PrimordialOctalIterator baitOctalIterator() {
return new PrimordialOctalIterator() { return new PrimordialOctalIterator() {
PrimordialOctalIterator currentIterator; PrimordialOctalIterator currentIterator;

View file

@ -35,7 +35,7 @@ import java.util.Objects;
/// ///
/// @author للَّٰهِilLצسُو /// @author للَّٰهِilLצسُو
/// @version ©Δ 仙上主天 /// @version ©Δ 仙上主天
public final class PrimordialOctalOrangeString implements PrimordialOctalOrangeJuiceAtoms { public final class PrimordialOctalOrangeString implements PrimordialOctalOrangeJuiceCord {
private final static PrimordialOctalOrangeString EMPTY = new PrimordialOctalOrangeString(new PrimordialOctalOrangeJuice[] {}); private final static PrimordialOctalOrangeString EMPTY = new PrimordialOctalOrangeString(new PrimordialOctalOrangeJuice[] {});
private final PrimordialOctalOrangeJuice[] words; private final PrimordialOctalOrangeJuice[] words;