logger.debug("Added new Sensor: \n"+sensor.toString() );
if (logger.isDebugEnabled()) logger.debug("Added new Sensor: \n"+sensor.toString() );
    protected Vector processElement(Element element) {                //publish to BB during execute().        //1. Create a new AssetType instance &        String sensorName = element.getAttribute("name");        String type = element.getAttribute("sensesAssetType");        String stateDim = element.getAttribute("sensesStateDimension");        String lat = element.getAttribute("sensorLatency"); //int msec                try {                        //covert sensor latency to an int            int latency = Integer.parseInt(lat);                        AssetType sensesAssetType = AssetType.findAssetType(type);                        //what to do when assetType is null? - create it, process it later?            if (sensesAssetType == null) {                logger.error("SensorType XML Error - sensesAssetType unknown: "+type);                return null;            }                        AssetStateDimension asd = sensesAssetType.findStateDimension(stateDim);            if (asd == null) {                logger.error("SensorTypeLoader XML Error - senses state dimension not found! unknown sensesStateDimension : "+stateDim+ " for asset type = " + type);                return null;            }                                        if (us == null) {                logger.warn("SensorType XML Error - UIDService is null!");                return null;            }            UID uid = us.nextUID();            DiagnosisTechSpecImpl sensor = new DiagnosisTechSpecImpl( sensorName, uid, sensesAssetType, asd, latency);                        //Create a SensorType            Element e;            for (Node child = element.getFirstChild(); child != null; child = child.getNextSibling()) {                if (child.getNodeType() == Node.ELEMENT_NODE && child.getNodeName().equalsIgnoreCase("PotentialDiagnoses") ) {                    e = (Element)child;                    parsePotentialDiagnoses(e, sensor);                } else if (child.getNodeType() == Node.ELEMENT_NODE && child.getNodeName().equalsIgnoreCase("Diagnoses") ) {                    e = (Element)child;                    parseDiagnoses(e, sensor);                } //else, likely a text element - ignore            }            //Add diagnosis to service            diagnosisTechSpecService.addDiagnosisTechSpec( sensorName, sensor );                        logger.debug("Added new Sensor: \n"+sensor.toString() );                    } catch (NumberFormatException nfe) { //converting string to int            logger.warn("SensorType XML Error for ["+sensorName+"]- Bad integer in latency: " + lat);        }        return null;    }