FC18: Corrected importer method naming regarding FC6 and FC18

This commit is contained in:
Willem Cazander 2025-09-28 01:06:04 +02:00
parent b2e883c1b6
commit fa6dc9ce2c
6 changed files with 39 additions and 44 deletions

View file

@ -36,36 +36,36 @@ import org.x4o.fc18.zion7.octal8.PrimordialOctalOrangeString;
/// @author للَّٰهِilLצسُو
/// @version ©Δ 仙上主天
public final class WarpManifestX18Import {
private WarpManifestX18Import() {
}
static public WarpManifestX18 fromX8(WarpManifestX8 manifest) {
WarpManifestX18Section sectionX18 = null;
WarpManifestX18HeaderField fieldX18 = null;
WarpManifestX18 result = new WarpManifestX18();
for (WarpManifestX8HeaderField attrX8 : manifest.getAttributes()) {
fieldX18 = result.makeAttribute(toX8(attrX8.getName()), toX8(attrX8.getBody()));
fieldX18 = result.makeAttribute(toFC8(attrX8.getName()), toFC8(attrX8.getBody()));
for (String remark : attrX8.getRemarks()) {
fieldX18.withRemark(toX8(remark));
fieldX18.withRemark(toFC8(remark));
}
}
for (WarpManifestX8Section sectionX8 : manifest.getSections()) {
sectionX18 = result.makeSection(toX8(sectionX8.getName()));
sectionX18 = result.makeSection(toFC8(sectionX8.getName()));
for (String remark : sectionX8.getRemarks()) {
sectionX18.withRemark(toX8(remark));
sectionX18.withRemark(toFC8(remark));
}
for (WarpManifestX8HeaderField attrX8 : sectionX8.getAttributes()) {
fieldX18 = sectionX18.makeAttribute(toX8(attrX8.getName()), toX8(attrX8.getBody()));
fieldX18 = sectionX18.makeAttribute(toFC8(attrX8.getName()), toFC8(attrX8.getBody()));
for (String remark : attrX8.getRemarks()) {
fieldX18.withRemark(toX8(remark));
fieldX18.withRemark(toFC8(remark));
}
}
}
return result;
}
static private PrimordialOctalOrangeJuiceStraw toX8(String value) {
return PrimordialOctalOrangeString.valueOfSmurfs(FourCornerUnicodeImport.lossy().convertToInt18(value));
static private PrimordialOctalOrangeJuiceStraw toFC8(String value) {
return PrimordialOctalOrangeString.ioSmurfReadListX18(FourCornerUnicodeImport.lossy().convertToFC18(value));
}
}