Search in sources :

Example 1 with ColumnValueDescription

use of com.palantir.atlasdb.table.description.ColumnValueDescription in project atlasdb by palantir.

the class TableMetadataDeserializer method deserializeNamedCols.

private ColumnMetadataDescription deserializeNamedCols(JsonNode node) {
    Collection<NamedColumnDescription> cols = Lists.newArrayList();
    for (JsonNode colNode : node.get("columns")) {
        String name = colNode.get("name").asText();
        String longName = colNode.get("long_name").asText();
        ColumnValueDescription val = deserializeValue(colNode.get("value"));
        cols.add(new NamedColumnDescription(name, longName, val));
    }
    return new ColumnMetadataDescription(cols);
}
Also used : ColumnMetadataDescription(com.palantir.atlasdb.table.description.ColumnMetadataDescription) JsonNode(com.fasterxml.jackson.databind.JsonNode) NamedColumnDescription(com.palantir.atlasdb.table.description.NamedColumnDescription) ColumnValueDescription(com.palantir.atlasdb.table.description.ColumnValueDescription)

Example 2 with ColumnValueDescription

use of com.palantir.atlasdb.table.description.ColumnValueDescription in project atlasdb by palantir.

the class TableMetadataDeserializer method deserializeDynamicCol.

private ColumnMetadataDescription deserializeDynamicCol(JsonNode node) {
    NameMetadataDescription col = deserializeRowish(node.get("column"));
    ColumnValueDescription val = deserializeValue(node.get("value"));
    DynamicColumnDescription dynamicCol = new DynamicColumnDescription(col, val);
    return new ColumnMetadataDescription(dynamicCol);
}
Also used : NameMetadataDescription(com.palantir.atlasdb.table.description.NameMetadataDescription) ColumnMetadataDescription(com.palantir.atlasdb.table.description.ColumnMetadataDescription) DynamicColumnDescription(com.palantir.atlasdb.table.description.DynamicColumnDescription) ColumnValueDescription(com.palantir.atlasdb.table.description.ColumnValueDescription)

Aggregations

ColumnMetadataDescription (com.palantir.atlasdb.table.description.ColumnMetadataDescription)2 ColumnValueDescription (com.palantir.atlasdb.table.description.ColumnValueDescription)2 JsonNode (com.fasterxml.jackson.databind.JsonNode)1 DynamicColumnDescription (com.palantir.atlasdb.table.description.DynamicColumnDescription)1 NameMetadataDescription (com.palantir.atlasdb.table.description.NameMetadataDescription)1 NamedColumnDescription (com.palantir.atlasdb.table.description.NamedColumnDescription)1