protected OutputsModel toOutputsModel ( Output [ ] outputs , KnowledgeNamespace knowledgeNamespace ) { OutputsModel outputsModel = null ; if ( outputs != null ) { for ( Output output : outputs ) { if ( output != null ) { OutputModel outputModel = new V1OutputModel ( knowledgeNamespace . uri ( ) ) ; String from = output . from ( ) ; if ( ! UNDEFINED . equals ( from ) ) { outputModel . setFrom ( from ) ; } String to = output . to ( ) ; if ( ! UNDEFINED . equals ( to ) ) { outputModel . setTo ( to ) ; } if ( outputsModel == null ) { outputsModel = new V1OutputsModel ( knowledgeNamespace . uri ( ) ) ; } outputsModel . addOutput ( outputModel ) ; } } } return outputsModel ; }
Converts outputs to mappings model .