protected InputsModel toInputsModel ( Input [ ] inputs , KnowledgeNamespace knowledgeNamespace ) { InputsModel inputsModel = null ; if ( inputs != null ) { for ( Input input : inputs ) { if ( input != null ) { InputModel inputModel = new V1InputModel ( knowledgeNamespace . uri ( ) ) ; String from = input . from ( ) ; if ( ! UNDEFINED . equals ( from ) ) { inputModel . setFrom ( from ) ; } String to = input . to ( ) ; if ( ! UNDEFINED . equals ( to ) ) { inputModel . setTo ( to ) ; } if ( inputsModel == null ) { inputsModel = new V1InputsModel ( knowledgeNamespace . uri ( ) ) ; } inputsModel . addInput ( inputModel ) ; } } } return inputsModel ; }
Converts inputs to mappings model .