protected void readConnector(final EntitySetupDescriptor desc,final Element element){
  final List<Element> connectors=XMLUtil.getElements(element,"connector");
  if (connectors.isEmpty()) {
    return;
  }
  Element connector=connectors.get(0);
  if (connector.hasAttribute("name")) {
    desc.setConnectorName(connector.getAttribute("name"));
  }
  final List<Element> list=XMLUtil.getElements(connector,"port");
  for (  final Element port : list) {
    if (port.hasAttribute("name") && port.hasAttribute("expression")) {
      desc.addPort(port.getAttribute("name"),port.getAttribute("expression"));
    }
 else {
      LOGGER.error("<port> without name or expression");
    }
  }
}

protected void readConnector ( final EntitySetupDescriptor desc , final Element element ) { final List < Element > connectors = XMLUtil . getElements ( element , "connector" ) ; if ( connectors . isEmpty ( ) ) { return ; } Element connector = connectors . get ( 0 ) ; if ( connector . hasAttribute ( "name" ) ) { desc . setConnectorName ( connector . getAttribute ( "name" ) ) ; } final List < Element > list = XMLUtil . getElements ( connector , "port" ) ; for ( final Element port : list ) { if ( port . hasAttribute ( "name" ) && port . hasAttribute ( "expression" ) ) { desc . addPort ( port . getAttribute ( "name" ) , port . getAttribute ( "expression" ) ) ; } else { LOGGER . error ( "<port> without name or expression" ) ; } } }
read a connector from an xml element .
