static AccessPoint importAccessPoint(Element element, String attribute,
            String circuitName, SEPFormatConverter converter,
            boolean funckitFormat) throws SEPFormatImportException {
        AccessPoint point;
        if (funckitFormat) {
            UUID uuid = converter.ensureUUID(element, "fck:" + attribute);
            Object o = converter.getObject(uuid);
            if (o == null) {
                converter
                        .importWarn(
                                "SEPFormatImporter.Warning.wireReferencesNoBrickAccessPoint",
                                uuid);
                return null;
            }
            if (!(o instanceof AccessPoint)) {
                throw new SEPFormatImportException(
                        "SEPFormatImportException.attributeHasToReferenceClass",
                        "connection", "fck:" + attribute, "AccessPoint",
                        element.getAttribute("fck:" + attribute));
            }
            point = (AccessPoint) o;

        } else {
            String brickName = converter.ensureAttribute(element, attribute);
            UUID uuid = converter.nameToUUID(circuitName + ":" + brickName);
            Object o = converter.getObject(uuid);
            if (o == null) {
                converter
                        .importWarn(
                                "SEPFormatImporter.Warning.connectionReferencesNoBrick",
                                brickName);
                return null;
            }
            if (!(o instanceof Brick)) {
                throw new SEPFormatImportException(
                        "SEPFormatImportException.attributeHasToReferenceClass",
                        "connection", attribute, "Brick", element
                                .getAttribute(attribute));
            }
            Brick brick = (Brick) o;
            String portName = converter.ensureAttribute(element, attribute
                    + "Port");
            if (attribute.equals("source")) {
                point = brick.getOutput(portName);
                if (point == null) { // try input in case this is a invalid
                                     // circuit
                    point = brick.getInput(portName);
                }
            } else { // "target"
                point = brick.getInput(portName);
                if (point == null) { // try output in case this is a invalid
                                     // circuit
                    point = brick.getOutput(portName);
                }
            }
            if (point == null) {
                converter
                        .importWarn(
                                "SEPFormatImporter.Warning.connectionReferencesNoPortOnBrick",
                                brickName, portName);
                return null;
            }
        }

        return point;
    }