protected PropertiesModel toPropertiesModel ( Property [ ] propertyAnnotations , KnowledgeNamespace knowledgeNamespace ) { if ( propertyAnnotations == null || propertyAnnotations . length == 0 ) { return null ; } PropertiesModel propertiesModel = new V1PropertiesModel ( knowledgeNamespace . uri ( ) ) ; for ( Property propertyAnnotation : propertyAnnotations ) { PropertyModel propertyModel = new V1PropertyModel ( knowledgeNamespace . uri ( ) ) ; String name = propertyAnnotation . name ( ) ; if ( ! UNDEFINED . equals ( name ) ) { propertyModel . setName ( name ) ; } String value = propertyAnnotation . value ( ) ; if ( ! UNDEFINED . equals ( value ) ) { propertyModel . setValue ( value ) ; } propertiesModel . addProperty ( propertyModel ) ; } return propertiesModel ; }
Converts property annotations to properties model .