class PropertyReaderUtils {

    public static Point2D getSourcePosition(DefinitionResolver definitionResolver,
                                            String edgeId,
                                            String sourceId) {
        final double resolutionFactor = definitionResolver.getResolutionFactor();
        final Bounds sourceBounds = definitionResolver.getShape(sourceId).getBounds();
        final List<Point> waypoint = definitionResolver.getEdge(edgeId).getWaypoint();

        return waypoint.isEmpty() ?
                sourcePosition(sourceBounds, resolutionFactor)
                : offsetPosition(sourceBounds,
                                 waypoint.get(0),
                                 resolutionFactor);
    }

}