use of dev.hawala.xns.level4.filing.FilingCommon.AttributeSequence in project dodo by devhawala.
the class AttributeUtils method file2courier_unsupported.
private static void file2courier_unsupported(AttributeSequence s, long atCode) {
Attribute attr = s.value.add();
attr.value.clear();
attr.type.set(atCode);
}
use of dev.hawala.xns.level4.filing.FilingCommon.AttributeSequence in project dodo by devhawala.
the class AttributeUtils method file2courier_ordering.
private static void file2courier_ordering(AttributeSequence s, long key, boolean ascending, int interpretation) {
Ordering ord = Ordering.make();
ord.key.set(key);
ord.ascending.set(ascending);
switch(interpretation) {
case FsConstants.intrBoolean:
ord.interpretation.set(Interpretation.bool);
break;
case FsConstants.intrCardinal:
ord.interpretation.set(Interpretation.cardinal);
break;
case FsConstants.intrLongCardinal:
ord.interpretation.set(Interpretation.longCardinal);
break;
case FsConstants.intrInteger:
ord.interpretation.set(Interpretation.integer);
break;
case FsConstants.intrLongInteger:
ord.interpretation.set(Interpretation.longInteger);
break;
case FsConstants.intrTime:
ord.interpretation.set(Interpretation.time);
break;
case FsConstants.intrString:
ord.interpretation.set(Interpretation.string);
break;
default:
ord.interpretation.set(Interpretation.interpretationNone);
break;
}
Attribute attr = s.value.add();
try {
attr.encodeData(ord);
} catch (Exception e) {
new UndefinedErrorRecord(FilingCommon.UNDEFINEDERROR_ENCODE_ERROR).raise();
}
attr.type.set(FilingCommon.atOrdering);
}
use of dev.hawala.xns.level4.filing.FilingCommon.AttributeSequence in project dodo by devhawala.
the class AttributeUtils method file2courier_uninterpreted.
public static void file2courier_uninterpreted(AttributeSequence s, long atCode, FileEntry fe) {
UninterpretedAttribute a = fe.getUninterpretedAttribute(atCode);
Attribute attr = s.value.add();
attr.type.set(atCode);
if (a == null) {
return;
}
for (int i = 0; i < a.size(); i++) {
attr.value.add().set(a.get(i));
}
}
Aggregations