-- | get the 'AdaptationFunction' for a 'NetworkObject' if it has one
adaptationFunction :: NetworkObject -> NMLReader (Maybe AdaptationFunction)
adaptationFunction n = case n of
            (Service Deadaptation _)    -> q n
            (Service Adaptation _)      -> q n
            _                           -> return Nothing
    where
        q = queryAttrib "nml:adaptationFunction" AdaptationFunction
adaptationFunction :: NetworkObject -> NMLReader (Maybe AdaptationFunction)
adaptationFunction n = case n of
            (Service Deadaptation _)    -> q n
            (Service Adaptation _)      -> q n
            _                           -> return Nothing
    where
        q = queryAttrib "nml:adaptationFunction" AdaptationFunction
adaptationFunction n = case n of
            (Service Deadaptation _)    -> q n
            (Service Adaptation _)      -> q n
            _                           -> return Nothing
    where
        q = queryAttrib "nml:adaptationFunction" AdaptationFunction