Esempio n. 1
0
def list_xml_show_itself(model_list, params):
    #this lines makes a list (header) only appear if it's children models are kinds
    children_are_kinds= has_xser_prop(model_list[0], KIND_PROP_NAME)
    return len(model_list)>0 and children_are_kinds
Esempio n. 2
0
def model_xml_show_itself(model, params):
    is_kind= has_xser_prop(model.model_class, KIND_PROP_NAME)       #is a xml_kind
    return is_kind
Esempio n. 3
0
def model_xml_show_children(model, params):
    is_kind= has_xser_prop(model.model_class, KIND_PROP_NAME)       #is a xml_kind
    is_fully_shallow= params['serialization_type']==SER_TYPE_SHALLOW
    return not is_fully_shallow or not is_kind
Esempio n. 4
0
def atribute_xml_filter(atr, params):
    is_type= has_xser_prop(atr.atr_class, TYPE_PROP_NAME)       #is a xml_kind
    is_model_list= atr.is_model_list()     #is a list of models (relationship)
    return is_type or is_model_list