Пример #1
0
def append_valid_time(subresult, entry, atomroot, 
                       begin_position, end_position):
    #xmlentry = entry.buildElement()
    if begin_position is not None:
        begin_position = createBeginPosition(root = atomroot, 
                                            body = subresult.beginPosition)
    if end_position is not None:                
        end_position = createEndPosition(root = atomroot, 
                                        body = subresult.endPosition)                
    time_period = createTimePeriod(root = atomroot, 
                                  begin = begin_position, end = end_position)       
    valid_time = createValidTime(root = atomroot, body = time_period)
    if begin_position is not None or end_position is not None:
        entry.append(valid_time) 
Пример #2
0
def create_test_end_position(root = None, body = '2011-03-20T12:31:15.451Z'):
    return createEndPosition(root, body = body)