Search in sources :

Example 16 with AttributeSequence

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);
}
Also used : FilterAttribute(dev.hawala.xns.level4.filing.FilingCommon.FilterAttribute) Attribute(dev.hawala.xns.level4.filing.FilingCommon.Attribute) UninterpretedAttribute(dev.hawala.xns.level4.filing.fs.UninterpretedAttribute)

Example 17 with AttributeSequence

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);
}
Also used : UndefinedErrorRecord(dev.hawala.xns.level4.filing.FilingCommon.UndefinedErrorRecord) FilterAttribute(dev.hawala.xns.level4.filing.FilingCommon.FilterAttribute) Attribute(dev.hawala.xns.level4.filing.FilingCommon.Attribute) UninterpretedAttribute(dev.hawala.xns.level4.filing.fs.UninterpretedAttribute) Ordering(dev.hawala.xns.level4.filing.FilingCommon.Ordering)

Example 18 with AttributeSequence

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));
    }
}
Also used : FilterAttribute(dev.hawala.xns.level4.filing.FilingCommon.FilterAttribute) Attribute(dev.hawala.xns.level4.filing.FilingCommon.Attribute) UninterpretedAttribute(dev.hawala.xns.level4.filing.fs.UninterpretedAttribute) UninterpretedAttribute(dev.hawala.xns.level4.filing.fs.UninterpretedAttribute)

Aggregations

FileEntry (dev.hawala.xns.level4.filing.fs.FileEntry)10 Attribute (dev.hawala.xns.level4.filing.FilingCommon.Attribute)8 UninterpretedAttribute (dev.hawala.xns.level4.filing.fs.UninterpretedAttribute)8 AccessErrorRecord (dev.hawala.xns.level4.filing.FilingCommon.AccessErrorRecord)7 HandleErrorRecord (dev.hawala.xns.level4.filing.FilingCommon.HandleErrorRecord)7 EndOfMessageException (dev.hawala.xns.level3.courier.iWireStream.EndOfMessageException)6 UndefinedErrorRecord (dev.hawala.xns.level4.filing.FilingCommon.UndefinedErrorRecord)6 Volume (dev.hawala.xns.level4.filing.fs.Volume)6 CourierException (dev.hawala.xns.level3.courier.exception.CourierException)5 NoMoreWriteSpaceException (dev.hawala.xns.level3.courier.iWireStream.NoMoreWriteSpaceException)5 AttributeSequence (dev.hawala.xns.level4.filing.FilingCommon.AttributeSequence)5 FilterAttribute (dev.hawala.xns.level4.filing.FilingCommon.FilterAttribute)5 SpaceErrorRecord (dev.hawala.xns.level4.filing.FilingCommon.SpaceErrorRecord)5 dev.hawala.xns.level4.filing.fs.iValueSetter (dev.hawala.xns.level4.filing.fs.iValueSetter)5 IOException (java.io.IOException)5 ConnectionErrorRecord (dev.hawala.xns.level4.filing.FilingCommon.ConnectionErrorRecord)4 dev.hawala.xns.level4.filing.fs.iValueGetter (dev.hawala.xns.level4.filing.fs.iValueGetter)4 StreamOf (dev.hawala.xns.level3.courier.StreamOf)2 AttributeValueErrorRecord (dev.hawala.xns.level4.filing.FilingCommon.AttributeValueErrorRecord)2 ArrayList (java.util.ArrayList)2